/**
 * Modern Notification Styles
 * Stili per notifiche moderne con animazioni e design Apple-inspired
 */

/* Container per notifiche */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

/* Notifica base */
.notification {
    position: relative;
    min-width: 320px;
    max-width: 480px;
    margin-bottom: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12),
                0 2px 10px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: all;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Stati delle notifiche */
.notification.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #15803d;
    border-color: #86efac;
}

.notification.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #b91c1c;
    border-color: #fca5a5;
}

.notification.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
    border-color: #fcd34d;
}

.notification.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-color: #93c5fd;
}

/* Icona nella notifica */
.notification::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(currentColor, 0.2);
}

/* Padding extra per l'icona */
.notification {
    padding-left: 40px;
}

/* Animazioni */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animazione di uscita */
.notification.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(110%);
        opacity: 0;
    }
}

/* Hover effect */
.notification:hover {
    transform: translateX(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15),
                0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Progress bar per timeout */
.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.2;
    border-radius: 0 0 12px 12px;
    animation: progress var(--duration, 3s) linear;
    transform-origin: left;
}

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

/* Pulsante di chiusura (opzionale) */
.notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: currentColor;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Mobile responsive */
@media (max-width: 640px) {
    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .notification.success {
        background: rgba(34, 197, 94, 0.1);
    }
    
    .notification.error {
        background: rgba(239, 68, 68, 0.1);
    }
    
    .notification.warning {
        background: rgba(245, 158, 11, 0.1);
    }
    
    .notification.info {
        background: rgba(59, 130, 246, 0.1);
    }
}