/* ============================================================
   RND — MOBILE SIDE SLIDE SCROLL
   Keep BeTheme's menu; let the document handle page swipes
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    /* The parent animates body left/right as well as the drawer. Keep the
       page still, so only the fixed drawer moves on touch devices. */
    body.mobile-side-slide {
        left: 0 !important;
        right: 0 !important;
    }

    /* A closed off-screen scroller must not catch gestures or focus. Delay
       visibility only while closing, to retain the parent's slide animation. */
    body.mobile-side-slide #Side_slide {
        visibility: hidden;
        pointer-events: none;
        transition: visibility 0s linear 300ms;
        box-sizing: border-box;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y pinch-zoom;
    }
    body.mobile-side-slide.side-slide-is-open #Side_slide {
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    /* The parent's overlay fades out after removing the open class. Release
       input immediately; scrolling must not wait for that fade to finish. */
    body.mobile-side-slide #body_overlay {
        pointer-events: none;
        touch-action: none;
    }
    body.mobile-side-slide.side-slide-is-open #body_overlay {
        pointer-events: auto;
    }

    @supports (overflow: clip) {
        /* overflow-x:hidden makes overflow-y compute to auto. Replace it on
           page wrappers only, without altering deliberate modal/lightbox locks. */
        html:has(body.mobile-side-slide):not(.mfn-popup-browser-scroll-disabled):not(.mfn-ofcs-opened):not(:has(dialog[open], .mfp-wrap, .pswp--open)),
        html:not(.mfn-popup-browser-scroll-disabled):not(.mfn-ofcs-opened):not(:has(dialog[open], .mfp-wrap, .pswp--open)) body.mobile-side-slide {
            overflow-x: clip;
            overflow-y: visible;
        }
        html:not(.mfn-popup-browser-scroll-disabled):not(.mfn-ofcs-opened):not(:has(dialog[open], .mfp-wrap, .pswp--open)) body.mobile-side-slide #Wrapper {
            display: flow-root;
            overflow-x: clip;
            overflow-y: visible;
        }
    }
}
