/* LĪVU KOKS gold scrollbar (public/js/scrollbar.js): a drawn pill replaces the browser scrollbar. */

.no-scrollbar {
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

html.gold-page {
  scrollbar-width: none;
}

html.gold-page::-webkit-scrollbar {
  display: none;
}

.gold-track {
  position: fixed;
  z-index: 1200;
  display: flex;
  justify-content: center;
  width: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.gold-track--page {
  top: 6px;
  right: 2px;
  bottom: 6px;
}

.gold-track.is-on {
  opacity: 1;
  pointer-events: auto;
}

.gold-track.is-off {
  display: none;
}

.gold-track__wrap {
  position: absolute;
  top: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  will-change: transform;
}

.gold-track__thumb {
  width: 4px;
  height: 100%;
  border-radius: 999px;
  background: #f5c518;
  box-shadow: 0 0 6px rgba(245, 197, 24, .45);
  cursor: grab;
  touch-action: none;
  transition: width .2s ease-out, box-shadow .2s ease-out;
}

.gold-track:hover .gold-track__thumb {
  width: 8px;
  box-shadow: 0 0 12px rgba(245, 197, 24, .75);
}

.gold-track.is-drag .gold-track__thumb {
  width: 8px;
  box-shadow: 0 0 14px rgba(245, 197, 24, .85);
  cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
  .gold-track,
  .gold-track__thumb {
    transition: none;
  }
}

@media print {
  .gold-track {
    display: none;
  }
}

/* Boxes that also scroll sideways: the vertical native bar is hidden, the horizontal one becomes a gold line. */
.no-vscrollbar::-webkit-scrollbar {
  width: 0;
  height: 6px;
}

.no-vscrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.no-vscrollbar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #f5c518;
}

/* Inside a modal <dialog>: positioned against the dialog. */
.gold-track--in {
  position: absolute;
}

/* Scrolling boxes: a faint bar at rest (the box can be scrolled), full on scroll / hover. */
.gold-track--rest {
  opacity: .45;
  pointer-events: auto;
}

.gold-track--rest.is-on {
  opacity: 1;
}
