/*
 * Directional Horizontal Scroll 1.0.5
 *
 * Layout-neutral by default.
 * The base classes are JavaScript hooks only and intentionally do not alter
 * an existing builder's display, width, max-width, height, min-height,
 * margins, padding, flex behaviour, or positioning.
 */

/* Prevent CSS smooth scrolling from fighting GSAP when scrollLeft is animated. */
.hscroll-section[data-hscroll-mode="scroll-track"] .hscroll-track {
  scroll-behavior: auto !important;
}

/* Optional clipping. Add this class explicitly only when a transform layout
 * creates unwanted document-level horizontal overflow. */
.hscroll-clip {
  overflow-x: clip;
}

/* Optional full-bleed helper. It has no effect unless explicitly added. */
.hscroll-full-bleed {
  width: 100vw;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

/*
 * Optional plugin-provided layout.
 * Existing Spectra/UAGB sections must NOT use hscroll-layout-default.
 */
.hscroll-section.hscroll-layout-default {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  max-width: none !important;
}

.hscroll-section.hscroll-layout-default .hscroll-track {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  max-width: none !important;
}

.hscroll-section.hscroll-layout-default .hscroll-track > * {
  flex-shrink: 0;
}

.hscroll-section.hscroll-layout-default .hscroll-panel {
  box-sizing: border-box;
  flex: 0 0 min(82vw, 1200px);
  min-height: 100vh;
  min-height: 100svh;
}

@media (max-width: 781px), (prefers-reduced-motion: reduce) {
  .hscroll-section.hscroll-layout-default {
    min-height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .hscroll-section.hscroll-layout-default .hscroll-track {
    min-height: auto;
    transform: none !important;
  }

  .hscroll-section.hscroll-layout-default .hscroll-panel {
    min-height: auto;
  }
}
