/* Video Card Hover Preview Styles */

/* ------------------------------------------------
   Preview container - overlays the thumbnail area
   ------------------------------------------------ */
.video-card-preview {
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
    background: black;
    pointer-events: none;
}

/* ------------------------------------------------
   Poster fade when preview is active
   ------------------------------------------------ */
.video-card-poster {
    transition: opacity 0.2s ease;
}

/* ------------------------------------------------
   Canvas element - receives painted video frames.
   The Video.js player stays permanently off-screen;
   only the canvas lives inside the preview container.
   ------------------------------------------------ */
.video-card-preview canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;  /* Let clicks pass through to parent container */
}

/* ------------------------------------------------
   Mute / unmute button
   Floats in the bottom-left of the thumbnail area.
   Only visible when preview is active.
   ------------------------------------------------ */
.video-card-mute-btn {
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.video-card-mute-btn.active {
    opacity: 1;
    pointer-events: auto;
}

.video-card-mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.video-card-mute-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.7);
}

.video-card-mute-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* ------------------------------------------------
   Duration badge - hides when preview is playing
   ------------------------------------------------ */
.video-card-duration {
    transition: opacity 0.3s ease;
    z-index: 10;
}

.video-card-duration.preview-hidden {
    opacity: 0;
}

/* ------------------------------------------------
   Reduced motion preference
   ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .video-card-preview,
    .video-card-poster,
    .video-card-mute-btn,
    .video-card-duration {
        transition: none;
    }
}
