﻿/* ================================================
   ALERTAS TEMPORALES
   ================================================ */

.alerta-temporal {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInAlert 0.4s ease-out;
}

.alerta-top {
    top: 56px; /* Altura del navbar */
}

.alerta-bottom {
    bottom: 0;
}

.alerta-contenido {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    position: relative;
}

.alerta-icono {
    flex-shrink: 0;
    font-size: 1.5rem;
}

.alerta-imagen {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

    .alerta-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.alerta-texto {
    flex: 1;
    min-width: 200px;
}

.alerta-titulo {
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.alerta-descripcion {
    font-size: 0.9rem;
    opacity: 0.95;
}

.alerta-btn {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .alerta-btn:hover {
        transform: translateX(3px);
    }

.alerta-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .alerta-close:hover {
        opacity: 1;
    }

/* TIPOS DE ALERTAS */
.alerta-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-left: 5px solid #bd2130;
}

    .alerta-danger .alerta-btn {
        background: white;
        color: #dc3545;
    }

.alerta-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border-left: 5px solid #d39e00;
}

    .alerta-warning .alerta-btn {
        background: #212529;
        color: #ffc107;
    }

.alerta-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
    color: #212529;
    border-left: 5px solid #0997b4;
}

    .alerta-info .alerta-btn {
        background: white;
        color: #0dcaf0;
    }

.alerta-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
    border-left: 5px solid #146c43;
}

    .alerta-success .alerta-btn {
        background: white;
        color: #198754;
    }

/* ANIMACIONES */
@keyframes slideInAlert {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

.alerta-cerrando {
    animation: slideOutAlert 0.3s ease-out forwards;
}

@keyframes slideOutAlert {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.alerta-bottom.alerta-cerrando {
    animation: slideOutAlertBottom 0.3s ease-out forwards;
}

@keyframes slideOutAlertBottom {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .alerta-contenido {
        padding: 10px 15px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .alerta-icono {
        font-size: 1.25rem;
    }

    .alerta-titulo {
        font-size: 0.9rem;
    }

    .alerta-descripcion {
        font-size: 0.8rem;
    }

    .alerta-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}
