/**
 * Ionis Slider — structural styles.
 * Visual/design styles to be added once the slider is confirmed working.
 */

/* ============================================================
   VIEWPORT & SLIDES
   ============================================================ */
.ionis-slider {
  position: relative;
}

.ionis-slider__viewport {
  position: relative;
  overflow: hidden;
}

/* Show all slides before JS enhances the carousel. */
.ionis-slider__slide {
  display: block;
}

/* JS adds .js-slider-init on the root once attach() runs,
   then hides non-active slides. */
.js-slider-init .ionis-slider__slide {
  display: none;
}

.js-slider-init .ionis-slider__slide.is-active {
  display: block;
}

/* ============================================================
   CONTROLS — absolutely positioned inside the viewport,
   at the bottom-right of the content panel (left side by default).
   right: calc(50% + 1rem) keeps it 1 rem inside the content
   panel's right edge for the default side-left layout.
   ============================================================ */
.ionis-slider__controls {
  position: absolute;
  bottom: 2rem;
  right: calc(50% + 1rem);
  z-index: 5;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   DOT NAVIGATION
   ============================================================ */
.ionis-slider__dots {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.ionis-slider__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  background: transparent;
  border: none;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease, background 0.25s ease;
}

.ionis-slider__dot svg {
  display: block;
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
}

.ionis-slider__dot:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Active dot — horizontal pill. SVG hidden when active. */
.ionis-slider__dot.is-active {
  width: 4rem;
  height: 0.75rem;
  border-radius: 100rem;
  background: var(--color-orange, #FFAF00);
}

.ionis-slider__dot.is-active svg {
  display: none;
}

/* Light variant active dot uses pink instead of orange. */
.slider-controls--light .ionis-slider__dot.is-active {
  background: var(--Pink-Light, #D70073);
}

/* Side-right: content is on the right half — controls go to the right corner.
   Primary rule uses :has() (no JS needed); class-based rule is a fallback. */
.ionis-slider__viewport:has(.ionis-header-slide--side-right.is-active) .ionis-slider__controls,
.slider-controls--side-right {
  right: 2rem;
  left: auto;
}

/* ============================================================
   MOBILE — centered controls (≤ 976px)
   ============================================================ */
@media (max-width: 976px) {
  .ionis-slider__controls {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.5rem;
  }
}

/* ============================================================
   PAUSE / PLAY BUTTON
   ============================================================ */
.ionis-slider__pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #FEE4FC; /* default for dark bg */
}

.slider-controls--light .ionis-slider__pause {
  color: #D70073;
}

.ionis-slider__pause:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.ionis-slider__pause-icon {
  display: flex;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

.ionis-slider__pause-icon svg {
  width: 100%;
  height: 100%;
}
