/* Shared by the static pages and the React application. */
:root {
  --scrollbar-thumb: #83988B;
  --scrollbar-thumb-hover: #597A67;
  --scrollbar-thumb-active: #176448;
  --scrollbar-size: 10px;
  --scrollbar-page-size: 12px;
  scrollbar-gutter: stable;
}

:where(*) {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* Keep rounded thumbs and pointer feedback in Chromium and Safari. */
@supports selector(::-webkit-scrollbar) {
  :where(*) {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }

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

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

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

  ::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
  }

  ::-webkit-scrollbar-thumb:active {
    background-color: var(--scrollbar-thumb-active);
  }

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

@media (forced-colors: active) {
  :root {
    --scrollbar-thumb: ButtonText;
    --scrollbar-thumb-hover: Highlight;
    --scrollbar-thumb-active: Highlight;
  }
}
