/* App-wide scrollbars: a thin rounded thumb that floats on a transparent track, no arrow buttons, and a
   darker thumb under the pointer. Replaces the chunky grey Windows default with its up/down arrows.

   Low specificity on purpose: DevExpress grids hide the native bar on their own scroller
   (.dxbl-scroll-viewer > .dxbl-scroll-viewer-content) and draw their own, and a few components
   (tab strip, header menu, search results, dashboard cards) style theirs. Their more specific
   rules still win.

   Chromium (Edge, Chrome, the MAUI WebView2) gets the ::-webkit-scrollbar rules only. Since Chrome 121,
   setting the standard scrollbar-width / scrollbar-color on an element makes Chromium IGNORE its
   ::-webkit-scrollbar styling and fall back to a plainer bar, so the standard properties are given to
   Firefox alone. Colours come from the theme text colour, so light and dark themes both work. */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

/* The transparent border plus padding-box clip leaves a 6px pill with 2px of air on each side. */
::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, var(--bs-body-color) 22%, transparent);
    border: 2px solid transparent;
    border-radius: 10px;
    background-clip: padding-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: color-mix(in srgb, var(--bs-body-color) 40%, transparent);
    }

    ::-webkit-scrollbar-thumb:active {
        background-color: color-mix(in srgb, var(--bs-body-color) 55%, transparent);
    }

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

@supports (-moz-appearance: none) {
    :where(*) {
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--bs-body-color) 28%, transparent) transparent;
    }
}
