/*
 * Main viewport scrollbar — portal.html + module.html + login.html
 * Targets html and body so themed scrollbars apply regardless of which element scrolls.
 *
 * Track transparency: Chromium on Windows composites the track on an opaque layer,
 * so rgba on ::-webkit-scrollbar-track often looks solid. Use a transparent track
 * and let the page show through beside a semi-transparent thumb (transparent border).
 */

html,
body {
    scrollbar-width: thin;
    /* Firefox respects rgba on track more reliably than Chromium */
    scrollbar-color: rgba(222, 165, 127, 0.55) rgba(0, 0, 0, 0.5);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 14px;
    /* 50% transparent gutter — must be on the scrollbar widget, not track, on Windows Chrome */
    background: rgba(0, 0, 0, 0.5);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-track-piece,
body::-webkit-scrollbar-track-piece {
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background-color: rgba(222, 165, 127, 0.55);
    border-radius: 8px;
    /* Transparent border = see-through gutter (page background visible) */
    border: 3px solid transparent;
    background-clip: padding-box;
    min-height: 48px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 102, 0, 0.75);
}

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

/* Subtle 50% dark tint in the gutter without an opaque track layer */
html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active {
    background-color: rgba(255, 102, 0, 0.85);
}
