.video-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.video-modal[hidden] {
    display: none !important;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 29, 41, 0.78);
    backdrop-filter: blur(4px);
}

.video-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    padding: 1.25rem;
    border-radius: 20px;
    background: #051d29;
    color: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.video-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.video-modal-close:hover,
.video-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.2);
}

.video-modal-title {
    margin: 0 2.5rem 1rem 0;
    font-size: 1.125rem;
    line-height: 1.35;
}

.video-modal-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: min(78vh, 820px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.video-modal-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.modal-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .video-modal-frame {
        aspect-ratio: 16 / 9;
        max-height: none;
    }
}
