/* ===== 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;
}
/* Fill = dynamic TEXT colour, ring = dynamic BACKGROUND colour (they are always a
   contrasting pair), so the thumb tracks the rotating palette and stays visible on any
   section. Grey/white fallbacks if the globals are ever unavailable. */
.gft-sb__thumb {
  position: absolute; top: 0; right: 3px; width: 8px; min-height: 40px;
  box-sizing: border-box;
  border-radius: 0;
  background: var(--e-global-color-76c389d, rgba(90, 90, 105, .9));
  border: 1px solid var(--e-global-color-a2cf421, rgba(255, 255, 255, .55));
  pointer-events: auto; cursor: grab;
  opacity: 0;
  transition: opacity .7s ease !important;              /* slow fade-out (beats theme's global transition) */
}
.gft-sb.is-visible .gft-sb__thumb { opacity: 1; transition: opacity .12s ease !important; }  /* quick fade-in */
.gft-sb__thumb:hover, .gft-sb.is-dragging .gft-sb__thumb { width: 9px; }
.gft-sb.is-dragging .gft-sb__thumb { cursor: grabbing; }

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