/* ===== GFT Smooth Scroll (Lenis) — self-contained, removable ===== */

/* Lenis required rules */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* hide the native scrollbar only while Lenis is active */
html.lenis { scrollbar-width: none; -ms-overflow-style: none; }
html.lenis::-webkit-scrollbar,
html.lenis body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* custom auto-hiding overlay scrollbar */
.gft-sb {
  position: fixed; top: 0; right: 3px; width: 12px; height: 100vh;
  z-index: 99998; pointer-events: none;
}
/* The thumb is a single solid colour that flips per section (set inline by
   smooth.js to whichever palette colour contrasts with the background behind it,
   like the TOC rail) — no outline. The background here is only the pre-JS
   fallback until the first detection runs. */
.gft-sb__thumb {
  position: absolute; top: 0; right: 3px; width: 6px; min-height: 40px;
  box-sizing: border-box;
  border-radius: 0;
  background: var(--e-global-color-76c389d, rgba(90, 90, 105, .9));
  pointer-events: auto; cursor: grab;
  opacity: 0;
  transition: opacity .7s ease, background-color .35s ease !important;  /* slow fade-out; smooth colour flip */
}
.gft-sb.is-visible .gft-sb__thumb { opacity: 1; transition: opacity .12s ease, background-color .35s ease !important; }  /* quick fade-in */
.gft-sb__thumb:hover, .gft-sb.is-dragging .gft-sb__thumb { width: 7px; }
.gft-sb.is-dragging .gft-sb__thumb { cursor: grabbing; }

@media (prefers-reduced-motion: reduce) { .gft-sb { display: none; } }
