/* ═══════════════════════════════════════════════════════════
   HKB Video widget — self-hosted MP4 (custom control bar) or
   YouTube / Vimeo embed. Reuses .hkb-vbar from events-filter.css,
   but the bar is ALWAYS visible here (no hover reveal).
   ═══════════════════════════════════════════════════════════ */

.hkb-video {
    width: 100%;
}

.hkb-video__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 2px;
}

/* Self-hosted video */
.hkb-video__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Poster standing in for an external clip until it is clicked; matches the
   self-hosted <video> so the section looks identical either way. */
.hkb-video__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Poster image */
.hkb-video__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* YouTube / Vimeo iframe */
.hkb-video__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Centre play button (self-hosted, and the external poster facade) */
.hkb-video__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 85px;
    height: 85px;
    padding: 0;
    border: 2px solid white;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hkb-video__play.is-hidden {
    display: none;
}

.hkb-video__play svg {
    display: block;
    margin-left: 5px;
    width: 40px;
    height: 40px;
}

/* Control bar shows only while the video is playing (data-state set by JS).
   Paused → hidden, the centre play button takes over. */
.hkb-video .hkb-vbar {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hkb-video .hkb-vbar[data-state="playing"] {
    opacity: 1;
    visibility: visible;
}

/* Fullscreen: fill the screen and letterbox the video (no crop). Each pseudo
   is its own rule — combining :fullscreen with :-webkit-full-screen would make
   browsers that don't know one selector drop the whole group. */
.hkb-video__frame:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto !important;
    background: #000;
}

.hkb-video__frame:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto !important;
    background: #000;
}

.hkb-video__frame:fullscreen .hkb-video__media {
    object-fit: contain;
}

.hkb-video__frame:-webkit-full-screen .hkb-video__media {
    object-fit: contain;
}

@media (max-width: 767px) {
    .hkb-video__play {
        width: 50px;
        height: 50px;
    }

    .hkb-video__play svg {
        width: 30px;
        height: 30px;
    }
}