/* Sistema de Notificaciones Elegante */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    border-left: 4px solid;
    backdrop-filter: blur(20px);
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Tipos de notificación */
.notification.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.notification.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.notification.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.notification.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.notification.edit {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.08) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.notification.edit .notification-text {
    color: #4c1d95;
    font-weight: 600;
}

.notification.edit .notification-text strong {
    color: #8b5cf6;
    font-weight: 600;
}

/* Contenido de la notificación */
.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    margin-top: 2px;
}

.notification.success .notification-icon {
    background: #10b981;
}

.notification.success .notification-text {
    color: #064e3b;
}

.notification.error .notification-icon {
    background: #ef4444;
}

.notification.error .notification-text {
    color: #7f1d1d;
}

.notification.warning .notification-icon {
    background: #f59e0b;
}

.notification.warning .notification-text {
    color: #78350f;
}

.notification.info .notification-icon {
    background: #3b82f6;
}

.notification.info .notification-text {
    color: #1e3a8a;
}

.notification.edit .notification-icon {
    background: #8b5cf6;
    font-size: 14px;
    animation: editPulse 2s infinite;
}

@keyframes editPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(139, 92, 246, 0);
    }
}

.notification-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.5;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
    transform: scale(1.1);
}

/* Barra de progreso */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.notification-progress-bar {
    height: 100%;
    background: currentColor;
    width: 100%;
    transform-origin: left;
    animation: progressBar 5s linear forwards;
}

.notification.success .notification-progress-bar {
    background: #10b981;
}

.notification.error .notification-progress-bar {
    background: #ef4444;
}

.notification.warning .notification-progress-bar {
    background: #f59e0b;
}

.notification.info .notification-progress-bar {
    background: #3b82f6;
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Efectos adicionales */
.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.8s ease;
}

.notification.show::before {
    left: 100%;
}

/* Responsivo */
@media (max-width: 480px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        margin-bottom: 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }
    
    .notification-text {
        color: #f9fafb;
    }
    
    .notification-close {
        color: #9ca3af;
    }
    
    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f9fafb;
    }
}