/* video-containers.css — LEE-2 Universal Video Container styles.
   Owns: .vc-wrap and all child elements.
   Does NOT own: card layouts, grid systems, page-specific spacing. */

/* ── Base container ─────────────────────────────────────────── */
.vc-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #161616;
  width: 100%;
}

.vc-video,
.vc-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vc-video {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* When video is playing, show it */
.vc-wrap.vc-playing .vc-video {
  opacity: 1;
}

/* Poster image behind video — visible when video not playing */
.vc-poster {
  z-index: 0;
}
.vc-video {
  z-index: 1;
}

/* Placeholder for no-media state */
.vc-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  background: #161616;
}

/* ── Dark gradient overlay (profile hero) ───────────────────── */
.vc-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.6) 60%,
    rgba(10, 10, 10, 0.85) 100%
  );
  pointer-events: none;
}

/* ── Mute toggle ────────────────────────────────────────────── */
.vc-mute-toggle {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}

.vc-wrap:hover .vc-mute-toggle {
  opacity: 1;
}

/* ── Hover-trigger: expand slightly on hover ────────────────── */
.vc-wrap[data-vc-trigger="hover"] {
  transition: transform 0.25s ease;
}
.vc-wrap[data-vc-trigger="hover"]:hover {
  transform: scale(1.03);
}

/* ── Profile tile video avatar ──────────────────────────────── */
.vc-avatar {
  border-radius: 50%;
}

/* ── Profile hero background video ──────────────────────────── */
.vc-hero {
  border-radius: 0;
  width: 100%;
  min-height: 240px;
}

/* ── Notification card video thumbnail ──────────────────────── */
.vc-notif-thumb {
  border-radius: 6px;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  cursor: pointer;
}
.vc-notif-thumb .vc-video,
.vc-notif-thumb .vc-poster {
  border-radius: 6px;
}
/* Play icon overlay for notification thumbnails */
.vc-notif-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  pointer-events: none;
}
.vc-notif-play svg {
  width: 20px;
  height: 20px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* ── Inline message video player ────────────────────────────── */
.vc-msg-player {
  border-radius: 10px;
  max-width: 100%;
  margin-top: 6px;
}
.vc-msg-player .vc-video {
  border-radius: 10px;
}
.vc-msg-player .vc-poster {
  border-radius: 10px;
  cursor: pointer;
}
/* Play button overlay for message video */
.vc-msg-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.vc-msg-play-overlay:hover {
  background: rgba(0, 0, 0, 0.5);
}
.vc-msg-play-overlay svg {
  width: 40px;
  height: 40px;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* ── Search result video preview ────────────────────────────── */
.vc-search-preview {
  border-radius: 6px;
}

/* ── Product tile hover video ───────────────────────────────── */
.vc-product {
  border-radius: 8px 8px 0 0;
}

/* ── Category page hero video ───────────────────────────────── */
.vc-category-hero {
  border-radius: 12px;
  min-height: 200px;
  max-height: 320px;
}

/* ── Reduced motion: disable video autoplay and hover scale ── */
@media (prefers-reduced-motion: reduce) {
  .vc-wrap .vc-video {
    display: none !important;
  }
  .vc-wrap[data-vc-trigger="hover"]:hover {
    transform: none;
  }
  .vc-wrap.vc-playing {
    /* Force poster visible */
  }
  .vc-wrap.vc-playing .vc-video {
    opacity: 0;
  }
}
