/* Shared workbench scrollbars: 6px visible thumb, 4px edge clearance, 8px ends. */
html,
body * {
  scrollbar-width: thin;
  scrollbar-color: rgb(0 0 0 / 32%) transparent;
}
@supports selector(::-webkit-scrollbar) {
  html,
  body * {
    scrollbar-width: auto !important;
    scrollbar-color: auto !important;
  }
  ::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
    background: transparent !important;
  }
  ::-webkit-scrollbar-track {
    margin: 8px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  ::-webkit-scrollbar-thumb {
    background: rgb(0 0 0 / 32%) !important;
    background-clip: padding-box !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
  }
  ::-webkit-scrollbar-thumb:vertical {
    border-right: 4px solid transparent !important;
    min-height: 24px;
    min-width: 0;
  }
  ::-webkit-scrollbar-thumb:horizontal {
    border-bottom: 4px solid transparent !important;
    min-width: 24px;
    min-height: 0;
  }
  ::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  ::-webkit-scrollbar-corner {
    background: transparent !important;
  }
  /* The reference card already provides the 4px clearance outside its scroller. */
  .task-workspace .mb-reference-scroll::-webkit-scrollbar {
    width: 6px !important;
  }
  .task-workspace .mb-reference-scroll::-webkit-scrollbar-thumb:vertical {
    border-right: 0 !important;
  }
}

@supports selector(::-webkit-scrollbar) {
  .home-content-scroll::-webkit-scrollbar {
    width: 6px !important;
  }
  .home-content-scroll::-webkit-scrollbar-thumb:vertical {
    border-right: 0 !important;
  }
  .home-content-scroll::-webkit-scrollbar-track {
    margin: 8px 0 !important;
  }
}

/* Document track: 6px visible thumb with 4px clearance on both sides. */
@supports selector(::-webkit-scrollbar) {
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 14px !important;
    height: 14px !important;
  }
  html::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb {
    border: 4px solid transparent !important;
    border-radius: 7px !important;
    min-width: 0;
    min-height: 24px;
  }
  html::-webkit-scrollbar-thumb:vertical,
  body::-webkit-scrollbar-thumb:vertical {
    border-right: 4px solid transparent !important;
  }
  html::-webkit-scrollbar-thumb:horizontal,
  body::-webkit-scrollbar-thumb:horizontal {
    border-bottom: 4px solid transparent !important;
    min-width: 24px;
    min-height: 0;
  }
  html::-webkit-scrollbar-track,
  body::-webkit-scrollbar-track {
    margin: 8px 0 !important;
  }
}
