/**
 * Lenis Smooth Scroll Styles
 * Essential CSS for butter-smooth scrolling
 */

/* Lenis requires html to have smooth scroll disabled (it handles it) */
html.lenis, html.lenis body {
  height: auto;
}

/* Ensure smooth scrolling is handled by Lenis, not CSS */
html {
  scroll-behavior: auto !important;
}

/* Lenis scroll container */
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* When Lenis is stopped (e.g., modal open) */
.lenis.lenis-stopped {
  overflow: hidden;
}

/* Scrolling state (useful for hiding elements during scroll) */
.lenis.lenis-scrolling .hide-on-scroll {
  opacity: 0;
  pointer-events: none;
}

/* Smooth transitions for scroll-linked elements */
[data-lenis-scroll-snap-align] {
  scroll-snap-align: var(--lenis-scroll-snap-align, start);
}

/* Ensure nested scrollable areas work correctly */
.md-sidebar__scrollwrap,
.md-content__inner,
[data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* Prevent Lenis from affecting sidebar scroll */
.md-sidebar--primary .md-sidebar__scrollwrap,
.md-sidebar--secondary .md-sidebar__scrollwrap {
  overflow-y: auto !important;
}

/* Prevent Lenis from affecting search scroll */
.md-search__scrollwrap,
.md-search-result,
.md-search__output {
  overflow-y: auto !important;
}
