/**
 * MacArthur legacy template — mobile layout fixes (migration layer).
 * Loaded after template.css on Cassiopeia pages.
 */

:root {
    --site-banner-height: 0px;
}

/* Site notice bar — in document flow (not fixed) so height matches content on all screens */
.site-notice-bar,
.preview-banner {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483647;
    background: #f59e0b;
    color: #78350f;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font: 600 0.8rem/1.45 Montserrat, sans-serif;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    width: 100%;
}

.site-notice-bar a {
    color: #78350f;
    text-decoration: underline;
}

/* Sticky header sits flush below the notice bar when scrolling */
body.has-site-notice #header,
body.has-preview-banner #header {
    top: var(--site-banner-height, 0px);
}

/* Flight sidebar: bottom dock on phones — never force desktop top offset */
@media (min-width: 576px) {
    body.has-site-notice #side-menu,
    body.has-preview-banner #side-menu {
        top: calc(var(--site-banner-height, 0px) + 100px);
    }
}

@media (max-width: 575px) {
    .site-notice-bar {
        font-size: 0.72rem;
        line-height: 1.4;
        padding: 0.45rem 0.65rem;
    }

    body.has-site-notice #side-menu,
    body.has-site-notice #side-menu #menu-content,
    body.has-site-notice #side-menu #menu-bar,
    body.has-preview-banner #side-menu,
    body.has-preview-banner #side-menu #menu-content,
    body.has-preview-banner #side-menu #menu-bar {
        top: auto !important;
    }

    body.has-site-notice #footer,
    body.has-site-notice #main,
    body.has-preview-banner #footer,
    body.has-preview-banner #main,
    body.flights-page.has-site-notice #footer,
    body.flights-page.has-site-notice #main {
        padding-bottom: 72px;
    }
}

/* Connect With Us: Cassiopeia uses a 2-column grid on mobile, not Swiper */
@media (max-width: 767px) {
    .cw-us-section .cw-us-slider:not(.swiper-initialized) .swiper-wrapper,
    .cw-us-section .cw-us-slider.cw-us-grid .swiper-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        transform: none !important;
        width: 100% !important;
        gap: 16px;
    }

    .cw-us-section .cw-us-slider:not(.swiper-initialized) .swiper-slide,
    .cw-us-section .cw-us-slider.cw-us-grid .swiper-slide {
        width: calc(50% - 8px) !important;
        margin: 0 !important;
        height: auto !important;
    }

    .cw-us-section .cw-us-slider .swiper-button-next,
    .cw-us-section .cw-us-slider .swiper-button-prev {
        display: none !important;
    }
}

/* Header: reduce clutter on narrow phones */
@media (max-width: 767px) {
    #header .header-right-info .town-seal-logo img {
        width: 28px !important;
        height: 28px !important;
    }

    #header .header-right-info .time-and-weather {
        display: none !important;
    }
}

@media (max-width: 480px) {
    #header .header-right-info .town-seal-logo:not(#tsa-seal-section) {
        display: none !important;
    }

    #header .header-row .header-left .explore-box {
        left: 38% !important;
    }

    #header .header-row .header-left .explore-box h2 {
        font-size: 17px !important;
        line-height: 1.1;
    }
}

/* ISP coverflow: tighter on small screens */
@media (max-width: 767px) {
    .isp-exp-slider-main-sec .isp-exp-slider-row .swiper {
        padding: 24px 0 !important;
    }
}

/* Flight tables: horizontal scroll instead of crushing columns */
@media (max-width: 767px) {
    .partner-flight-filter-table,
    .flight-booking-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .partner-flight-filter-datatable {
        min-width: 640px;
    }

    #side-menu .flight-booking-table table {
        min-width: 100%;
    }

    .partner-flight-filter-datatable .desk-show {
        display: none !important;
    }

    .partner-flight-filter-datatable .mob-show {
        display: inline-block !important;
    }
}

/* Pending / sub-pages: room for fixed header */
@media (max-width: 767px) {
    .legacy-pending {
        padding: 2rem 1rem 3rem;
    }
}
