/* Scrollbars – landing page, Admin portal and Resident portal.
   Replaces the browser's grey bar (with arrow buttons) on the page and on every scrolling
   box (tables, pop-ups, panels). The sidebar menu keeps its own style (sidebar-scroll.css).
   Colours follow the three themes (Warm Light / Medium Dark / Dark, assets/js/theme-picker.js):
   a soft pill in the theme's grey that turns the Hive orange when pointed at.
   Note for other stylesheets: in Chrome / Edge, setting scrollbar-color or scrollbar-width on a box switches it back
   to the browser's own bar (with arrow buttons) – put those two inside @supports not selector(::-webkit-scrollbar). */
:root, [data-theme="dark"] { --sc-thumb: rgba(184,184,184,.30); --sc-thumb-hover: var(--brand-alt, #FF8E1C); --sc-track: #0B1114; }
[data-tone="medium"] { --sc-thumb: rgba(196,196,196,.32); --sc-thumb-hover: var(--brand-alt, #FF8E1C); --sc-track: #2B2C30; }
[data-theme="light"] { --sc-thumb: rgba(136,136,136,.50); --sc-thumb-hover: #E9780B; --sc-track: #F8F6EF; }

/* Chrome, Edge, Safari */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track, .main::-webkit-scrollbar-track { background: var(--sc-track); }
::-webkit-scrollbar-thumb {
    background-color: var(--sc-thumb);
    border-radius: 999px;
    border: 3px solid transparent;          /* slim pill that floats inside the gutter */
    background-clip: padding-box;
    min-height: 44px;
    min-width: 44px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--sc-thumb-hover); border-width: 2px; }
::-webkit-scrollbar-thumb:active { background-color: var(--sc-thumb-hover); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }   /* no arrow buttons */
::-webkit-scrollbar-corner { background: transparent; }

/* Firefox (no ::-webkit-scrollbar support) */
@supports not selector(::-webkit-scrollbar) {
    * { scrollbar-width: thin; scrollbar-color: var(--sc-thumb) transparent; }
    html { scrollbar-color: var(--sc-thumb) var(--sc-track); }
}
