/* Estilos generales para ambos modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Estilos específicos para el modal de error */
#modalError .modal-icon {
    color: #dc3545;
    font-size: 50px;
    margin-bottom: 20px;
}

#modalError .modal-content {
    border-top: 5px solid #dc3545;
}

#modalErrorMessage {
    color: #721c24;
    font-size: 18px;
    margin-bottom: 20px;
}

/* Estilos específicos para el modal de éxito */
#modalExito .modal-icon {
    color: #28a745;
    font-size: 50px;
    margin-bottom: 20px;
}

#modalExito .modal-content {
    border-top: 5px solid #28a745;
}

#modalExitoMessage {
    color: #155724;
    font-size: 18px;
    margin-bottom: 20px;
}

/* Botones */
.modal-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-error {
    background-color: #dc3545;
    color: white;
}

.btn-error:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

/* Estilos específicos para el modal de confirmación */
#modalConfirmacion .modal-icon {
    color: #ffc107;
    font-size: 50px;
    margin-bottom: 20px;
}

#modalConfirmacion .modal-content {
    border-top: 5px solid #ffc107;
}

.btn-confirm {
    background-color: #dc3545;
    color: white;
    margin-right: 10px;
}

.btn-confirm:hover {
    background-color: #c82333;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background-color: #5a6268;
}