.nubranch-video-lightbox-widget {
    --nb-video-overlay-color: rgba(0, 0, 0, 0.88);
    --nb-video-dialog-width: 1100px;
    --nb-video-frame-background: #000;
    --nb-video-radius: 0;
    --nb-video-close-color: #fff;
    --nb-video-close-background: rgba(0, 0, 0, 0.6);
    --nb-video-reveal-duration: 1100ms;
    --nb-video-reveal-delay: 0ms;
    --nb-video-reveal-ease: cubic-bezier(.16, 1, .3, 1);
    width: 100%;
}

.nubranch-video-lightbox__trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.nubranch-video-lightbox__poster {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8e8e8;
}

.nubranch-video-lightbox__poster::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    pointer-events: none;
    transition: background-color 240ms ease;
}

.nubranch-video-lightbox__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}

.nubranch-video-lightbox__trigger:hover .nubranch-video-lightbox__poster img,
.nubranch-video-lightbox__trigger:focus-visible .nubranch-video-lightbox__poster img {
    transform: scale(1.025);
}

.nubranch-video-lightbox__trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Optional in-view poster reveal. */
.nubranch-video-lightbox-widget.has-image-reveal .nubranch-video-lightbox__poster {
    clip-path: inset(0 0 100% 0);
    -webkit-clip-path: inset(0 0 100% 0);
    transition:
        clip-path var(--nb-video-reveal-duration) var(--nb-video-reveal-ease) var(--nb-video-reveal-delay),
        -webkit-clip-path var(--nb-video-reveal-duration) var(--nb-video-reveal-ease) var(--nb-video-reveal-delay);
    will-change: clip-path;
}

.nubranch-video-lightbox-widget.has-image-reveal .nubranch-video-lightbox__poster img {
    transform: scale(1.16);
    transition: transform var(--nb-video-reveal-duration) var(--nb-video-reveal-ease) var(--nb-video-reveal-delay);
    will-change: transform;
}

.nubranch-video-lightbox-widget.has-image-reveal .nubranch-video-lightbox__play {
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.72);
    transition:
        background-color 250ms ease,
        color 250ms ease,
        box-shadow 250ms ease,
        opacity 480ms cubic-bezier(.16, 1, .3, 1),
        transform 580ms cubic-bezier(.16, 1, .3, 1),
        visibility 0s linear 580ms;
}

.nubranch-video-lightbox-widget.has-image-reveal.is-image-revealed .nubranch-video-lightbox__poster {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}

.nubranch-video-lightbox-widget.has-image-reveal.is-image-revealed .nubranch-video-lightbox__poster img {
    transform: scale(1);
}

.nubranch-video-lightbox-widget.has-image-reveal.is-play-ready .nubranch-video-lightbox__play {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition-delay: 0s;
}

.nubranch-video-lightbox-widget.has-image-reveal.is-play-ready .nubranch-video-lightbox__trigger:hover .nubranch-video-lightbox__poster img,
.nubranch-video-lightbox-widget.has-image-reveal.is-play-ready .nubranch-video-lightbox__trigger:focus-visible .nubranch-video-lightbox__poster img {
    transform: scale(1.025);
    transition-duration: 500ms;
    transition-delay: 0s;
}

.nubranch-video-lightbox__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 26px 28px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    transform-origin: center;
    transition: background-color 250ms ease, color 250ms ease, transform 300ms cubic-bezier(.2, .7, .2, 1), box-shadow 250ms ease;
    pointer-events: none;
}

.nubranch-video-lightbox__play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 24px;
    line-height: 1;
}

.nubranch-video-lightbox__play-icon i,
.nubranch-video-lightbox__play-icon svg {
    display: block;
}

.nubranch-video-lightbox__play-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.nubranch-video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 56px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease, visibility 260ms ease;
}

.nubranch-video-lightbox[hidden] {
    display: none;
}

.nubranch-video-lightbox.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nubranch-video-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: var(--nb-video-overlay-color);
}

.nubranch-video-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(var(--nb-video-dialog-width), calc(100vw - clamp(36px, 8vw, 112px)));
    max-height: calc(100vh - clamp(36px, 8vw, 112px));
    transform: translateY(18px) scale(.985);
    transition: transform 330ms cubic-bezier(.16, 1, .3, 1);
}

.nubranch-video-lightbox.is-open .nubranch-video-lightbox__dialog {
    transform: translateY(0) scale(1);
}

.nubranch-video-lightbox__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--nb-video-radius);
    background: var(--nb-video-frame-background);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.nubranch-video-lightbox__player,
.nubranch-video-lightbox__player iframe,
.nubranch-video-lightbox__player video {
    display: block;
    width: 100%;
    height: 100%;
}

.nubranch-video-lightbox__player iframe {
    border: 0;
}

.nubranch-video-lightbox__player video {
    background: var(--nb-video-frame-background);
    object-fit: contain;
}

.nubranch-video-lightbox__close {
    position: absolute;
    top: -18px;
    right: -18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--nb-video-close-background);
    color: var(--nb-video-close-color);
    cursor: pointer;
    transition: transform 200ms ease, background-color 200ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.nubranch-video-lightbox__close:hover,
.nubranch-video-lightbox__close:focus-visible {
    transform: scale(1.08);
}

.nubranch-video-lightbox__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.nubranch-video-lightbox__close svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: currentColor;
}

html.nubranch-video-lightbox-open,
body.nubranch-video-lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .nubranch-video-lightbox {
        padding: 18px;
    }

    .nubranch-video-lightbox__dialog {
        width: 100%;
        max-height: calc(100vh - 36px);
    }

    .nubranch-video-lightbox__close {
        top: -14px;
        right: -8px;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nubranch-video-lightbox,
    .nubranch-video-lightbox__dialog,
    .nubranch-video-lightbox__play,
    .nubranch-video-lightbox__poster img {
        transition: none !important;
    }

    .nubranch-video-lightbox-widget.has-image-reveal .nubranch-video-lightbox__poster {
        clip-path: none !important;
        -webkit-clip-path: none !important;
    }

    .nubranch-video-lightbox-widget.has-image-reveal .nubranch-video-lightbox__poster img {
        transform: none !important;
    }

    .nubranch-video-lightbox-widget.has-image-reveal .nubranch-video-lightbox__play {
        visibility: visible !important;
        opacity: 1 !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }
}
