/* ARK SCROLLBAR V2 — Edge/Chrome without arrow buttons; Firefox thin.
   Important: scrollbar-width: thin forces native scrollbar implementation in
   Chromium and may ignore the WebKit button styling. Override it to auto for
   Chromium before styling the WebKit scrollbar pseudo-elements.
   This stylesheet does not alter overflow, width/height, or app layout. */

/* Firefox and browsers without WebKit scrollbar pseudo-elements. */
html, html * {
  scrollbar-width: thin !important;
  scrollbar-color: var(--accent, #e11d2e) transparent !important;
}

/* Chromium/Edge/Safari: give WebKit scrollbar pseudo-elements precedence. */
@supports selector(::-webkit-scrollbar) {
  html, html * {
    scrollbar-width: auto !important;
    scrollbar-color: auto !important;
  }

  html::-webkit-scrollbar,
  html *::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
    background: transparent !important;
  }

  html::-webkit-scrollbar-track,
  html *::-webkit-scrollbar-track,
  html::-webkit-scrollbar-track-piece,
  html *::-webkit-scrollbar-track-piece,
  html::-webkit-scrollbar-corner,
  html *::-webkit-scrollbar-corner {
    background: transparent !important;
    border: 0 !important;
  }

  html::-webkit-scrollbar-thumb,
  html *::-webkit-scrollbar-thumb {
    background: var(--accent, #e11d2e) !important;
    border: 0 !important;
    border-radius: 99px !important;
  }

  html::-webkit-scrollbar-thumb:hover,
  html *::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover, var(--accent, #e11d2e)) !important;
  }

  /* Remove top/bottom and left/right arrow controls in all orientations. */
  html::-webkit-scrollbar-button,
  html *::-webkit-scrollbar-button,
  html::-webkit-scrollbar-button:single-button,
  html *::-webkit-scrollbar-button:single-button,
  html::-webkit-scrollbar-button:double-button,
  html *::-webkit-scrollbar-button:double-button,
  html::-webkit-scrollbar-button:vertical:decrement,
  html *::-webkit-scrollbar-button:vertical:decrement,
  html::-webkit-scrollbar-button:vertical:increment,
  html *::-webkit-scrollbar-button:vertical:increment,
  html::-webkit-scrollbar-button:horizontal:decrement,
  html *::-webkit-scrollbar-button:horizontal:decrement,
  html::-webkit-scrollbar-button:horizontal:increment,
  html *::-webkit-scrollbar-button:horizontal:increment {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
    -webkit-appearance: none !important;
  }
}
