/* Apple-style scrollbar, shared by finudy.com and the cockpit (/scrollbar.css + /scrollbar.js).
   Add class="apple-scroll" to any scrolling element: a thin rounded thumb, hidden at rest, shown while scrolling
   (scrollbar.js sets .is-scrolling) or on hover, darker while grabbed; light and dark mode. */
/* light-dark() follows the page's own color-scheme: dark thumb on the light website, light thumb in the cockpit's dark mode */
.apple-scroll { --scroll-thumb: light-dark(rgb(0 0 0 / .3), rgb(255 255 255 / .32)); --scroll-thumb-active: light-dark(rgb(0 0 0 / .5), rgb(255 255 255 / .55)); }
/* Safari and Chrome: the macOS overlay look, inset from the edges and rounded corners */
.apple-scroll::-webkit-scrollbar { width: 11px; height: 11px; background: transparent; }
.apple-scroll::-webkit-scrollbar-track, .apple-scroll::-webkit-scrollbar-corner { background: transparent; }
.apple-scroll::-webkit-scrollbar-track { margin: 10px; }
.apple-scroll::-webkit-scrollbar-thumb { background-color: transparent; background-clip: padding-box; border: 3px solid transparent; border-radius: 99px; min-height: 36px; }
.apple-scroll:hover::-webkit-scrollbar-thumb, .apple-scroll.is-scrolling::-webkit-scrollbar-thumb { background-color: var(--scroll-thumb); }
.apple-scroll::-webkit-scrollbar-thumb:hover, .apple-scroll::-webkit-scrollbar-thumb:active { background-color: var(--scroll-thumb-active); border-width: 2px; }
/* Firefox has no ::-webkit-scrollbar: the standard thin scrollbar with the same colours */
@supports not selector(::-webkit-scrollbar) {
  .apple-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .3s; }
  .apple-scroll:hover, .apple-scroll.is-scrolling { scrollbar-color: var(--scroll-thumb) transparent; }
}
@media (prefers-reduced-motion: reduce) { .apple-scroll { transition: none; } }
