/* =========================================================
   Video lightbox — cinema, rápido, sem “caixa estranha”
   ========================================================= */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.video-modal-content {
    position: relative;
    width: min(960px, 100%);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: none;
    max-height: none;
    overflow: visible;
    transition: none;
}

.video-modal.active .video-modal-content {
    transform: none;
}

.video-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0.85rem 0.85rem 2.5rem;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
    pointer-events: none;
}

.video-modal-title {
    margin: 0;
    padding: 0.35rem 0.15rem;
    max-width: calc(100% - 3.5rem);
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.video-modal-close {
    pointer-events: auto;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 20, 28, 0.92);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: background 0.15s ease, transform 0.15s ease;
}

.video-modal-close:hover {
    background: #5e17eb;
    color: #fff;
    transform: none;
    box-shadow: 0 8px 20px rgba(94, 23, 235, 0.4);
}

.video-modal-close svg {
    width: 1.1rem;
    height: 1.1rem;
}

.video-container-modal {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: none;
}

.video-lightbox-poster {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #0b0b12 center / cover no-repeat;
    transition: opacity 0.2s ease;
}

.video-lightbox-poster.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.video-lightbox-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease;
}

.video-lightbox-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.video-lightbox-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: #c4b5fd;
    animation: video-lightbox-spin 0.7s linear infinite;
}

@keyframes video-lightbox-spin {
    to { transform: rotate(360deg); }
}

.video-container-modal iframe {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #000;
}

@media (max-width: 640px) {
    .video-modal {
        padding: 0.5rem;
        align-items: center;
    }

    .video-modal-content,
    .video-container-modal {
        border-radius: 12px;
    }

    .video-modal-title {
        font-size: 0.85rem;
    }
}
