:root {
  --np-scrollbar-z: 120;
}

html {
  scroll-behavior: smooth;
}

html.is-wheel-smooth {
  scroll-behavior: auto;
}

html.is-viewport-zoomed,
html.is-viewport-zoomed body,
html.has-custom-scrollbar,
html.has-custom-scrollbar body {
  scrollbar-width: none;
}

html.is-viewport-zoomed::-webkit-scrollbar,
html.is-viewport-zoomed body::-webkit-scrollbar,
html.has-custom-scrollbar::-webkit-scrollbar,
html.has-custom-scrollbar body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.np-scrollbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 11px;
  height: 100vh;
  z-index: var(--np-scrollbar-z);
  opacity: 0;
  transform-origin: center right;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  pointer-events: auto;
}

.np-scrollbar:hover {
  transform: scaleX(1.35);
}

.np-scrollbar:hover,
.np-scrollbar.is-active,
html.has-custom-scrollbar-dragging .np-scrollbar {
  opacity: 1;
}

.np-scrollbar[hidden] {
  display: none;
}

.np-scrollbar__thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  min-height: 56px;
  border-radius: 999px;
  background: rgba(143, 150, 157, 0.72);
  cursor: grab;
}

html.has-custom-scrollbar-dragging .np-scrollbar__thumb {
  cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
  html,
  html * {
    scroll-behavior: auto !important;
  }
}
