/**
 * Video Banner Widget Styles
 */

.video-banner-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Aspect Ratio Mode */
.video-banner-wrapper.use-aspect-ratio {
    aspect-ratio: var(--banner-aspect-ratio, 21 / 9);
    height: auto !important;
}

.video-banner-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* YouTube Video */
.video-banner-youtube {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-banner-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Vimeo Video */
.video-banner-vimeo {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-banner-vimeo iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Self-Hosted Video */
.video-banner-hosted {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Overlay */
.video-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Video Controls */
.video-banner-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.video-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.video-control-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
}

.video-control-btn:active {
    transform: scale(0.95);
}

.video-control-btn svg {
    display: none;
}

.video-control-btn .play-icon,
.video-control-btn .pause-icon,
.video-control-btn .mute-icon,
.video-control-btn .unmute-icon {
    line-height: 1;
}

/* Play/Pause States */
.video-banner-wrapper.is-playing .play-pause .pause-icon {
    display: block;
}

.video-banner-wrapper.is-paused .play-pause .play-icon {
    display: block;
}

/* Mute/Unmute States */
.video-banner-wrapper.is-muted .mute-unmute .unmute-icon {
    display: block;
}

.video-banner-wrapper.is-unmuted .mute-unmute .mute-icon {
    display: block;
}

/* Mobile Fallback */
.video-banner-mobile-fallback {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}

.video-banner-mobile-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-banner-wrapper.has-mobile-fallback .video-banner-mobile-fallback {
        display: block;
    }

    .video-banner-wrapper.has-mobile-fallback .video-banner-container {
        display: none;
    }

    .video-banner-controls {
        top: 15px;
        right: 15px;
        gap: 6px;
    }

    .video-control-btn {
        width: 28px;
        height: 28px;
    }

    .video-control-btn svg {
        width: 10px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .video-banner-controls {
        top: 12px;
        right: 12px;
    }
}

/* Loading State */
.video-banner-wrapper.is-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: video-banner-spin 1s linear infinite;
    z-index: 3;
}

@keyframes video-banner-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Elementor Editor Mode */
.elementor-editor-active .video-banner-youtube iframe,
.elementor-editor-active .video-banner-vimeo iframe {
    pointer-events: auto;
}
