﻿/* ==========================================================
   MODAL GLOBAL DE CONFIRMACIÓN / AVISO
   ========================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

    .modal-overlay.activo {
        display: flex;
    }


/* ==========================================================
   CONTENIDO NORMAL DEL MODAL
   ========================================================== */

.modal-contenido {
    width: calc(100% - 40px);
    max-width: 430px;
    padding: 35px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.30);
    text-align: center;
    box-sizing: border-box;
    animation: aparecerModal 0.20s ease-out;
}


/* ==========================================================
   ICONO
   ========================================================== */

.modal-icono {
    width: 65px;
    height: 65px;
    margin: 0 auto 15px;
    display: block;
    object-fit: contain;
}


/* ==========================================================
   TITULO
   ========================================================== */

.modal-contenido h2 {
    margin: 0 0 12px;
    color: #222;
    font-family: Arial, sans-serif;
    font-size: 24px;
}


/* ==========================================================
   MENSAJE
   ========================================================== */

.modal-contenido p {
    margin: 0 0 28px;
    color: #555;
    font-family: Arial, sans-serif;
    font-size: 16px;
}


/* ==========================================================
   BOTONES
   ========================================================== */

.modal-botones {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.boton-cancelar,
.boton-confirmar {
    padding: 12px 20px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: bold;
}

.boton-cancelar {
    background: #e6e6e6;
    color: #333;
}

    .boton-cancelar:hover {
        background: #d5d5d5;
    }

.boton-confirmar {
    background: #9d1c1c;
    color: white;
}

    .boton-confirmar:hover {
        background: #781515;
    }


/* ==========================================================
   PREVISUALIZACIÓN DE DOCUMENTOS
   ========================================================== */

.modal-contenido.modal-documento {
    width: 95%;
    max-width: 1200px;
    padding: 25px;
}


/*
 * Contenedor del PDF
 */

.modal-documento #previsualizacionPDF {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}


/*
 * Visor PDF
 */

.modal-documento #visorPDF {
    display: block;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    border: none;
    border-radius: 8px;
    background-color: #f5f5f5;
}


/* ==========================================================
   ANIMACIÓN
   ========================================================== */

@keyframes aparecerModal {

    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ==========================================================
   RESPONSIVO
   ========================================================== */

@media (max-width: 700px) {

    .modal-contenido.modal-documento {
        width: 96%;
        max-width: none;
        padding: 15px;
    }

    .modal-documento #visorPDF {
        height: 70vh;
        min-height: 400px;
    }
}


@media (max-width: 500px) {

    .modal-botones {
        flex-direction: column-reverse;
    }

    .boton-cancelar,
    .boton-confirmar {
        width: 100%;
    }

    .modal-contenido {
        width: calc(100% - 20px);
        padding: 25px;
    }
}
