/**
 * Style X Gadget — Mobile App-Like Enhancements (v3.145.0)
 * Progressive enhancement CSS. No-ops on unsupported browsers.
 *
 * v3.152.31 — REMOVED @view-transition{navigation:auto} + the
 * :root:has([data-xoro-vt]) block. This was a SECOND copy of the same rule
 * that existed in header.php, and it was THE cause of the "page stuck /
 * never loads" issue in Instagram's in-app browser. The View Transitions API
 * forces the browser to capture a full-page snapshot on every navigation
 * then cross-fade it with the new page — in in-app WebViews (Instagram,
 * Facebook, TikTok) this snapshot capture is so slow that navigation appears
 * frozen for several seconds. Full Chrome mobile handles it fine. Removed
 * completely. Page navigation is now native + instant in ALL browsers.
 */

/* Dynamic viewport height fallbacks (iOS 14 WKWebView doesn't support dvh). */
.xoro-dvh {
    height: 100vh;
    height: 100dvh;
}
.xoro-min-dvh {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Safe-area helpers (in-app browsers with toolbars). */
.xoro-safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.xoro-safe-top {
    padding-top: env(safe-area-inset-top, 0px);
}
.xoro-safe-bottom-margin {
    margin-bottom: env(safe-area-inset-bottom, 0px);
}

/* In-app browser adaptations (body.xoro-in-app set by functions.php UA detection). */
body.xoro-in-app .xoro-prefetch-aggressive {
    /* Hook class — JS reads body class to tune prefetch aggressiveness. */
}
/* In-app browsers throttle background timers — pause hero slider when tab hidden. */
body.xoro-in-app .xoro-hero-slider {
    will-change: transform;
}

/* Respect reduced motion globally (in-app browsers may have it on by default). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Touch-action: manipulation on all interactive elements (removes 300ms tap delay on legacy WebViews). */
button, a, input, select, textarea, [role="button"], [onclick] {
    touch-action: manipulation;
}
