/* Shared "fullscreen expand" overlay for public-facing section widgets
 * (Organizations Map, Calendar Grid, Community Calendar). Same idea as the
 * Website Builder's own body-level fullscreen (wb-fullscreen): the toggled
 * widget takes over the viewport AND the surrounding site header/footer are
 * explicitly hidden (not just covered) - a fixed-position overlay alone isn't
 * enough since some floating chrome (trial banners, cookie-consent bar) can
 * sit at a higher z-index than any one widget wants to claim.
 * See web/js/section-fullscreen-toggle.js (toggles body.has-section-fullscreen
 * whenever any widget on the page is expanded).
 */
/* Same site-chrome hide-list as the builder's body.wb-fullscreen, plus the
 * public-site-only floating widgets it never had to consider (cookie
 * consent, scroll-to-top, mobile persistent icons) - the goal is that ONLY
 * the fullscreen widget itself is visible, nothing else. */
body.has-section-fullscreen header,
body.has-section-fullscreen footer,
body.has-section-fullscreen .breadcrumb,
body.has-section-fullscreen .language-switcher-floating,
body.has-section-fullscreen #section-nav,
body.has-section-fullscreen #mascot-container,
body.has-section-fullscreen #cookie-consent-banner,
body.has-section-fullscreen #scroll-to-top-btn,
body.has-section-fullscreen .mobile-persistent-icons {
    display: none !important;
}

.is-section-fullscreen {
    position: fixed !important;
    inset: 0;
    z-index: 1060; /* above Bootstrap modals (1050), matches page-transition-loader.css */
    overflow-y: auto;
    /* Deliberately NOT locking html/body overflow here: with inset:0 and zero
     * margin (enforced in JS - see section-fullscreen-toggle.js), this box
     * already covers the exact viewport at any scroll position, so the page
     * behind it is invisible regardless of whether it can still scroll.
     * Locking overflow used to be a belt-and-suspenders measure, but toggling
     * overflow:hidden resets the scroll box's position in most browsers and
     * it does not come back on its own - so it actively caused the page to
     * jump to the top when closing. overscroll-behavior below stops wheel/
     * touch scroll from chaining through to the page once this box's own
     * content hits its start/end, which is all the containment actually
     * needed. */
    overscroll-behavior: contain;
    background: var(--bs-body-bg, var(--bg-primary, #fff));
    padding: 1rem;
    margin: 0 !important;
}

/* Let the map / calendar grids grow to actually use the extra space instead
 * of keeping their normal-flow height. */
.is-section-fullscreen .org-map-leaflet,
.is-section-fullscreen .org-map-row,
.is-section-fullscreen .org-map-panel-col {
    height: calc(100vh - 8rem) !important;
}
.is-section-fullscreen .calendar-grid-widget .container,
.is-section-fullscreen .community-calendar {
    max-width: none;
}

.wb-section-fullscreen-btn {
    flex-shrink: 0;
}
