/* ==========================================================================
   Flybeep centralized scrollbars: globally hidden, opt-in theme-adaptive.
   Shared by the staff app (templates/base.html) and public site (templates/website/base.html).
   Preserves native wheel, trackpad, touch, and keyboard scrolling everywhere.
   ========================================================================== */

:root {
    --fb-scroll-size: 0.5rem;
    --fb-scroll-inset: 0.125rem;
    --fb-scroll-radius: 9999px;
    --fb-scroll-track: transparent;
    --fb-scroll-thumb: rgba(204, 43, 36, 0.28);
    --fb-scroll-thumb-hover: rgba(204, 43, 36, 0.48);
    --fb-scroll-thumb-active: rgba(204, 43, 36, 0.68);
}

[data-theme="light"] {
    --fb-scroll-track: transparent;
    --fb-scroll-thumb: rgba(204, 43, 36, 0.28);
    --fb-scroll-thumb-hover: rgba(204, 43, 36, 0.48);
    --fb-scroll-thumb-active: rgba(204, 43, 36, 0.68);
}

@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --fb-scroll-track: transparent;
        --fb-scroll-thumb: rgba(255, 107, 99, 0.28);
        --fb-scroll-thumb-hover: rgba(255, 107, 99, 0.46);
        --fb-scroll-thumb-active: rgba(255, 107, 99, 0.68);
    }
}

[data-theme="dark"] {
    --fb-scroll-track: transparent;
    --fb-scroll-thumb: rgba(255, 107, 99, 0.28);
    --fb-scroll-thumb-hover: rgba(255, 107, 99, 0.46);
    --fb-scroll-thumb-active: rgba(255, 107, 99, 0.68);
}

/* Global scrollbar hiding across Chrome, Edge, Firefox, Safari, iOS & Android WebView */
html,
body,
*,
html .nav-links {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Opt-in scrollbar utility for desktop fine-pointer containers if ever needed */
@media (hover: hover) and (pointer: fine) {
    .fb-scroll-visible::-webkit-scrollbar {
        display: block;
        width: var(--fb-scroll-size);
        height: var(--fb-scroll-size);
    }

    .fb-scroll-visible::-webkit-scrollbar-track {
        background: var(--fb-scroll-track);
    }

    .fb-scroll-visible::-webkit-scrollbar-thumb {
        background-color: var(--fb-scroll-thumb);
        border-radius: var(--fb-scroll-radius);
        border: var(--fb-scroll-inset) solid transparent;
        background-clip: content-box;
    }

    .fb-scroll-visible::-webkit-scrollbar-thumb:hover {
        background-color: var(--fb-scroll-thumb-hover);
    }

    .fb-scroll-visible::-webkit-scrollbar-thumb:active {
        background-color: var(--fb-scroll-thumb-active);
    }

    .fb-scroll-visible::-webkit-scrollbar-corner {
        background: transparent;
    }

    @supports (scrollbar-color: auto) and (not selector(::-webkit-scrollbar)) {
        .fb-scroll-visible {
            scrollbar-width: thin;
            scrollbar-color: var(--fb-scroll-thumb) var(--fb-scroll-track);
        }
    }
}
