/* ===== Evercade Dynamic Slider =====
 * Instance-specific values (heights/aspect ratios, content widths, dot colours, border, per-slide
 * backgrounds) are generated per shortcode instance, scoped to that instance's own
 * #id, and output as a companion <style> block next to the markup. The fallback
 * values below only apply if that block somehow fails to load. */
.ec-dynamic-slider {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 600px;
  border-style: none;
  border-width: 0;
  border-color: transparent;
  border-radius: 0;
  /* Browser keeps vertical page scrolling (and pinch-zoom where supported); horizontal swipes
   * go to the slider's JS. Two lines because Safari drops "pinch-zoom" and falls back to the first */
  touch-action: pan-y;
  touch-action: pan-y pinch-zoom;
}
/* Set by JS while a mouse drag is in progress; overrides the link's pointer cursor */
.ec-dynamic-slider.is-dragging,
.ec-dynamic-slider.is-dragging * {
  cursor: grabbing !important;
}
.ec-dynamic-slider .ec-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ===== Slide ===== */
.ec-dynamic-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  background-image: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  visibility: hidden;
  opacity: 0;
}

/* ===== Slide Link ===== */
/* Stretched over the whole slide, under the text; clicks on the text fall through to it,
 * while any links inside the text itself stay clickable */
.ec-dynamic-slider .ec-dynamic-slide .ec-slide-link {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.ec-dynamic-slider .ec-dynamic-slide .ec-slide-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}
.ec-has-link .ec-slide-content {
  pointer-events: none;
}
.ec-has-link .ec-slide-content a {
  pointer-events: auto;
}

/* ===== Slide Text ===== */
.ec-slide-content {
  position: absolute;
  left: 40px;
  bottom: 40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
}
.ec-slide-text {
  margin: 0;
  color: #fff;
}

/* ===== Per-Text-Field Breakpoint Visibility ===== */
@media only screen and (min-width: 1001px) {
  .ec-hide-desktop {
    display: none;
  }
}
@media only screen and (max-width: 1000px) and (min-width: 691px) {
  .ec-hide-tablet {
    display: none;
  }
}
@media only screen and (max-width: 690px) {
  .ec-hide-mobile {
    display: none;
  }
}

/* ===== Pagination Dots ===== */
.ec-slider-pagination {
  position: absolute;
  z-index: 4;
  display: flex;
  gap: 10px;
}
.ec-pagination-top-right {
  top: 24px;
  right: 24px;
}
.ec-pagination-top-left {
  top: 24px;
  left: 24px;
}
.ec-pagination-bottom-right {
  bottom: 24px;
  right: 24px;
}
.ec-pagination-bottom-left {
  bottom: 24px;
  left: 24px;
}
.ec-pagination-bottom-center {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}
.ec-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.ec-slider-dot.is-active {
  background-color: #fff;
}

/* ===== Salient Tablet Breakpoint (1000px) ===== */
@media only screen and (max-width: 1000px) {
  .ec-slide-content {
    left: 24px;
    bottom: 24px;
  }
}

/* ===== Salient Mobile Breakpoint (690px) ===== */
@media only screen and (max-width: 690px) {
  .ec-slide-content {
    /* left: 16px;
    bottom: 16px;
    right: 16px; */
  }
}
