
/* ==========================================
   ARCUEROS — SISTEMA UNIFICADO DE ALERTAS
========================================== */

.alert-messages {
    position: fixed !important;
    top: 100px !important;
    right: 24px !important;
    left: auto !important;
    bottom: auto !important;

    width: min(390px, calc(100vw - 32px)) !important;
    margin: 0 !important;

    display: flex;
    flex-direction: column;
    gap: 12px;

    z-index: 99999;
    pointer-events: none;
}

.alert-message {
    pointer-events: auto;
}

/* Éxito */
.alert-message.success {
    background: #effaf2;
    color: #176534;
    border-color: #b7e4c7;
    border-left-color: #239b56;
}

/* Advertencia */
.alert-message.warning {
    background: #fff8df;
    color: #755900;
    border-color: #f1d66b;
    border-left-color: #fac800;
}

/* Error */
.alert-message.error {
    background: #fff1f0;
    color: #a32119;
    border-color: #f2c1bd;
    border-left-color: #d93636;
}

/* Información */
.alert-message.info {
    background: #eef5ff;
    color: #174a8b;
    border-color: #c5dcff;
    border-left-color: #3185d6;
}

/* Icono */
.alert-message .alert-icon {
    flex-shrink: 0;
    font-size: 20px;
}

/* Texto */
.alert-message .alert-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Botón para cerrar */
.alert-message .alert-close {
    flex-shrink: 0;
    padding: 4px 7px;

    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;

    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.alert-message .alert-close:hover {
    background: rgb(0 0 0 / 8%);
}

/* Entrada */
@keyframes alertaEntrada {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Salida opcional */
.alert-message.alert-saliendo {
    animation: alertaSalida 0.2s ease forwards;
}

@keyframes alertaSalida {
    to {
        opacity: 0;
        transform: translateX(15px);
    }
}

/* Celulares */
@media (max-width: 600px) {
    .alert-messages {
        top: 82px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .alert-message {
        padding: 12px;
        gap: 9px;
        font-size: 13px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .alert-message,
    .alert-message.alert-saliendo {
        animation: none;
    }
}
