/* Sistema di Notifiche Moderne */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-overlay.show {
    opacity: 1;
    visibility: visible;
}

.notification-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-overlay.show .notification-modal {
    transform: scale(1) translateY(0);
}

.notification-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-modal.success .notification-icon {
    color: #10b981;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification-modal.error .notification-icon {
    color: #ef4444;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification-modal.warning .notification-icon {
    color: #f59e0b;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification-modal.info .notification-icon {
    color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1f2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.notification-message {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 400;
}

.notification-close {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.notification-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.notification-close:hover::before {
    left: 100%;
}

.notification-close:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.notification-modal.success .notification-close {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.notification-modal.success .notification-close:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.notification-modal.error .notification-close {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.notification-modal.error .notification-close:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.notification-modal.warning .notification-close {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.notification-modal.warning .notification-close:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* Animazioni Moderne */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(2deg);
    }
    70% {
        transform: scale(0.9) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translateX(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

@keyframes progressBar {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
}


/* Banner di riattivazione notifiche */
.notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
}

.banner-content i {
    font-size: 20px;
    opacity: 0.9;
}

.banner-content span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.btn-reactivate {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reactivate:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.btn-dismiss {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.btn-dismiss:hover {
    background: rgba(255,255,255,0.2);
}

/* Notifiche Toast Moderne */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 320px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transform: translateX(100%) scale(0.9);
    opacity: 0;
    animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.notification i {
    font-size: 1.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.notification-message {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
    margin: 0;
}

.notification-close {
    background: rgba(107, 114, 128, 0.1);
    border: none;
    color: #6b7280;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #374151;
    transform: scale(1.1);
}

/* Progress Bar */
.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 16px 16px;
    animation: progressBar 4s linear forwards;
    opacity: 0.3;
}

/* Varianti di colore */
.notification.success {
    border-left: 4px solid #10b981;
}

.notification.success i {
    color: #ffffff !important;
    /* Gradiente rimosso per rendere l'icona visibile */
}

.notification.success::after {
    background: linear-gradient(90deg, #10b981, #059669);
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.error i {
    color: #ef4444;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification.error::after {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.warning i {
    color: #f59e0b;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification.warning::after {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

.notification.info i {
    color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification.info::after {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Stacking per notifiche multiple */
.notification:nth-child(2) {
    top: 104px;
    transform: translateX(100%) scale(0.95);
}

.notification:nth-child(3) {
    top: 184px;
    transform: translateX(100%) scale(0.9);
}

.notification:nth-child(4) {
    top: 264px;
    transform: translateX(100%) scale(0.85);
    opacity: 0.8;
}

/* Animazione di uscita */
.notification.fade-out {
    animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Animazioni */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design Moderno */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .banner-content span {
        font-size: 13px;
    }
    
    .notification {
        left: 16px;
        right: 16px;
        min-width: auto;
        max-width: none;
        padding: 16px 20px;
        border-radius: 12px;
    }
    
    .notification i {
        font-size: 1.25rem;
    }
    
    .notification-message {
        font-size: 0.9rem;
    }
    
    .notification-close {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .notification:nth-child(2) {
        top: 88px;
    }
    
    .notification:nth-child(3) {
        top: 152px;
    }
    
    .notification:nth-child(4) {
        top: 216px;
    }
    
    .notification-modal {
        padding: 32px 24px;
        margin: 0 16px;
        border-radius: 20px;
    }
    
    .notification-icon {
        font-size: 3.5rem;
        margin-bottom: 20px;
    }
    
    .notification-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .notification-message {
        font-size: 1rem;
        margin-bottom: 28px;
    }
    
    .notification-close {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .notification {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .notification i {
        font-size: 1.1rem;
    }
    
    .notification-message {
        font-size: 0.85rem;
    }
    
    .notification-close {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}