/* Overlay scrollbars.  Windows paints a permanent gray track for native
   scrollbars; hide them everywhere and let js/scrollbars.js draw translucent thumbs
   that appear on activity and fade out when the page is idle. */

* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

.ds-thumb {
  position: fixed;
  z-index: 1000;
  border-radius: 999px;
  background: var(--ds-thumb, rgba(0, 0, 0, .36));
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, width .12s, height .12s;
}
.ds-thumb.ds-visible { opacity: 1; pointer-events: auto; }
.ds-thumb:hover, .ds-thumb.ds-dragging { background: var(--ds-thumb-hover, rgba(0, 0, 0, .5)); }

.ds-thumb-v { width: 7px; }
.ds-thumb-v:hover, .ds-thumb-v.ds-dragging { width: 10px; }
.ds-thumb-h { height: 7px; }
.ds-thumb-h:hover, .ds-thumb-h.ds-dragging { height: 10px; }

/* Dark theme: light thumbs on dark surfaces.  The media block covers pages with no
   explicit data-theme (theme-boot.js normally sets one before first paint). */
[data-theme="dark"] .ds-thumb { background: rgba(255, 255, 255, .34); }
[data-theme="dark"] .ds-thumb:hover,
[data-theme="dark"] .ds-thumb.ds-dragging { background: rgba(255, 255, 255, .5); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ds-thumb { background: rgba(255, 255, 255, .34); }
  :root:not([data-theme="light"]) .ds-thumb:hover,
  :root:not([data-theme="light"]) .ds-thumb.ds-dragging { background: rgba(255, 255, 255, .5); }
}

body.ds-dragging-scrollbar { user-select: none; }
