/**
 * Generic Modal Styles for CCL
 * Specific properties only (Base in style.css)
 */

.ccl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 28, 44, 0.85); /* Primary Dark with transparency */
    display: block; /* Cambiado de flex para permitir scroll natural */
    overflow-y: auto; /* El scroll ahora sucede aquí */
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    padding: 60px 20px; /* Espacio arriba y abajo del modal */
}

.ccl-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

body.ccl-modal-open {
    overflow: hidden !important;
    padding-right: 0px; /* Evitar saltos de layout si es necesario */
}

/* Hide modal content by default in the page */
.ccl-modal-content {
    display: none;
}

/* Show in editor with placeholder style */
.editor-styles-wrapper .ccl-modal-content {
    display: block !important;
    border: 2px dashed var(--color-accent, #0074c5);
    padding: 20px!important;
    margin: 20px 0;
    position: relative;
    border-radius: 10px;
    background: #f9f9f9;
}

.editor-styles-wrapper .ccl-modal-content::before {
    content: "CONTENIDO DEL MODAL (Invisible en la web)";
    display: block;
    font-size: 12px;
    color: var(--color-accent, #0074c5);
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Modal Container Specifics */
.ccl-modal-container {
    background: #fff;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto; /* Centrado horizontal */
    border-radius: 20px;
    position: relative;
    padding: 60px 40px 40px;
    /* Eliminamos max-height y overflow-y: auto */
}

/* Close Button Specifics */
.ccl-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--color-primary-dark, #051c2c) !important;
    z-index: 10;
}

/* Modal content inside the modal container */
.ccl-modal-container .ccl-modal-content {
    display: block !important;
}

/* Social Icons in Header (Circular) */
.ccl-social-header {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.ccl-social-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ccl-social-circle:hover {
    background-color: #fff;
    color: var(--color-primary, #0074C5) !important;
    border-color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 781px) {
    .ccl-modal-container {
        padding: 50px 20px 30px;
        /* Eliminamos max-height */
    }
    .ccl-modal-close {
        top: 15px;
        right: 15px;
    }
    
    /* Responsive Centering for Gremios Modal */
    #detalleModal .ccl-header h2 {
        text-align: center;
        width: 100%;
    }

    #detalleModal .ccl-header-actions {
        margin: 15px auto 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #detalleModal .ccl-social-header {
        justify-content: center;
    }
}

