/* Contenedor principal de mensajes flash */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mensaje flash individual */
.flash-message {
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
    transform: translateX(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.flash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    background: currentColor;
    opacity: 0.85;
}

/* Variantes de mensajes */
.flash-success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.flash-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.flash-warning {
    background-color: #fefce8;
    color: #854d0e;
    border-left: 4px solid #eab308;
}

.flash-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Barra de progreso (opcional) */
.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: currentColor;
    opacity: 0.3;
    width: 100%;
    transform-origin: left;
    animation: progressBar 3s linear forwards;
}

/* Botón de cerrar */
.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.15rem;
}

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

/* Animaciones */
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .flash-messages {
        top: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
    
    .flash-message {
        padding: 14px 16px;
    }
}

