/* ═══════════════════════════════════════════════════════════════════════════
   Global minimal scrollbar
   A subtle, theme-aware scrollbar that fits the minimalist design instead of
   the chunky native bars. Thumb colour derives from --c42-color-fg, so it adapts
   to light/dark automatically; tune via the --c42-scrollbar-* tokens.

   Tokens (see tokens.css):
     --c42-scrollbar-size        track/thumb thickness (default 10px)
     --c42-scrollbar-thumb       thumb colour
     --c42-scrollbar-thumb-hover thumb colour on hover
   ═══════════════════════════════════════════════════════════════════════════ */

/* Firefox / standard. `scrollbar-width` and `scrollbar-color` inherit, so
   declaring them on the root cascades to every scroll container. */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--c42-scrollbar-thumb, rgba(17, 24, 39, 0.22)) transparent;
}

/* WebKit / Chromium (Chrome, Safari, Edge). */
*::-webkit-scrollbar {
  width: var(--c42-scrollbar-size, 10px);
  height: var(--c42-scrollbar-size, 10px);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--c42-scrollbar-thumb, rgba(17, 24, 39, 0.22));
  border-radius: 999px;
  /* A transparent border clipped to the padding box leaves breathing room around
     the thumb, producing a slim, inset pill rather than a full-width bar. */
  border: 3px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--c42-scrollbar-thumb-hover, rgba(17, 24, 39, 0.38));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}
