/**
 * Estilos para Alegal Popup
 * Plugin de WordPress para mostrar un popup con video
 */

/* Overlay del popup - fondo oscuro transparente */
.alegal-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.alegal-popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* Contenedor principal del popup */
.alegal-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Botón de cerrar (cruz) */
.alegal-popup-close {
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    color: #fff;
    padding: 0;
}

.alegal-popup-close:hover {
    background-color: #131808;
    transform: scale(1.1);
    color: #fff;
}

.alegal-popup-close:active {
    transform: scale(0.95);
}

.alegal-popup-close svg {
    display: block;
}

/* Contenido del popup */
.alegal-popup-content {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Wrapper del video - mantiene las proporciones */
.alegal-video-wrapper {
    position: relative;
    width: 340px;
    height: 600px;
    cursor: pointer;
    overflow: hidden;
}


.alegal-video-wrapper:hover {
    opacity: 0.95;
}

/* Video */
.alegal-popup-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: rbga(0,0,0,0.2);
}

/* Animación de entrada */
@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.alegal-popup-overlay.active .alegal-popup-container {
    animation: slideIn 0.4s ease-out;
}

/* RESPONSIVE */

/* Tablets y pantallas medianas */
@media screen and (max-width: 768px) {
    .alegal-video-wrapper {
        width: 350px;
        height: 525px;
    }
    
    .alegal-popup-close {
        width: 36px;
        height: 36px;
        margin-bottom: 12px;
    }
}

/* Móviles grandes */
@media screen and (max-width: 576px) {
    .alegal-video-wrapper {
        width: 320px;
        height: 480px;
    }
    
    .alegal-popup-close {
        width: 32px;
        height: 32px;
        margin-bottom: 10px;
    }
    
    .alegal-popup-content {
        border-radius: 4px;
    }
}

/* Móviles pequeños */
@media screen and (max-width: 380px) {
    .alegal-video-wrapper {
        width: 280px;
        height: 420px;
    }
    
    .alegal-popup-overlay {
        background-color: rgba(0, 0, 0, 0.95);
    }
}

/* Pantallas muy pequeñas */
@media screen and (max-width: 320px) {
    .alegal-video-wrapper {
        width: 240px;
        height: 360px;
    }
}

/* Landscape en móviles - ajustar para que el video quepa */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .alegal-video-wrapper {
        width: auto;
        height: 70vh;
        max-width: 90vw;
    }
    
    .alegal-popup-container {
        max-height: 95vh;
    }
    
    .alegal-popup-close {
        margin-bottom: 8px;
    }
}

/* Asegurar que el popup no cause scroll en el body */
body.alegal-popup-open {
    overflow: hidden;
}
