/* ==========================================================================
   Video modal (in-page player for the Discover section thumbnails)
   ========================================================================== */
body.video-modal-open { overflow: hidden; }

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
}
.video-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 14, 0.85);
}

.video-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 960px;
    z-index: 1;
    transform: scale(0.96);
    transition: transform .2s ease;
}
.video-modal.is-open .video-modal-dialog {
    transform: scale(1);
}

.video-modal-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
}
.video-modal-media iframe,
.video-modal-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}
.video-modal-close:hover,
.video-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .video-modal,
    .video-modal-dialog { transition: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
    .video-modal { padding: 12px; }
    .video-modal-close { top: -40px; right: 4px; }
}
