/* Keep native scrolling while blending the OS rails into its navy surfaces. */
html,
body,
.sidebar .navscroll,
.workspace,
.content {
  scrollbar-width: thin;
  scrollbar-color: #4c6e8d rgba(8, 18, 35, .22);
}

/* Modern Chromium also supports scrollbar-width/color. Reset those properties
   here so its custom scrollbar pieces, including hidden arrows, take effect. */
@supports selector(::-webkit-scrollbar) {
  html,
  body,
  .sidebar .navscroll,
  .workspace,
  .content {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  .sidebar .navscroll::-webkit-scrollbar,
  .workspace::-webkit-scrollbar,
  .content::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    background: transparent;
  }

  html::-webkit-scrollbar-track,
  body::-webkit-scrollbar-track,
  .sidebar .navscroll::-webkit-scrollbar-track,
  .workspace::-webkit-scrollbar-track,
  .content::-webkit-scrollbar-track {
    background: rgba(8, 18, 35, .22);
    border-radius: 10px;
  }

  html::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb,
  .sidebar .navscroll::-webkit-scrollbar-thumb,
  .workspace::-webkit-scrollbar-thumb,
  .content::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(105, 162, 190, .65), rgba(60, 93, 127, .65));
    background-clip: padding-box;
  }

  html::-webkit-scrollbar-thumb:hover,
  body::-webkit-scrollbar-thumb:hover,
  .sidebar .navscroll::-webkit-scrollbar-thumb:hover,
  .workspace::-webkit-scrollbar-thumb:hover,
  .content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(123, 205, 224, .85), rgba(69, 133, 170, .85));
    background-clip: padding-box;
  }

  html::-webkit-scrollbar-button,
  body::-webkit-scrollbar-button,
  .sidebar .navscroll::-webkit-scrollbar-button,
  .workspace::-webkit-scrollbar-button,
  .content::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }

  html::-webkit-scrollbar-corner,
  body::-webkit-scrollbar-corner,
  .sidebar .navscroll::-webkit-scrollbar-corner,
  .workspace::-webkit-scrollbar-corner,
  .content::-webkit-scrollbar-corner {
    background: transparent;
  }
}

@media (forced-colors: active) {
  html,
  body,
  .sidebar .navscroll,
  .workspace,
  .content {
    scrollbar-width: thin;
    scrollbar-color: auto;
  }
}
