/* Generic Animated Background Hero
   Direction/fade timing lives in a per-instance <style> block (views/default.vtl)
   because it depends on how many background images are attached. This file only
   holds the shared, count-agnostic layout. */

.container_generic-bg-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 20rem;
}

.container_generic-bg-hero .hero-bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}

.container_generic-bg-hero .hero-bg-slide:first-child {
  opacity: 1;
}

.container_generic-bg-hero .hero-content {
  position: relative;
  z-index: 1;
}

/* animation-play-state is set directly on each slide's inline style by JS,
   not here - each slide's `animation` shorthand is itself inline (VTL),
   which always wins over an external rule regardless of specificity. The
   .is-paused class below is just a styling hook for the toggle button. */

.hero-bg-pause-toggle {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.hero-bg-pause-toggle:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.hero-bg-pause-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Default (playing) state: two-bar pause icon */
.hero-bg-pause-icon {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  position: relative;
}

.hero-bg-pause-icon::before,
.hero-bg-pause-icon::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0.25rem;
  height: 100%;
  background-color: #fff;
}

.hero-bg-pause-icon::before {
  left: 0.15rem;
}

.hero-bg-pause-icon::after {
  right: 0.15rem;
}

/* Paused state: swap to a play triangle */
.hero-bg-pause-toggle[aria-pressed="true"] .hero-bg-pause-icon {
  width: 0;
  height: 0;
  border-top: 0.5rem solid transparent;
  border-bottom: 0.5rem solid transparent;
  border-left: 0.8rem solid #fff;
}

.hero-bg-pause-toggle[aria-pressed="true"] .hero-bg-pause-icon::before,
.hero-bg-pause-toggle[aria-pressed="true"] .hero-bg-pause-icon::after {
  content: none;
}

@media (prefers-reduced-motion: reduce) {
  .container_generic-bg-hero .hero-bg-slide {
    animation: none !important;
    opacity: 0;
  }

  .container_generic-bg-hero .hero-bg-slide:first-child {
    opacity: 1;
  }

  .container_generic-bg-hero .hero-bg-pause-toggle {
    display: none;
  }
}
