/* CSS para las notificaciones flash */
.flash-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.flash-notification {
    background: #ffffffc9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(-100%);
    animation: slideInFromRight 0.3s ease-out forwards;
}

/* Animación de entrada (desde la derecha) */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de salida (hacia la derecha) */
@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.flash-notification.hiding {
    animation: slideOutToRight 0.3s ease-in forwards;
}

.flash-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.flash-icon {
    margin-right: 12px;
    flex-shrink: 0;
}

.flash-message {
    font-size: 14px;
    line-height: 1.4;
    color: var(--slim-main-dark);
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    margin-left: 8px;
    display: flex;
}

.flash-close svg{
    transition: transform 0.2s ease;
}

.flash-close svg:hover {
    transform: scale(1.2);
}

/* Estilos específicos por tipo de notificación */
.flash-success {
    border-left-color: #10b981;
}

.flash-success .flash-icon {
    color: #10b981;
}

.flash-error,
.flash-danger {
    border-left-color: var(--slim-alert-button);
}

.flash-error .flash-icon,
.flash-danger .flash-icon {
    color: var(--slim-alert-button);
}

.flash-warning {
    border-left-color: #f59e0b;
}

.flash-warning .flash-icon {
    color: #f59e0b;
}

.flash-info {
    border-left-color: var(--slim-standard-button);
}

.flash-info .flash-icon {
    color: var(--slim-standard-button);
}

/* Versión alternativa con fondo coloreado */
.flash-notification.colored {
    color: white;
    border-left: none;
}

.flash-notification.colored .flash-message {
    color: white;
}

.flash-notification.colored .flash-close {
    color: rgba(255, 255, 255, 0.8);
}

.flash-notification.colored .flash-close:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.flash-success.colored {
    background-color: #10b981;
}

.flash-error.colored,
.flash-danger.colored {
    background-color: #ef4444;
}

.flash-warning.colored {
    background-color: #f59e0b;
}

.flash-info.colored {
    background-color: #3b82f6;
}

/* Responsivo */
@media (max-width: 640px) {
    .flash-notifications-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .flash-notification {
        padding: 12px;
    }

    .flash-message {
        font-size: 13px;
    }
}