/* =========================================================
   SLIM SCROLLBAR (ALL PAGES)
   Neutral grey that works on both the dark and light themes.
   !important: the theme's .scrollbar rules are more specific
   and hide the bar until hover.
========================================================= */

/* Firefox has no ::-webkit-scrollbar */
@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin !important;
        scrollbar-color: rgba(128, 140, 160, .5) transparent !important;
    }
}

@supports selector(::-webkit-scrollbar) {

    /* The theme sets these on some elements, and they turn off the styles below in Chrome and Edge */
    * {
        scrollbar-width: auto !important;
        scrollbar-color: auto !important;
    }

    ::-webkit-scrollbar {
        visibility: visible !important;
        width: 8px !important;
        height: 8px !important;
        background: transparent !important;
    }

    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-corner {
        background: transparent !important;
    }

    /* The clear border keeps the bar slim but easy to grab */
    ::-webkit-scrollbar-thumb {
        visibility: visible !important;
        border: 2px solid transparent !important;
        border-radius: 8px !important;
        background-color: rgba(128, 140, 160, .45) !important;
        background-clip: padding-box !important;
    }

    ::-webkit-scrollbar-thumb:hover,
    ::-webkit-scrollbar-thumb:active {
        background-color: rgba(128, 140, 160, .75) !important;
    }

    ::-webkit-scrollbar-button {
        display: none !important;
    }
}

/* SimpleBar draws its own bar with scripts */
.simplebar-scrollbar::before {
    background: rgba(128, 140, 160, .6);
}
