.elementor-widget-nb4_video_hover_widget .elementor-widget-container {
    display: flex;
    justify-content: var(--nb4-align, center);
}

.nb4-video-hover-widget {
    --nb4-transition-duration: 350ms;
    width: 100%;
    height: 360px;
    max-width: 100%;
}

.nb4-video-hover-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.nb4-video-hover-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    transition:
        opacity var(--nb4-transition-duration) ease,
        transform var(--nb4-transition-duration) ease;
    backface-visibility: hidden;
}

.nb4-video-hover-image {
    z-index: 2;
    opacity: 1;
    transform: scale(1);
}

.nb4-video-hover-video {
    z-index: 1;
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
}

.nb4-video-hover-widget:hover .nb4-video-hover-image,
.nb4-video-hover-widget.is-playing .nb4-video-hover-image {
    opacity: 0;
    transform: scale(1.02);
}

.nb4-video-hover-widget:hover .nb4-video-hover-video,
.nb4-video-hover-widget.is-playing .nb4-video-hover-video {
    opacity: 1;
    transform: scale(1);
}

.nb4-video-hover-action {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent !important;
    cursor: pointer;
    text-decoration: none;
    outline: none;
}

.nb4-video-hover-action:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -6px;
}

.nb4-video-hover-action-hint {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    pointer-events: none;
    backdrop-filter: blur(6px);
}

.nb4-video-hover-action-hint svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.nb4-video-hover-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.86);
}

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

.nb4-video-hover-lightbox-dialog {
    position: relative;
    width: min(1100px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nb4-video-hover-lightbox-close {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #fff !important;
    color: #111 !important;
    cursor: pointer;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 18px rgba(0,0,0,.28);
}

.nb4-video-hover-lightbox-close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.nb4-video-hover-lightbox-content {
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.nb4-video-hover-lightbox-content img,
.nb4-video-hover-lightbox-content video {
    display: block;
    width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    background: #000;
}

.nb4-video-hover-lightbox-caption {
    color: #fff;
    text-align: center;
    font-size: 14px;
}

body.nb4-video-hover-no-scroll {
    overflow: hidden;
}

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

    .nb4-video-hover-lightbox-dialog {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .nb4-video-hover-action-hint {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nb4-video-hover-media {
        transition: none;
    }
}
