/* Shared native scrollbar appearance; scrolling and overflow remain unchanged. */
:root {
  --scrollbar-thumb: #8aabb7;
  --scrollbar-hover: #628d9d;
  --scrollbar-active: #087f8b;
}

@media (min-width: 701px) {
  html[data-view-mode="radar"] body:not(.phone-layout) {
    --scrollbar-thumb: #548768;
    --scrollbar-hover: #76ac8a;
    --scrollbar-active: #43cf7b;
  }

  /* These dialogs retain light surfaces in radar mode. */
  :is(#viewSettingsBox, #liveVideoBox, #simVideoBox) {
    --scrollbar-thumb: #8aabb7;
    --scrollbar-hover: #628d9d;
    --scrollbar-active: #087f8b;
  }
}

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

/* Fallback for browsers using WebKit scrollbar pseudo-elements. */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

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

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

@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
}
