html.has-app-shell {
    overflow-x: hidden;
}

body.has-app-shell {
    overflow-x: hidden;
    background: #dbe3ef;
}

body.has-app-shell .bc_wrap {
    width: 100%;
    max-width: var(--app-max-width);
    margin-left: auto;
    margin-right: auto;
    background: var(--color-surface);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: var(--app-bottom-offset);
    position: relative;
    overflow-x: hidden;
}

body.has-app-shell .app-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--color-surface);
    box-shadow: var(--shadow-nav);
    border-top: 1px solid var(--color-border);
    display: flex;
    z-index: var(--z-bottom-nav);
}

body.has-app-shell .app-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: 1.1;
}

body.has-app-shell .app-bottom-nav__item svg {
    width: 22px;
    height: 22px;
    display: block;
}

body.has-app-shell .app-bottom-nav__item.is-active {
    color: var(--color-primary);
}

body.has-app-shell .app-bottom-nav__item:hover,
body.has-app-shell .app-bottom-nav__item:focus {
    color: var(--color-primary);
    text-decoration: none;
}

/* Auth screens hide the original BookingCore header/footer chrome, not the scripts. */
body.has-app-shell.is-auth-shell .bc_topbar,
body.has-app-shell.is-auth-shell .bc_header,
body.has-app-shell.is-auth-shell .bc_footer {
    display: none !important;
}

/* Home / landing shells: hide desktop chrome on this frontend only. Other pages keep header/footer. */
body.has-app-shell.is-home-shell .bc_topbar,
body.has-app-shell.is-home-shell .bc_header,
body.has-app-shell.is-home-shell .bc_footer,
body.has-app-shell.is-landing-shell .bc_topbar,
body.has-app-shell.is-landing-shell .bc_header,
body.has-app-shell.is-landing-shell .bc_footer,
body.has-app-shell.is-tour-shell .bc_topbar,
body.has-app-shell.is-tour-shell .bc_header,
body.has-app-shell.is-tour-shell .bc_footer,
body.has-app-shell.is-hotel-shell .bc_topbar,
body.has-app-shell.is-hotel-shell .bc_header,
body.has-app-shell.is-hotel-shell .bc_footer,
body.has-app-shell.is-visa-shell .bc_topbar,
body.has-app-shell.is-visa-shell .bc_header,
body.has-app-shell.is-visa-shell .bc_footer,
body.has-app-shell.is-car-shell .bc_topbar,
body.has-app-shell.is-car-shell .bc_header,
body.has-app-shell.is-car-shell .bc_footer,
body.has-app-shell.is-boat-shell .bc_topbar,
body.has-app-shell.is-boat-shell .bc_header,
body.has-app-shell.is-boat-shell .bc_footer,
body.has-app-shell.is-guide-shell .bc_topbar,
body.has-app-shell.is-guide-shell .bc_header,
body.has-app-shell.is-guide-shell .bc_footer,
body.has-app-shell.is-checkout-shell .bc_topbar,
body.has-app-shell.is-checkout-shell .bc_header,
body.has-app-shell.is-checkout-shell .bc_footer,
body.has-app-shell.is-booking-detail-shell .bc_topbar,
body.has-app-shell.is-booking-detail-shell .bc_header,
body.has-app-shell.is-booking-detail-shell .bc_footer,
body.has-app-shell.is-orders-shell .bc_topbar,
body.has-app-shell.is-orders-shell .bc_header,
body.has-app-shell.is-orders-shell .bc_footer {
    display: none !important;
}

body.has-app-shell.is-checkout-shell .app-bottom-nav,
body.has-app-shell.is-visa-apply-shell .app-bottom-nav {
    display: none !important;
}

body.has-app-shell.is-checkout-shell .bc_wrap {
    padding-bottom: calc(var(--checkout-cta-height, 92px) + var(--safe-bottom));
}

body.has-app-shell.user-page.is-orders-shell .bc_user_profile .col-md-3 {
    display: none !important;
}

body.has-app-shell.user-page.is-orders-shell .bc_user_profile .col-md-9 {
    flex: 0 0 100%;
    max-width: 100%;
}

body.has-app-shell.user-page.is-orders-shell .breadcrumb,
body.has-app-shell.user-page.is-orders-shell .title-bar,
body.has-app-shell.user-page.is-orders-shell .user-breadcrumb,
body.has-app-shell.user-page.is-visa-user-shell .breadcrumb,
body.has-app-shell.user-page.is-visa-user-shell .title-bar,
body.has-app-shell.user-page.is-visa-user-shell .user-breadcrumb {
    display: none !important;
}

body.has-app-shell.user-page.is-visa-user-shell .bc_user_profile .col-md-3 {
    display: none !important;
}

body.has-app-shell.user-page.is-visa-user-shell .bc_user_profile .col-md-9 {
    flex: 0 0 100%;
    max-width: 100%;
}

body.has-app-shell.is-auth-shell .bc_wrap {
    padding-bottom: var(--app-bottom-offset);
    background: transparent;
}

/* Keep original Home/Tour/Hotel content, but lift mobile booking CTAs above the nav. */
@media (max-width: 990px) {
    body.has-app-shell .bravo-more-book-mobile,
    body.has-app-shell .bc-more-book-mobile,
    body.has-app-shell .booking_cookie_agreement.fixed-bottom {
        bottom: var(--app-bottom-offset);
        max-width: var(--app-max-width);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
    }
}

body.has-app-shell.user-page .bc_user_profile {
    padding-bottom: 12px;
}

/* Debugbar is local-only and would cover the mobile shell. */
body.has-app-shell .phpdebugbar,
body.has-app-shell .phpdebugbar-openhandler,
body.has-app-shell .phpdebugbar-restore-btn {
    display: none !important;
}
