/**
 * Live hover / in-view preview (Tier-1 #1).
 * Scoped to `.video-wrapper.sl-lp` — a marker class added at runtime ONLY to cards this
 * module manages, so it never conflicts with the homepage's own teaser playback.
 */

.sl-lumi-card .video-wrapper.sl-lp {
  position: relative;
  overflow: hidden;
}

.sl-lumi-card .video-wrapper.sl-lp .video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
  pointer-events: none;
  background: #05070c;
}

.sl-lumi-card .video-wrapper.sl-lp.sl-lp-playing .video-player {
  opacity: 1;
}

.sl-lumi-card .video-wrapper.sl-lp .thumbnail-image {
  transition: opacity 0.5s ease;
}

.sl-lumi-card .video-wrapper.sl-lp.sl-lp-playing .thumbnail-image {
  opacity: 0;
}

/* Shimmer while the preview is spinning up */
.sl-lumi-card .video-wrapper.sl-lp.sl-lp-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: sl-lp-shimmer 1.1s linear infinite;
}

@keyframes sl-lp-shimmer {
  0%   { background-position: 180% 0; }
  100% { background-position: -40% 0; }
}

/* True live (HLS) preview badge */
.sl-lumi-card .video-wrapper.sl-lp.sl-lp-live::before {
  content: "\25CF LIVE";
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  animation: sl-lp-livepulse 1.4s ease-in-out infinite;
}

@keyframes sl-lp-livepulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-lumi-card .video-wrapper.sl-lp .video-player,
  .sl-lumi-card .video-wrapper.sl-lp .thumbnail-image {
    transition: none;
  }
  .sl-lumi-card .video-wrapper.sl-lp.sl-lp-loading::after,
  .sl-lumi-card .video-wrapper.sl-lp.sl-lp-live::before {
    animation: none;
  }
}
