/* NPC — shared Vimeo/Canva lightbox presentation.
   Applies to both image links and caption buttons. Shared scroll-lock state
   is set on the root and body; old caption state remains a cache fallback. */
.npc-vimeo-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    box-sizing: border-box;
    background: rgba(10, 19, 33, 0.90);
    animation: npc-vimeo-fade-in 250ms ease-out;
}
.npc-vimeo-lightbox .npc-vimeo-dialog {
    position: relative;
    width: min(90vw, 1280px, calc((100vh - 120px) * 1.777778));
    width: min(90vw, 1280px, calc((100dvh - 120px) * 1.777778));
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.npc-vimeo-lightbox .npc-vimeo-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    border: none !important;
    border-radius: 0 !important;
}
.npc-vimeo-lightbox .npc-vimeo-player iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.npc-vimeo-lightbox .npc-vimeo-close {
    position: absolute !important;
    top: -55px !important;
    right: 0 !important;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #193B64 !important;
    -webkit-text-fill-color: #193B64 !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    font-family: Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background-color 200ms ease, color 200ms ease;
}
.npc-vimeo-lightbox .npc-vimeo-close:hover {
    background: #193B64 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
/* A keyboard-focused close control must remain visibly focused, including
   while hovered. Programmatic focus without :focus-visible stays neutral. */
.npc-vimeo-lightbox .npc-vimeo-close:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 4px;
}
html.npc-vimeo-open,
body.npc-vimeo-open,
body.npc-caption-vimeo-open {
    overflow: hidden !important;
}
@keyframes npc-vimeo-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media screen and (min-width: 1025px) {
    /* Keep the actual winning desktop player size from the existing theme. */
    html body .npc-vimeo-lightbox .npc-vimeo-dialog {
        width: min(75vw, 1100px, calc((100vh - 160px) * 1.777778)) !important;
        width: min(75vw, 1100px, calc((100dvh - 160px) * 1.777778)) !important;
    }
    /* Preserve the existing gutter rules and their precedence relative to
       the ribbon's no-scrollbar and Fancybox-specific width protections. */
    html:has(body:not(.home)) {
        scrollbar-gutter: stable !important;
    }
    html.npc-vimeo-open,
    html:has(body.npc-vimeo-open),
    html:has(body.npc-caption-vimeo-open) {
        overflow-y: hidden !important;
        scrollbar-gutter: stable !important;
    }
}
@media screen and (max-width: 1024px) {
    .npc-vimeo-lightbox { padding: 50px 15px; }
    .npc-vimeo-lightbox .npc-vimeo-dialog {
        width: min(94vw, 1280px, calc((100vh - 110px) * 1.777778));
        width: min(94vw, 1280px, calc((100dvh - 110px) * 1.777778));
    }
    .npc-vimeo-lightbox .npc-vimeo-close {
        width: 38px !important;
        height: 38px !important;
        top: -46px !important;
        font-size: 24px !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .npc-vimeo-lightbox { animation: none !important; }
    .npc-vimeo-lightbox .npc-vimeo-close { transition: none !important; }
}
