/* **************************************************************************** */
/* Modal overlay para confirmaciones */
/* **************************************************************************** */
.modal-alert-confirm {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 4000;
}

.modal-alert-confirm:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
    width: 100%;
    height: 100vh;
}

/* **************************************************************************** */
/* Contenedor principal de la alerta */
/* **************************************************************************** */
.alert-app {
    background-color: #fff;
    width: 380px;
    max-width: 90%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 4000;
    overflow: hidden;
}

/* Notificaciones (success/error) - aparecen arriba a la derecha */
.notification {
    position: fixed;
    right: 20px;
    top: 115px;
    animation: fadeIn 0.3s ease-out;
}

/* Confirmaciones - aparecen centradas */
.confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: scaleIn 0.2s ease-out;
}

/* Animacion fade in */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Animacion de escala para confirmacion */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* **************************************************************************** */
/* Header de la alerta - siempre azul */
/* **************************************************************************** */
.alert-app .alert-title {
    display: flex;
    height: 42px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
    background-color: #2d5f8b;
}

/* Boton cerrar (X) */
.alert-app .alert-title .alert-close {
    cursor: pointer;
    width: 18px;
    height: 18px;
    object-fit: contain;
    font-size: 18px;
    color: #fff;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

.alert-app .alert-title .alert-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Contenedor del icono y titulo en el header */
.alert-app .alert-title .alert-icon-text {
    display: flex;
    justify-content: left;
    align-items: center;
}

/* Icono del header (info) */
.alert-app .alert-title .alert-icon-text .icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    font-size: 20px;
    color: #fff;
}

/* Texto del titulo en el header */
.alert-app .alert-title .alert-icon-text .alert-title-text {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    margin-left: 10px;
}

/* Eliminar colores especificos del header - ahora todos son iguales */
.alert-title.error,
.alert-title.success,
.alert-title.confirm {
    background-color: #2d5f8b;
}

/* **************************************************************************** */
/* Cuerpo de la alerta */
/* **************************************************************************** */
.alert-app .alert-body {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    max-height: 200px;
    overflow-y: auto;
    min-height: 80px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: #fff;
}

/* Icono del tipo de alerta en el body */
.alert-app .alert-body .alert-type-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icono success - verde fuerte */
.alert-app .alert-body .alert-type-icon.icon-success {
    background-color: #28a745;
    color: #fff;
}

.alert-app .alert-body .alert-type-icon.icon-success::before {
    content: "\2713";
    font-size: 22px;
    font-weight: bold;
}

/* Icono error - rojo fuerte */
.alert-app .alert-body .alert-type-icon.icon-error {
    background-color: #dc3545;
    color: #fff;
}

.alert-app .alert-body .alert-type-icon.icon-error::before {
    content: "X";
    font-size: 20px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

/* Icono confirm - amarillo fuerte */
.alert-app .alert-body .alert-type-icon.icon-confirm {
    background-color: #ffc107;
    color: #fff;
}

.alert-app .alert-body .alert-type-icon.icon-confirm::before {
    content: "?";
    font-size: 24px;
    font-weight: bold;
}

/* Contenedor del mensaje */
.alert-app .alert-body .alert-message {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 40px;
}

/* Texto del mensaje */
.alert-app .alert-body .alert-message span {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* **************************************************************************** */
/* Footer - solo para confirmaciones */
/* **************************************************************************** */
.alert-app .alert-footer {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 20px;
    box-sizing: border-box;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

/* Botones del footer */
.alert-app .alert-footer > div {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 34px;
    border-radius: 4px;
    padding: 0 16px;
    color: #fff;
    box-sizing: border-box;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
}

.alert-app .alert-footer > div:hover {
    filter: brightness(110%);
}

.alert-app .alert-footer > div:active {
    transform: scale(0.98);
}

/* Boton Aceptar - azul */
.alert-app .alert-footer .okbutton {
    background-color: #2d5f8b;
    order: 2;
}

/* Boton Cancelar - gris */
.alert-app .alert-footer .cancelbutton {
    background-color: #6c757d;
    order: 1;
}

/* **************************************************************************** */
/* Scrollbar personalizado para el body */
/* **************************************************************************** */
.alert-app .alert-body::-webkit-scrollbar {
    width: 6px;
}

.alert-app .alert-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.alert-app .alert-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.alert-app .alert-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
