/*
 * Lottie Animation Styles
 * Co-located with utils/media/lottie.js
 *
 * Loaded by utils/media/lottie.js when the first lottie on the page starts.
 */

/* Wrapper that contains lottie + poster needs relative positioning */
.lottie-player-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Wrapper maintains poster dimensions - lottie overlays and fills */

/* Lottie player overlays the poster image */
.lottie-player {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-normal, 0.3s) ease;
  z-index: 1;
}

.lottie-player.lottie-loaded {
  opacity: 1;
}

/* Canvas fills container - dotLottie handles aspect ratio via fit: 'contain' */
.lottie-player canvas {
  width: 100%;
  height: 100%;
}

/* Poster image maintains natural dimensions for layout sizing */
.lottie-player-wrapper picture,
.lottie-player-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Poster fades out smoothly when lottie loads (crossfade with lottie fading in) */
.lottie-player-wrapper picture {
  transition: opacity var(--duration-normal, 0.3s) ease;
}

.lottie-poster-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Error state - keep poster visible, hide broken lottie */
.lottie-error {
  display: none;
}
