/* atx-booking-map — minimal styles for inline panel + popup body */

/* The step header gets flex-row so the toggle lives on the right.
   Keep align-items:center so the step number circle and the heading text
   ("Resväg") stay vertically centred against the pill — otherwise both
   get pulled to the top of the taller pill row. */
.atx-booking__step-header.atx-booking__step-header--has-action {
    display: flex;
    align-items: center;
    gap: .5rem;
}
/* The toggle is the house button (.atx-btn--primary --xsm --pill, style.css)
   with its globe, at the header's right edge – in line with the fields. */
.atx-booking__step-header.atx-booking__step-header--has-action > .atx-bkmap-toggle {
    margin-left: auto;
}
.atx-bkmap-toggle { gap: .4rem; }
.atx-bkmap-toggle__icon { width: 16px; height: 16px; display: inline-block; flex: 0 0 16px; }
.atx-bkmap-toggle__label { white-space: nowrap; }

/* ---------------------------------------------------------------
 * Panel-corner variant.
 *
 * Mounted by atx-booking-map-bridge.js directly onto the visible
 * short-code-section card (.atx-short-code-section__embed) so the
 * "Open map" affordance lives in the panel's upper-right corner
 * across every booking step. Its click is proxied to the canonical
 * step-1 pill.
 * --------------------------------------------------------------- */
.atx-bkmap-toggle.atx-bkmap-toggle--panel {
    position: absolute;
    /* Nudged down from the literal corner so the pill doesn't crash into
       the panel's top edge / rounded corner. Tweak via the two variables. */
    top: var(--atx-bkmap-toggle-top, 2.75rem);
    right: var(--atx-bkmap-toggle-right, 1.5rem);
    z-index: 5;
}

/* While the popup is open the toggle becomes a "Return to booking" pill. */

.atx-bkmap-inline {
    margin: .25rem 0 .75rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    transition: max-height .25s ease, opacity .25s ease;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}
.atx-bkmap-inline.is-open {
    max-height: 70vh;
    opacity: 1;
    pointer-events: auto;
}
.atx-bkmap-inline__map {
    width: 100%;
    height: 60vh;
    min-height: 280px;
}
.atx-bkmap-inline__notice { margin: 0; border-radius: 0; } /* the house notice (.atx-notice--warn) */

/* Popup body — full-window map */
[data-atx-map-mode="popup"] {
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) {
    /* Desktop: inline panel hidden by default; we use the popup window. */
    .atx-bkmap-inline { display: none; }
}
