/* Shared scrollbar treatment for Gallery, Settings and anchored settings panels. */
:root {
  --scrollbar-thumb: color-mix(in srgb, var(--text, #eee) 18%, transparent);
  --scrollbar-thumb-hover: color-mix(in srgb, var(--text, #eee) 30%, transparent);
}
:is(body, body *, .ui-scrollbar, .gallery-scrollbar) {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
:is(body, body *, .ui-scrollbar, .gallery-scrollbar)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
:is(body, body *, .ui-scrollbar, .gallery-scrollbar)::-webkit-scrollbar-track,
:is(body, body *, .ui-scrollbar, .gallery-scrollbar)::-webkit-scrollbar-corner {
  background: transparent;
}
:is(body, body *, .ui-scrollbar, .gallery-scrollbar)::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: var(--scrollbar-thumb);
  background-clip: padding-box;
}
:is(body, body *, .ui-scrollbar, .gallery-scrollbar)::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

@media (forced-colors: active) {
  :is(body, body *, .ui-scrollbar, .gallery-scrollbar) { scrollbar-color: auto; }
}
