/* Phase 6 — slider runtime styles (Splide replacing webflow.js sliders).
   Linked from app/the-poppy-experience/page.tsx and
   app/tour-the-dentistry/page.tsx only. The kept Webflow CSS
   (webflow.css / poppykids.webflow.css) stays untouched; these rules only
   bridge the gaps between Splide's structural CSS and the Webflow skin. */

/* =====================================================================
   /the-poppy-experience — "Happy Moments" slider (#portfolio)
   ===================================================================== */

/* Webflow's .client-slider-mask kept neighbours visible (overflow: visible)
   except on phones, where the export clips it. Splide core CSS hides track
   overflow, so re-assert the Webflow behavior with higher specificity. */
#portfolio .splide__track {
  overflow: visible;
}

/* Slide width parity with the live site. Webflow's inline-block slide layout
   let the browser shrink-wrap the mask to its content; Splide's flex list
   resolves the circular sizing wider. Measured on the live site:
   mask = 608px on desktop (700px .client-cube image clamped to 596px + 2x6px
   .website-panel padding), mask = wrapper width below 992px. */
#portfolio {
  width: 100%;
}
@media screen and (min-width: 992px) {
  #portfolio {
    width: 608px;
  }
}

/* The slides now also carry .splide__slide, which poppykids.webflow.css
   sizes for the tour-the-dentistry carousel (33% width, 40vw height,
   min-height 41.88em, side padding). Neutralize that here; the Webflow
   .w-slide sizing (100% width via Splide's inline width, height 100%)
   is what this slider used. */
#portfolio .splide__slide {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-left: 0;
  padding-right: 0;
  /* webflow.js set inline opacity:1 on every slide, overriding the
     stylesheet's .client-slider-panel { opacity: .37 } — on the live site
     only the .website-panel.trislider dimming (.47) is visible. */
  opacity: 1;
}

/* IX2 "shrink previous slide" interaction (webflow.js actions a-107/a-108):
   the active slide's panel animates to opacity 1 / scale 1 over 500ms and
   back to the stylesheet baseline (opacity .47, scale(.8)) when it
   deactivates. */
#portfolio .website-panel.trislider {
  transition: opacity 500ms ease, transform 500ms ease;
}
#portfolio .splide__slide.is-active .website-panel.trislider {
  opacity: 1;
  transform: scale(1);
}

/* Splide-generated pagination reuses the Webflow nav classes
   (.slide-nav-3.w-slider-nav on the <ul>, .w-slider-dot on the buttons).
   Re-assert the Webflow nav geometry over Splide core's <ul> defaults. */
#portfolio .splide__pagination {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: auto;
  width: auto;
  height: auto;
  margin: -33px 0 0;
  padding: 0;
}

/* Style the <button> dots like Webflow's <div> dots
   (slider had data-nav-spacing="2"). */
#portfolio .w-slider-dot {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0 2px 0.5em;
  font-size: inherit;
  background-color: rgba(255, 255, 255, 0.4);
}
#portfolio .w-slider-dot.is-active {
  background-color: #fff;
}

@media screen and (max-width: 991px) {
  /* mirrors the kept .slide-nav-3 rules for this breakpoint */
  #portfolio .splide__pagination {
    grid-column-gap: 6px;
    grid-row-gap: 6px;
    justify-content: flex-start;
    align-items: center;
  }
}

@media screen and (max-width: 479px) {
  /* mirrors .client-slider-mask { overflow: hidden } and the tiny-screen
     .slide-nav-3 rules from the kept Webflow CSS */
  #portfolio .splide__track {
    overflow: hidden;
  }
  #portfolio .splide__pagination {
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    opacity: 0.16;
    margin-top: 0;
    position: relative;
  }
}

/* =====================================================================
   /tour-the-dentistry — office tour carousel
   ===================================================================== */

/* The npm import "@splidejs/splide/css" matches the CDN splide.min.css the
   live page loaded, and the carousel skin lives in poppykids.webflow.css
   (.splide__slide / .splide__img / .controls / .control), so no extra rules
   are needed. The page keeps its original inline style hiding Splide's own
   arrows/pagination; navigation runs through the .control proxies. */
