body.afdes-video-open { overflow: hidden; }

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

.afdes-video-modal {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 34px);
}

.afdes-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 13, 22, .88);
    backdrop-filter: blur(5px);
}

.afdes-video-modal__panel {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: #071827;
    box-shadow: 0 28px 80px rgba(0,0,0,.42);
}

.afdes-video-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 20px;
    color: #fff;
}

.afdes-video-modal__header span {
    display: block;
    margin-bottom: 4px;
    color: #79d9f7;
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.afdes-video-modal__header h2 {
    margin: 0;
    color: #fff;
    font-family: Merriweather, Georgia, serif;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.25;
}

.afdes-video-modal__close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.afdes-video-modal__close:hover,
.afdes-video-modal__close:focus-visible {
    border-color: #79d9f7;
    color: #79d9f7;
    outline: none;
}

.afdes-video-modal__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.afdes-video-modal__stage iframe,
.afdes-video-modal__stage video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.afdes-video-modal__stage.is-audio {
    display: flex;
    min-height: 150px;
    aspect-ratio: auto;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vw, 54px);
    background: linear-gradient(135deg, #0a2235, #0d334c);
}

.afdes-video-modal__stage.is-audio audio {
    display: block;
    width: min(760px, 100%);
}

.afdes-video-modal__stage.is-audio-embed {
    height: min(352px, 48vh);
    min-height: 220px;
    aspect-ratio: auto;
    background: #f7f9fb;
}

.afdes-video-modal__stage.is-audio-embed iframe {
    background: #f7f9fb;
}

.afdes-video-modal__stage.is-unavailable {
    display: grid;
    min-height: 220px;
    aspect-ratio: auto;
    place-items: center;
    padding: 32px;
    background: linear-gradient(135deg, #0a2235, #0d334c);
}

.afdes-video-modal__unavailable {
    max-width: 620px;
    color: #fff;
    text-align: center;
}

.afdes-video-modal__unavailable strong {
    display: block;
    margin-bottom: 9px;
    font-family: Merriweather, Georgia, serif;
    font-size: 1.05rem;
}

.afdes-video-modal__unavailable p {
    margin: 0;
    color: rgba(255,255,255,.67);
    font-size: .82rem;
    line-height: 1.6;
}

.afdes-video-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 20px 15px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.afdes-video-modal__footer p {
    margin: 0;
    color: rgba(255,255,255,.62);
    font-size: .72rem;
    line-height: 1.5;
}

.afdes-video-modal__footer a {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid rgba(121,217,247,.35);
    border-radius: 10px;
    color: #79d9f7;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.afdes-video-modal__footer a:hover {
    border-color: #79d9f7;
    background: rgba(121,217,247,.08);
}

[data-afdes-video],
[data-afdes-media] { cursor: pointer; }

@media (max-width: 640px) {
    .afdes-video-modal { padding: 0; align-items: center; }
    .afdes-video-modal__panel { width: 100%; max-height: 100vh; border-left: 0; border-right: 0; border-radius: 0; }
    .afdes-video-modal__header { padding: 14px 15px; }
    .afdes-video-modal__stage.is-audio-embed { height: 300px; min-height: 190px; }
    .afdes-video-modal__footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 15px 14px; }
}
