/* Shared Booking Sheet — loaded by Main and Promo. */
:root {
    --header-height: 82px;
    --ui-motion-duration: 450ms;
    --ui-motion-easing: cubic-bezier(.22, .61, .36, 1);
    --sheet-motion-easing: cubic-bezier(.34, .06, .24, 1);
    --sheet-start-offset: 24px;
    --z-bottom-bar: 100;
    --z-booking-sheet: 250;
    --z-booking-close: 260;
    --z-header: 300;
}

/* Stable compositor shell; only the inner header bar may move. */
.header {
    z-index: var(--z-header);
    isolation: isolate;
    transform: translateZ(0);
    backface-visibility: hidden;
    box-sizing: border-box;
}

/* Keep either page's header implementation painted throughout sheet motion. */
html.booking-sheet-open .header-bar,
html.booking-sheet-open .header.is-hidden .header-bar {
    transform: translate3d(0, 0, 0);
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
    border-bottom-color: rgba(17, 53, 139, 0.08);
    transition: none;
}

/* ==========================================================================
   Booking bottom sheet + mobile bottom bar
   Layer order: page (1) < bottom-bar (100) < sheet (250) < close (260) < header (300)
   ========================================================================== */

.booking-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-bottom-bar);
    display: flex;
    justify-content: center;
    padding: 12px var(--container-pad) calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(239, 240, 244, 0) 0%, rgba(239, 240, 244, 0.92) 28%, #eff0f4 100%);
    pointer-events: none;
    opacity: 1;
    transition: opacity var(--ui-motion-duration) var(--ui-motion-easing);
}

.booking-bottom-bar .btn {
    pointer-events: auto;
    width: min(100%, 420px);
    box-shadow: 0 10px 28px rgba(12, 30, 69, 0.18);
}

body.has-booking-bottom-bar {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

html.booking-sheet-open .booking-bottom-bar {
    opacity: 0;
    pointer-events: none;
}

.booking-sheet-slot {
    width: 100%;
}

.booking-sheet-slot > section.cta {
    padding-top: 0;
    padding-bottom: 0;
}

.booking-sheet {
    position: relative;
}

.booking-sheet__header {
    display: none;
}

.booking-sheet.is-sheet-active {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    z-index: var(--z-booking-sheet);
    display: flex;
    flex-direction: column;
    transform: translate3d(0, calc(100% + var(--sheet-start-offset)), 0);
    transition: transform var(--ui-motion-duration) var(--sheet-motion-easing);
    backface-visibility: hidden;
    overflow: hidden;
}

.booking-sheet.is-animating {
    will-change: transform;
}

.booking-sheet.is-preparing {
    transition: none;
}

.booking-sheet.is-sheet-active.is-open {
    transform: translate3d(0, 0, 0);
}

.booking-sheet.is-sheet-active .booking-sheet__header {
    position: sticky;
    top: 0;
    z-index: var(--z-booking-close);
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px 4px;
    background: linear-gradient(180deg, var(--third-color) 70%, rgba(17, 53, 139, 0));
}

.booking-sheet__close {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(12, 30, 69, 0.18);
    cursor: pointer;
    opacity: 1;
    transition:
        transform var(--ui-motion-duration) var(--ui-motion-easing),
        opacity var(--ui-motion-duration) var(--ui-motion-easing);
}

.booking-sheet__close:hover {
    transform: translate3d(0, 2px, 0);
}

.booking-sheet__close:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

.booking-sheet.is-sheet-active .booking-sheet__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.booking-sheet.is-sheet-active .cta-layout {
    padding-top: 12px;
}

html.booking-sheet-open,
html.booking-sheet-open body {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .header-bar,
    .main-nav,
    .main-nav-shutter,
    .booking-bottom-bar,
    .booking-sheet.is-sheet-active,
    .booking-sheet__close {
        transition: none;
    }
}
