/* =========================================================
   FUMIDESK — GLOBAL THEME-AWARE SCROLLBARS
   Applies the active color palette to every page, subpage,
   dialog, editor, list, textarea, and floating workspace.
========================================================= */

html,
body,
* {
    scrollbar-width: thin !important;
    scrollbar-color:
        color-mix(
            in srgb,
            var(--theme-primary, #6366f1) 78%,
            var(--ios-muted, #64748b)
        )
        transparent !important;
}

/* Chromium uses the custom track and thumb rules below. */
@supports selector(::-webkit-scrollbar) {
    html,
    body,
    * {
        scrollbar-width: auto !important;
        scrollbar-color: auto !important;
    }
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 9px !important;
    height: 9px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    margin: 4px 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    min-width: 34px !important;
    min-height: 34px !important;
    border: 2px solid transparent !important;
    border-radius: 999px !important;
    background:
        color-mix(
            in srgb,
            var(--theme-primary, #6366f1) 74%,
            var(--ios-muted, #64748b)
        ) !important;
    background-clip: padding-box !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: var(--theme-primary, #6366f1) !important;
    background-clip: padding-box !important;
}

html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    -webkit-appearance: none !important;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
    background: transparent !important;
}
