/* Site-wide scrollbar. Pages tune it through the --sb-* variables. */
:where(:root) {
  --sb-size: 10px;
  --sb-thumb: linear-gradient(180deg, #ff5fa8 0%, #b04ee8 55%, #6711b8 100%);
  --sb-thumb-hover: linear-gradient(180deg, #ff86bd 0%, #c56ff2 55%, #8434d6 100%);
  --sb-track: transparent;
  --sb-solid: #a24fd6;
  --sb-solid-track: transparent;
}

::-webkit-scrollbar {
  width: var(--sb-size);
  height: var(--sb-size);
}

::-webkit-scrollbar-track {
  background: var(--sb-track);
}

::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 3px solid transparent;
  border-radius: 999px;
  background-image: var(--sb-thumb);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  border-width: 2px;
  background-image: var(--sb-thumb-hover);
}

::-webkit-scrollbar-thumb:active {
  border-width: 2px;
}

::-webkit-scrollbar-corner,
::-webkit-scrollbar-button {
  display: none;
  background: transparent;
}

/* Firefox has no pseudo-elements; a solid thin bar in the same hue. Scoped
   to Firefox because in Chromium scrollbar-color disables the styles above. */
@supports (-moz-appearance: none) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--sb-solid) var(--sb-solid-track);
  }
}
