/* assets/css/page-transitions.css — smooth page changes (DESIGN.md Foundations). Loaded on every page by
   index.php. Works with the top progress bar from tap-feedback.js: the bar runs while the next page
   loads, then the new page cross-fades in. */

/* ── Smooth page changes: cross-document View Transitions (Chrome/Edge 126+, Safari 18.2+; other
   browsers just load the next page). A quick cross-fade; none when the phone asks for less motion. ── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* ── Page preloader (index.php): only shows if a page takes longer than 0.6 s, so normal page
   changes (and their View Transition) don't flash a white spinner; dark in dark mode. ── */
#page-preloader { background: var(--bbm-bg) !important; animation: bbm-preloader-in 0s linear .6s both; }
#page-preloader .spinner { border-color: var(--bbm-border) !important; border-top-color: var(--bbm-brand) !important; }
/* (batch 12 A3) Dark from the first paint: the app's dark mode is known from <html data-bs-theme> before body.dark
   exists, and a dark page (TV, Go Live, Reels) shows its own colour and skeleton (index.php .pl-dark) */
html[data-bs-theme="dark"] #page-preloader { background: #020d0b !important; }
html[data-bs-theme="dark"] #page-preloader .spinner { border-color: #1f2b28 !important; border-top-color: #2bd4a8 !important; }
#page-preloader.pl-dark { background: var(--pl-bg) !important; }
@keyframes bbm-preloader-in { from { visibility: hidden; } to { visibility: visible; } }
