/* sipo-slider — layout for the vanilla Smart Slider 3 replacement.
 *
 * Smart Slider's captured CSS parks every slide at translateX(-100000px) and
 * relies on its JS to position things. With the plugin JS gone that CSS would
 * render an empty box, so these rules take over positioning ONLY. Everything
 * else (colours, arrow styling, widget chrome) still comes from the captured
 * stylesheet, which is why the plugin's class names are kept.
 *
 * Ratio 2.4:1 is measured, not assumed: 1920x800, 1440x600, 768x320, 375x156.
 */

/* Smart Slider's pre-JS state hides the hero entirely:
 *   ss3-force-full-width{opacity:0;width:100vw;transform:translateX(-100vw)}
 * The plugin's JS undoes that. Ours does too (see forceFullWidth in
 * sipo-slider.js, which measures the offset so it is correct at any width) —
 * but this rule is the no-JS fallback, so the hero is never invisible.
 * WITHOUT THIS THE ENTIRE HERO IS BLANK. Do not remove.
 */
ss3-force-full-width {
  opacity: 1;
  transform: none;
}

.sipo-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2.4 / 1;
}

/* Older Safari/Firefox without aspect-ratio: padding-box fallback. */
@supports not (aspect-ratio: 1) {
  .sipo-slider::before {
    content: "";
    display: block;
    padding-top: 41.6667%; /* 1 / 2.4 */
  }
}

.sipo-slider .n2-ss-slider-wrapper-inside,
.sipo-slider .n2-ss-slider-1,
.sipo-slider .n2-ss-slider-2,
.sipo-slider .n2-ss-slider-3,
.sipo-slider .n2-ss-slider-4 {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sipo-slider .n2-ss-slide-backgrounds {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sipo-slider .n2-ss-slide-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
  backface-visibility: hidden;
}

/* data-mode="fill" on the source markup == cover */
.sipo-slider .n2-ss-slide-background img,
.sipo-slider .n2-ss-slide-background .n2-ss-slide-background-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Neutralise the plugin's off-screen parking; our JS owns placement. */
.sipo-slider .n2-ss-slide {
  position: absolute;
  inset: 0;
  transform: none !important;
  display: grid;
  place-items: center;
  z-index: 20;
  transition: opacity 800ms cubic-bezier(.25, .46, .45, .94);
}

.sipo-slider .nextend-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  cursor: pointer;
}

.sipo-slider .nextend-arrow-previous { left: 2%; }
.sipo-slider .nextend-arrow-next { right: 2%; }

@media (prefers-reduced-motion: reduce) {
  .sipo-slider .n2-ss-slide-background,
  .sipo-slider .n2-ss-slide {
    transition: none !important;
  }
}
