/*
 * CAPEMVeL - Ventanas modales
 * Sitio de pruebas
 */

.capemvel-modal {
    width: min(680px, calc(100% - 32px));
    max-height: 85vh;
    padding: 30px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 12px 45px rgba(0,0,0,.25);
    box-sizing: border-box;
    color: #333;
}

.capemvel-modal[open] {
    position: fixed;
    inset: 0;
    margin: auto;
}

.capemvel-modal::backdrop {
    background: rgba(0,0,0,.55);
}

.capemvel-modal h2 {
    color: #288b4a;
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 20px;
}

.capemvel-modal-contenido {
    max-height: 55vh;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.65;
}

.capemvel-modal-contenido p {
    margin-bottom: 15px;
}

.capemvel-modal-cerrar {
    display: block;
    margin: 22px 0 0 auto;
    padding: 9px 22px;
    background: #288b4a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.capemvel-modal-cerrar:hover {
    background: #206d3b;
}


@media (max-width: 600px) {
    .capemvel-modal {
        padding: 20px;
        max-height: 90vh;
    }

    .capemvel-modal h2 {
        font-size: 20px;
    }

    .capemvel-modal-contenido {
        font-size: 15px;
        max-height: 65vh;
    }
}


/* Botón de cierre superior */

.capemvel-modal {
    position: relative;
}

.capemvel-modal-cerrar-superior {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #777;
    font-size: 26px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

.capemvel-modal-cerrar-superior:hover {
    background: #f0f0f0;
    color: #288b4a;
}

.capemvel-modal-cerrar-superior:focus-visible {
    outline: 2px solid #288b4a;
    outline-offset: 2px;
}

.capemvel-modal h2 {
    padding-right: 28px;
}

/* CAPEMVeL - Lectura de contenido en ventanas modales */

.capemvel-modal-contenido p {
    padding: 12px 14px;
    margin: 0 0 7px !important;
    line-height: 1.7;
    border-radius: 3px;
    box-sizing: border-box;
}

.capemvel-modal-contenido p:nth-child(odd) {
    background: #f2f4f2;
}

.capemvel-modal-contenido p:nth-child(even) {
    background: #fafafa;
}


/* CAPEMVeL - Alternancia definitiva de párrafos */

.capemvel-modal-contenido p:nth-child(odd) {
    background-color: #eef1ef !important;
}

.capemvel-modal-contenido p:nth-child(even) {
    background-color: #fafafa !important;
}


/* CAPEMVeL - Renglones alternados en ventanas modales */

.capemvel-modal-contenido p {
    padding: 0 10px !important;
    margin: 0 0 12px !important;
    line-height: 1.8em !important;
    border-radius: 3px;

    background-color: transparent !important;

    background-image: repeating-linear-gradient(
        to bottom,
        #eef1ef 0,
        #eef1ef 1.8em,
        #ffffff 1.8em,
        #ffffff 3.6em
    ) !important;
}


/* CAPEMVeL - Renglones con gris muy suave */

.capemvel-modal-contenido p {
    background-image: repeating-linear-gradient(
        to bottom,
        #f7f8f7 0,
        #f7f8f7 1.8em,
        #ffffff 1.8em,
        #ffffff 3.6em
    ) !important;
}

