/*
 * Shared, lightweight scroll behaviour for the B2C and B2B portals.
 * Keep motion subtle and leave all search/booking state in the existing modules.
 */

:root {
    --app-header-bottom: 84px;
    --app-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    scroll-padding-top: calc(var(--app-header-bottom) + 12px);
}

main section[id],
main article[id],
main div[id][data-scroll-anchor],
.site-footer[id],
.site-footer [id] {
    scroll-margin-top: calc(var(--app-header-bottom) + 12px);
}

.site-header,
.site-header .main-navbar,
.site-header .header-brand,
.site-header .header-logo-frame,
.site-header .header-brand-logo,
.b2b-app .agent-topbar,
.b2b-app .agent-brand,
.b2b-app .agent-brand img {
    transition: min-height .28s ease, height .28s ease, width .28s ease,
        flex-basis .28s ease, transform .28s ease, box-shadow .28s ease,
        border-color .28s ease, background-color .28s ease;
}

.site-header.app-header-compact,
.b2b-app .agent-topbar.app-header-compact {
    border-bottom-color: #d5e1ef;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 9px 26px rgba(15, 39, 78, .12);
}

@media (min-width: 992px) {
    .site-header.app-header-compact .main-navbar {
        min-height: 66px;
    }

    .site-header.app-header-compact .header-brand,
    .site-header.app-header-compact .header-logo-frame {
        height: 56px;
    }

    .site-header.app-header-compact .header-brand-logo {
        transform: scale(.92);
        transform-origin: left center;
    }
}

@media (min-width: 761px) {
    .b2b-app:not(.b2b-agent-sidebar-layout) .agent-topbar.app-header-compact {
        height: 68px;
    }

    .b2b-app:not(.b2b-agent-sidebar-layout) .agent-topbar.app-header-compact .agent-brand,
    .b2b-app:not(.b2b-agent-sidebar-layout) .agent-topbar.app-header-compact .agent-brand img {
        height: 52px;
    }
}

@media (max-width: 991.98px) {
    .site-header.app-header-compact .main-navbar {
        min-height: 60px;
    }

    .site-header.app-header-compact .header-brand {
        height: 54px;
    }

    .site-header.app-header-compact .header-logo-frame,
    .site-header.app-header-compact .header-brand-logo {
        height: 52px;
    }

    /* B2B mobile header height is tied to body and sheet offsets; compact visually only. */
    .b2b-app .agent-topbar.app-header-compact .agent-brand img {
        transform: scale(.92);
        transform-origin: left center;
    }
}

.app-search-dock {
    position: fixed;
    z-index: 1037;
    top: calc(var(--app-header-bottom) + 8px);
    left: 50%;
    display: grid;
    width: min(620px, calc(100% - 28px));
    min-height: 52px;
    padding: 6px 7px 6px 10px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    visibility: hidden;
    color: #17335f;
    border: 1px solid rgba(194, 211, 234, .96);
    border-radius: 15px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 13px 34px rgba(12, 39, 81, .18);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px);
    transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.app-search-dock.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.app-search-dock > i {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #155eef;
    border-radius: 11px;
    background: #edf4ff;
    font-size: .94rem;
}

.app-search-dock > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}

.app-search-dock strong,
.app-search-dock small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-search-dock strong {
    color: #102a54;
    font-size: .76rem;
    font-weight: 800;
}

.app-search-dock small {
    color: #71819a;
    font-size: .64rem;
    font-weight: 600;
}

.app-search-dock button {
    display: inline-flex;
    min-height: 40px;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    border: 0;
    border-radius: 11px;
    background: #155eef;
    box-shadow: 0 7px 16px rgba(21, 94, 239, .2);
    font-size: .69rem;
    font-weight: 800;
}

.app-search-dock button:focus-visible,
.app-back-to-top:focus-visible,
.app-rail-controls button:focus-visible,
.app-results-action-bar button:focus-visible,
.app-results-action-bar select:focus-visible {
    outline: 3px solid rgba(21, 94, 239, .28);
    outline-offset: 2px;
}

