html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.custom-scrollbar {
  position: fixed;
  z-index: 1000;
  top: 18px;
  right: 5px;
  bottom: 18px;
  width: 12px;
  opacity: 0;
  cursor: pointer;
  touch-action: none;
  transition: opacity .32s ease;
}

.custom-scrollbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(169, 169, 162, .18) 8%, rgba(169, 169, 162, .18) 92%, transparent);
  transform: translateX(-50%);
}

.custom-scrollbar.is-scrolling {
  opacity: .68;
}

.custom-scrollbar:hover,
.custom-scrollbar.is-dragging {
  opacity: 1;
}

.custom-scrollbar.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.custom-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 5px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #a9a9a2;
  box-shadow: 0 0 10px rgba(169, 169, 162, .13);
  transform: translate3d(-50%, 0, 0);
  cursor: grab;
  will-change: transform, height;
  transition: width .22s ease, background .22s ease, box-shadow .22s ease;
}

.custom-scrollbar:hover .custom-scrollbar-thumb,
.custom-scrollbar.is-dragging .custom-scrollbar-thumb {
  width: 7px;
  background: #c4c4bd;
  box-shadow: 0 0 14px rgba(196, 196, 189, .2);
}

.custom-scrollbar.is-dragging .custom-scrollbar-thumb {
  cursor: grabbing;
}

html.custom-scroll-dragging,
html.custom-scroll-dragging body {
  user-select: none;
  cursor: grabbing;
}

@media (max-width: 700px) {
  .custom-scrollbar {
    top: 10px;
    right: 2px;
    bottom: 10px;
    width: 8px;
  }

  .custom-scrollbar-thumb {
    width: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-scrollbar,
  .custom-scrollbar-thumb {
    transition: none;
  }
}
