/* Video Cover Widget Styles - Fixed for container height inheritance */

/* CRITICAL: Forçar o widget a herdar altura do container Elementor */
.elementor-widget-custom_video_cover {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.elementor-widget-custom_video_cover .elementor-widget-container {
    height: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.cvc-wrapper {
    --offset-x: 0%;
    --offset-y: 0%;
    position: relative;
    width: 100%;
    height: 100% !important;
    flex: 1 !important;
    overflow: hidden;
}

.cvc-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

/* Video Wrapper for iframe (YouTube/Vimeo) */
.cvc-video-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78%;
    height: 177.78%;
    transform: translate(
        calc(-50% + var(--offset-x)),
        calc(-50% + var(--offset-y))
    );
}

.cvc-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

/* Self-hosted video element */
.cvc-video-element {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    transform: translate(
        calc(-50% + var(--offset-x)),
        calc(-50% + var(--offset-y))
    );
    object-fit: cover;
    object-position: center;
    background: #000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cvc-video-wrap {
        width: 200%;
        height: 200%;
    }
}

/* Debug helper - remova após testar */
/*
.elementor-widget-custom_video_cover {
    outline: 2px solid red;
}
.cvc-wrapper {
    outline: 2px solid blue;
}
.cvc-video-container {
    outline: 2px solid green;
}
*/