body.flight-filter-drawer-open .app-search-dock,
body.flight-details-modal-open .app-search-dock,
body.flight-fares-modal-open .app-search-dock,
body.hotel-filter-sheet-open .app-search-dock,
body.hotel-mobile-search-open .app-search-dock,
body.mobile-search-sheet-open .app-search-dock,
body.bus-filter-lock .app-search-dock,
body.mobile-menu-open .app-search-dock,
body.agent-nav-open .app-search-dock,
body.agent-dashboard-sidebar-open .app-search-dock {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.app-back-to-top {
    position: fixed;
    z-index: 1034;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + var(--app-safe-bottom));
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    visibility: hidden;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 50%;
    background: #155eef;
    box-shadow: 0 11px 28px rgba(17, 66, 164, .25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.94);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.app-back-to-top.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

@media (min-width: 480px) {
    body.app-has-support-fab .app-back-to-top {
        bottom: calc(82px + var(--app-safe-bottom));
    }
}

@media (max-width: 767.98px) {
    .flight-results-page.is-roundtrip-results .mobile-flight-actions {
        display: grid !important;
    }

    body.app-has-sticky-result-actions .app-back-to-top {
        bottom: calc(84px + var(--app-safe-bottom));
    }
}

body.flight-filter-drawer-open .app-back-to-top,
body.flight-details-modal-open .app-back-to-top,
body.flight-fares-modal-open .app-back-to-top,
body.hotel-filter-sheet-open .app-back-to-top,
body.hotel-mobile-search-open .app-back-to-top,
body.mobile-search-sheet-open .app-back-to-top,
body.bus-filter-lock .app-back-to-top,
body.mobile-menu-open .app-back-to-top,
body.agent-nav-open .app-back-to-top,
body.agent-dashboard-sidebar-open .app-back-to-top,
body.modal-open .app-back-to-top {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.app-scroll-enhanced .app-reveal-pending {
    opacity: 0;
    transform: translateY(14px);
}

.app-scroll-enhanced .app-reveal-pending.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .3s ease, transform .3s ease;
}

.app-rail-host {
    position: relative;
}

.app-rail-controls {
    position: absolute;
    z-index: 7;
    top: var(--app-rail-control-top, 50%);
    right: 5px;
    left: 5px;
    display: none;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.app-rail-controls[hidden] {
    display: none !important;
}

.app-rail-controls button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: #155eef;
    border: 1px solid #d7e2ef;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 7px 18px rgba(14, 45, 91, .18);
    pointer-events: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.app-rail-controls button:disabled {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.app-swipe-rail {
    scroll-behavior: smooth;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.app-image-loading {
    color: transparent;
    background: linear-gradient(100deg, #e9eff7 20%, #f8fbff 38%, #e9eff7 56%);
    background-size: 220% 100%;
    animation: app-image-skeleton 1.1s linear infinite;
}

@keyframes app-image-skeleton {
    to { background-position-x: -220%; }
}

@media (max-width: 991.98px) {
    .app-rail-controls {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    .app-search-dock {
        top: calc(var(--app-header-bottom) + 6px);
        width: calc(100% - 20px);
        min-height: 50px;
        border-radius: 14px;
    }

    .app-search-dock button {
        min-width: 44px;
        min-height: 44px;
        padding-inline: 11px;
    }

    .app-search-dock button span {
        display: none;
    }

    .home-destination-grid.app-swipe-rail,
    .home-package-grid.app-swipe-rail,
    .holiday-landing-page .holiday-destination-grid.app-swipe-rail,
    .holiday-landing-page .holiday-package-grid.app-swipe-rail,
    .b2b-app .holiday-destination-grid.app-swipe-rail {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        padding: 3px 1px 12px;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .home-destination-grid.app-swipe-rail::-webkit-scrollbar,
    .home-package-grid.app-swipe-rail::-webkit-scrollbar,
    .holiday-destination-grid.app-swipe-rail::-webkit-scrollbar,
    .holiday-package-grid.app-swipe-rail::-webkit-scrollbar {
        display: none;
    }

    .home-destination-grid.app-swipe-rail > *,
    .home-package-grid.app-swipe-rail > *,
    .holiday-landing-page .holiday-package-grid.app-swipe-rail > * {
        min-width: 0;
        flex: 0 0 calc((100% - 10px) / 2) !important;
        scroll-snap-align: start;
    }

    .holiday-landing-page .holiday-destination-grid.app-swipe-rail > *,
    .b2b-app .holiday-destination-grid.app-swipe-rail > * {
        min-width: 0;
        flex: 0 0 min(76vw, 270px) !important;
        scroll-snap-align: start;
    }

    /* B2B flight filters use the same bottom sheet already used by B2C. */
    .b2b-app .b2b-flight-results-page .flight-filter-backdrop {
        position: fixed;
        z-index: 1490;
        inset: 0;
        display: block;
        visibility: hidden;
        border: 0;
        background: rgba(7, 20, 41, .64);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .b2b-app .b2b-flight-results-page .flight-filter-backdrop.is-mobile-mounted {
        visibility: visible;
        pointer-events: auto;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-backdrop.is-mobile-open {
        opacity: 1;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sidebar.is-mobile-mounted {
        position: fixed;
        z-index: 1495;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex !important;
        width: 100%;
        max-width: none;
        height: min(86dvh, 720px);
        max-height: calc(100dvh - max(58px, env(safe-area-inset-top)));
        padding: 0;
        overflow: hidden;
        flex-direction: column;
        border: 0;
        border-radius: 26px 26px 0 0;
        background: #fff;
        box-shadow: 0 -18px 54px rgba(7, 20, 41, .26);
        transform: translateY(102%);
        transition: transform .22s cubic-bezier(.22, .9, .32, 1);
        overscroll-behavior: contain;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sidebar.is-mobile-mounted.is-mobile-open {
        transform: translateY(0);
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sidebar.is-mobile-mounted::before,
    .hotel-listing-page .hotel-filter-sidebar::before {
        position: absolute;
        z-index: 6;
        top: 8px;
        left: 50%;
        width: 38px;
        height: 4px;
        content: "";
        border-radius: 999px;
        background: #c7d2e2;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sidebar .filter-sidebar-head {
        min-height: 78px;
        padding: 1.2rem 1rem .72rem;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sidebar .mobile-filter-close {
        display: grid;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        place-items: center;
        border: 1px solid #e2e8f1;
        border-radius: 50%;
        background: #f7f9fc;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sheet-scroll {
        display: block;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        flex: 1 1 auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .b2b-app .b2b-flight-results-page .mobile-filter-sheet-actions {
        display: block;
        flex: 0 0 auto;
        padding: .7rem 1rem calc(.7rem + var(--app-safe-bottom));
        border-top: 1px solid #e5ebf3;
        background: #fff;
        box-shadow: 0 -9px 24px rgba(24, 51, 91, .08);
    }

    .b2b-app .b2b-flight-results-page .mobile-filter-sheet-actions > button {
        width: 100%;
        min-height: 52px;
        color: #fff;
        border: 0;
        border-radius: 13px;
        background: #155eef;
        font-weight: 800;
    }

    /* Fare and flight details stay anchored like the mobile search sheets. */
    .b2b-app .b2b-flight-results-page .flight-details-modal,
    .b2b-app .b2b-flight-results-page .flight-fares-modal {
        padding: max(58px, calc(env(safe-area-inset-top) + 50px)) 0 0;
        align-items: end;
        justify-items: stretch;
    }

    .b2b-app .b2b-flight-results-page .flight-details-dialog,
    .b2b-app .b2b-flight-results-page .flight-fares-dialog {
        width: 100%;
        max-width: none;
        height: calc(100dvh - max(58px, calc(env(safe-area-inset-top) + 50px)));
        max-height: calc(100dvh - max(58px, calc(env(safe-area-inset-top) + 50px)));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 26px 26px 0 0;
        transform: translateY(100%);
    }

    .b2b-app .b2b-flight-results-page .flight-details-modal.is-open .flight-details-dialog,
    .b2b-app .b2b-flight-results-page .flight-fares-modal.is-open .flight-fares-dialog {
        transform: translateY(0);
    }

    .b2b-app .b2b-flight-results-page .flight-details-modal-head {
        min-height: 76px;
        padding: 1rem 1rem .75rem;
    }

    .b2b-app .b2b-flight-results-page .flight-details-modal-head > button {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 50%;
    }

    .b2b-app .b2b-flight-results-page .flight-details-modal-scroll,
    .b2b-app .b2b-flight-results-page .flight-fares-modal-scroll {
        padding-bottom: calc(.9rem + var(--app-safe-bottom));
    }

    .b2b-app .b2b-flight-results-page .fare-options-flight-summary-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "airline" "schedule";
        gap: .6rem;
    }

    .b2b-app .b2b-flight-results-page .fare-options-flight-summary-inner > .flight-result-airline {
        width: 100%;
        min-width: 0;
        grid-area: airline;
    }

    .b2b-app .b2b-flight-results-page .fare-options-flight-summary-inner > .flight-result-schedule {
        width: 100%;
        min-width: 0;
        grid-area: schedule;
    }

    .b2b-app .b2b-flight-results-page .flight-modal-summary-card .flight-result-main {
        min-height: 0;
        padding: .72rem;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "airline" "schedule" "fare";
        gap: .65rem;
    }

    .b2b-app .b2b-flight-results-page .flight-modal-summary-card .flight-result-fare {
        display: flex;
        width: 100%;
        min-width: 0;
        padding-top: .58rem;
        align-items: baseline;
        justify-content: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: .2rem .45rem;
        border-top: 1px solid #e5ebf2;
        border-left: 0;
        text-align: left;
    }

    .b2b-app .b2b-flight-results-page .flight-modal-summary-card .flight-result-fare > span {
        flex: 0 0 100%;
    }

    /* Hotel filters are bottom sheets in both channels. */
    .hotel-listing-page .hotel-filter-sidebar {
        position: fixed !important;
        z-index: 1495 !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: min(86dvh, 720px);
        max-height: calc(100dvh - max(58px, env(safe-area-inset-top)));
        padding-bottom: var(--app-safe-bottom);
        overflow-y: auto;
        visibility: hidden;
        border: 0 !important;
        border-radius: 26px 26px 0 0 !important;
        background: #fff;
        box-shadow: 0 -18px 54px rgba(7, 20, 41, .26) !important;
        opacity: 0;
        pointer-events: none;
        transform: translateY(102%) !important;
        transition: transform .22s cubic-bezier(.22, .9, .32, 1), opacity .2s ease, visibility .22s ease !important;
        overscroll-behavior: contain;
    }

    .hotel-listing-page .hotel-filter-sidebar.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) !important;
    }

    .hotel-listing-page .hotel-filter-mobile-head {
        position: sticky;
        z-index: 7;
        top: 0;
        min-height: 72px;
        padding: 1.1rem 1rem .7rem;
        background: rgba(255, 255, 255, .98);
    }

    .hotel-listing-page .hotel-filter-mobile-head button {
        display: grid;
        width: 44px;
        height: 44px;
        padding: 0;
        place-items: center;
        border: 1px solid #e2e8f1;
        border-radius: 50%;
        background: #f7f9fc;
    }

    .hotel-listing-page .hotel-filter-backdrop {
        z-index: 1490 !important;
        background: rgba(7, 20, 41, .64) !important;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    /* Keep the app's Filters / Sort actions within thumb reach. */
    .hotel-listing-page {
        padding-bottom: calc(86px + var(--app-safe-bottom)) !important;
    }

    .hotel-listing-page .hotel-mobile-toolbar {
        position: fixed !important;
        z-index: 1068 !important;
        right: 8px;
        bottom: calc(8px + var(--app-safe-bottom));
        left: 8px;
        display: block !important;
        margin: 0 !important;
        padding: 8px !important;
        border-radius: 15px !important;
        background: rgba(255, 255, 255, .97) !important;
        box-shadow: 0 14px 38px rgba(8, 28, 60, .22) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .hotel-listing-page .hotel-result-count-mobile {
        display: none !important;
    }

    .hotel-listing-page .hotel-mobile-toolbar-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    }

    .app-results-action-bar {
        position: fixed;
        z-index: 1068;
        right: 8px;
        bottom: calc(8px + var(--app-safe-bottom));
        left: 8px;
        display: grid;
        min-height: 58px;
        padding: 7px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 7px;
        border: 1px solid #cedbeb;
        border-radius: 15px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 14px 38px rgba(8, 28, 60, .22);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .app-results-action-bar button,
    .app-results-action-bar label {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 0 12px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #24456f;
        border: 1px solid #d7e2ef;
        border-radius: 11px;
        background: #f8fbff;
        font-size: .78rem;
        font-weight: 800;
    }

    .app-results-action-bar i {
        color: #155eef;
    }

    .app-results-action-bar select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    .bus-results-page.app-has-results-bar {
        padding-bottom: calc(82px + var(--app-safe-bottom));
    }

    .bus-results-page.app-has-results-bar .bus-mobile-filter-button,
    .bus-results-page.app-has-results-bar .bus-results-toolbar > label {
        display: none !important;
    }

    /* Compact mobile flight filters without shrinking interactive targets. */
    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .filter-sidebar-head {
        min-height: 68px;
        padding: 1rem .875rem .5rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .sidebar-filter-section {
        padding: .5625rem .875rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .sidebar-filter-section legend {
        margin-bottom: .375rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .filter-choice-list:not(.airline-filter-list) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 .5rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .filter-choice-list label,
    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .preference-filter-list label {
        min-height: 44px;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .preference-filter-list {
        gap: 0;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .departure-filter-grid {
        gap: .375rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .departure-filter-grid label,
    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .departure-filter-grid span {
        min-height: 48px;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .departure-filter-grid span {
        padding: .25rem .1875rem;
        gap: .16rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .price-range-filter > span {
        margin-bottom: .3rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .flight-filter-sidebar .price-range-filter > small {
        margin-top: .1rem;
    }

    .b2b-app .b2b-flight-results-page .flight-filter-sidebar .b2b-filter-help {
        margin: -.125rem 0 .375rem;
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .mobile-filter-sheet-actions {
        padding: .5rem .875rem calc(.5rem + var(--app-safe-bottom));
    }

    :is(.flight-results-page:not(.b2b-flight-results-page), .b2b-app .b2b-flight-results-page)
    .mobile-filter-sheet-actions > button {
        min-height: 48px;
        padding: .55rem .875rem;
    }
}

/* Shared compact mobile flight controls and round-trip results. */
@media (max-width: 767.98px) {
    :is(.homepage-v2 .trip-switcher, .flight-listing-trip-switcher) {
        width: 100% !important;
        height: auto !important;
        min-height: 34px;
        margin-bottom: .4rem !important;
        padding: 0 !important;
        align-items: center;
        justify-content: flex-start !important;
        flex-wrap: nowrap;
        gap: .5rem !important;
        overflow: visible !important;
    }

    :is(.homepage-v2 .trip-switcher, .flight-listing-trip-switcher)
    > .trip-option:not([data-trip-type="multicity"]) {
        width: auto !important;
        min-width: 0 !important;
        min-height: 34px !important;
        padding: 0 .25rem !important;
        flex: 0 0 auto !important;
        justify-content: flex-start !important;
        gap: .32rem !important;
        font-size: .7rem !important;
        line-height: 1;
        white-space: nowrap;
    }

    :is(.homepage-v2 .trip-switcher, .flight-listing-trip-switcher)
    > .trip-option > span {
        width: 13px !important;
        height: 13px !important;
        flex: 0 0 13px;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-mobile-tabs {
        margin-bottom: .45rem !important;
        padding: 3px !important;
        gap: 3px !important;
        border-radius: 12px !important;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-mobile-tab {
        min-height: 44px !important;
        padding: .3rem .5rem !important;
        gap: .08rem !important;
        border-radius: 9px !important;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-mobile-tab > span {
        font-size: .69rem !important;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-mobile-tab > small {
        font-size: .54rem !important;
        line-height: 1.15;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-mobile-tab.is-complete::after {
        top: 5px;
        right: 6px;
        width: 14px;
        height: 14px;
        font-size: .5rem;
        line-height: 14px;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-journey-column {
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-journey-head {
        min-height: 0;
        padding: .25rem .1rem .45rem;
        gap: .5rem;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-journey-heading > span {
        font-size: .54rem;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-journey-heading > strong {
        margin-top: .1rem;
        font-size: .82rem;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-journey-heading > small {
        margin-top: .12rem;
        font-size: .56rem;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-starting-fare span,
    .flight-results-page.is-roundtrip-results .roundtrip-starting-fare small {
        font-size: .5rem;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-starting-fare strong {
        margin-top: .08rem;
        font-size: .8rem;
    }

    .flight-results-page.is-roundtrip-results .roundtrip-journey-list {
        padding: 0 !important;
        gap: .5rem;
        background: transparent !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-main {
        padding: .55rem !important;
        grid-template-columns: minmax(0, 1fr) minmax(96px, 104px) !important;
        grid-template-areas:
            "airline fare"
            "schedule schedule" !important;
        gap: .5rem .4rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-airline {
        padding: 0 !important;
        gap: .42rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .airline-logo-mark {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
        border-radius: 8px !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-airline strong {
        font-size: .72rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-airline > div > span {
        font-size: .57rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-fare {
        display: flex !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 0 1.45rem 0 0 !important;
        grid-template: none !important;
        align-items: flex-end !important;
        flex-direction: column !important;
        border: 0 !important;
        text-align: right !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-fare > span {
        font-size: .5rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-fare strong {
        margin-top: .08rem !important;
        font-size: .9rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .view-fares-button {
        min-width: 64px !important;
        min-height: 29px !important;
        margin-top: .2rem !important;
        padding: .28rem .42rem !important;
        font-size: .58rem !important;
        transform: translateX(1.45rem);
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .roundtrip-select-flight {
        top: .58rem !important;
        right: .5rem !important;
        width: 24px;
        height: 24px;
        margin: 0 !important;
        padding: 0 !important;
        border-width: 1.5px;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .roundtrip-select-flight i {
        font-size: .62rem;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-schedule {
        padding: .35rem 0 .08rem !important;
        grid-template-columns: minmax(56px, auto) minmax(76px, 1fr) minmax(56px, auto) !important;
        gap: .32rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-time-block strong {
        font-size: .94rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-time-block span {
        margin-top: .14rem;
        font-size: .64rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-time-block small {
        font-size: .52rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-route-line > span,
    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-route-line small {
        font-size: .54rem !important;
    }

    .flight-results-page.is-roundtrip-results .flight-result-meta {
        min-height: 34px !important;
        padding: .3rem .5rem !important;
        gap: .3rem .4rem !important;
    }

    .flight-results-page.is-roundtrip-results .flight-result-meta span,
    .flight-results-page.is-roundtrip-results .fare-details-toggle {
        font-size: .54rem !important;
    }

    .flight-results-page.is-roundtrip-results
    .roundtrip-flight-grid .flight-result-meta .fare-details-toggle {
        width: auto !important;
        max-width: 100%;
        min-height: 44px;
        padding: .45rem .55rem;
        justify-content: center;
        flex: 0 0 auto;
    }

    .b2b-app .flight-results-page.is-roundtrip-results .b2b-fare-family-strip {
        padding: .25rem .45rem;
        gap: .25rem;
        scrollbar-width: none;
    }

    .b2b-app .flight-results-page.is-roundtrip-results .b2b-fare-family-strip::-webkit-scrollbar {
        display: none;
    }

    .b2b-app .flight-results-page.is-roundtrip-results .b2b-fare-family-strip > span {
        padding: .22rem .38rem;
        gap: .2rem;
        font-size: .56rem;
    }

    .b2b-app .flight-results-page.is-roundtrip-results .b2b-fare-family-strip strong,
    .b2b-app .flight-results-page.is-roundtrip-results .b2b-fare-family-strip small {
        font-size: .56rem;
    }

    .flight-results-page.is-roundtrip-results .flight-selection-tray.is-roundtrip {
        padding: .38rem;
        grid-template-columns: minmax(0, 1fr) minmax(118px, 132px) !important;
        grid-template-rows: 48px !important;
        grid-template-areas: "legs action" !important;
        gap: .4rem;
        border-radius: 14px;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selection-flights {
        display: grid !important;
        width: 100%;
        grid-area: legs !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .3rem;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-flight {
        min-height: 48px;
        height: 48px;
        padding: .3rem .4rem;
        gap: .28rem;
        border-radius: 9px;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-airline em,
    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-price span {
        font-size: .46rem;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-airline strong,
    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-price strong {
        font-size: .61rem;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selection-total {
        display: none !important;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip #selectionProgress {
        display: none;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip > button {
        grid-area: action !important;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        height: 48px;
        padding: 0 .42rem;
        align-self: center;
        font-size: .66rem;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip > button span {
        overflow: hidden;
        color: white;
        font-size: 0 !important;
        line-height: 1;
        text-overflow: ellipsis;
        text-transform: none;
        white-space: nowrap;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip > button span::after {
        content: attr(data-mobile-label) !important;
        font-size: .66rem;
        font-weight: 750;
    }

    html.roundtrip-flight-results-active .flight-results-page {
        padding-bottom: calc(9.5rem + var(--app-safe-bottom)) !important;
    }

}

html.roundtrip-flight-results-active .app-back-to-top {
    display: none !important;
}

@media (max-width: 359.98px) {
    .flight-results-page.is-roundtrip-results .flight-selection-tray.is-roundtrip {
        grid-template-columns: minmax(0, 1fr) 112px !important;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-flight {
        padding-right: .22rem;
        padding-left: .22rem;
        gap: .15rem;
    }

    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip .roundtrip-selected-airline strong,
    .flight-results-page.is-roundtrip-results
    .flight-selection-tray.is-roundtrip > button i {
        display: none;
    }
}

@media (min-width: 768px) {
    .b2b-hotel-page .hotel-listing-page .hotel-filter-sidebar {
        top: calc(var(--app-header-bottom) + 12px) !important;
        max-height: calc(100dvh - var(--app-header-bottom) - 24px) !important;
    }
}

@media (min-width: 480px) {
    .support-fab.is-footer-near {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px) scale(.9);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    .site-header,
    .site-header *,
    .b2b-app .agent-topbar,
    .b2b-app .agent-topbar *,
    .app-search-dock,
    .app-back-to-top,
    .app-scroll-enhanced .app-reveal-pending,
    .app-scroll-enhanced .app-reveal-pending.is-visible,
    .app-image-loading,
    .app-swipe-rail,
    .service-offer-track,
    .holiday-offer-track,
    .flight-filter-sidebar,
    .flight-filter-backdrop,
    .flight-details-dialog,
    .flight-fares-dialog,
    .hotel-filter-sidebar,
    .hotel-filter-backdrop {
        scroll-behavior: auto !important;
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .app-scroll-enhanced .app-reveal-pending {
        opacity: 1 !important;
        transform: none !important;
    }
}
