/**
 * Professional Notification System - Styles
 * Design moderno e responsive
 */

/* ============================================
   CONTAINER NOTIFICHE TOAST
   ============================================ */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* ============================================
   NOTIFICHE TOAST
   ============================================ */
.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    border-left: 4px solid;
}

.toast-notification.active {
    opacity: 1;
    transform: translateX(0);
}

/* Icona toast */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

/* Messaggio toast */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    font-weight: 500;
}

/* Bottone chiusura toast */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #666666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333333;
}

/* Tipi di toast */
.toast-success {
    border-left-color: #10b981;
}

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

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

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

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

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* ============================================
   MODAL
   ============================================ */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.custom-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* Contenuto modal */
.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-modal.active .modal-content {
    transform: scale(1);
}

/* Header modal */
.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

/* Body modal */
.modal-body {
    padding: 0 24px 24px;
}

.modal-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    text-align: center;
}

/* Footer modal */
.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Bottoni modal */
.modal-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.modal-btn-confirm {
    background: #3b82f6;
    color: #ffffff;
}

.modal-btn-confirm:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.modal-btn-confirm:active {
    transform: translateY(0);
}

.modal-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.modal-btn-cancel:hover {
    background: #e5e7eb;
    color: #4b5563;
}

/* Tipi di modal */
.modal-success .modal-icon {
    background: #d1fae5;
    color: #10b981;
}

.modal-success .modal-btn-confirm {
    background: #10b981;
}

.modal-success .modal-btn-confirm:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.modal-error .modal-icon {
    background: #fee2e2;
    color: #ef4444;
}

.modal-error .modal-btn-confirm {
    background: #ef4444;
}

.modal-error .modal-btn-confirm:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.modal-warning .modal-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.modal-warning .modal-btn-confirm {
    background: #f59e0b;
}

.modal-warning .modal-btn-confirm:hover {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.modal-info .modal-icon {
    background: #dbeafe;
    color: #3b82f6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast-notification {
        min-width: auto;
        width: 100%;
        max-width: none;
    }
    
    .modal-content {
        width: 95%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px 20px 12px;
    }
    
    .modal-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }
    
    .modal-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 0 20px 20px;
    }
    
    .modal-message {
        font-size: 14px;
    }
    
    .modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column-reverse;
    }
    
    .modal-btn {
        width: 100%;
        min-width: auto;
    }
}

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Dark mode support (opzionale) */
@media (prefers-color-scheme: dark) {
    .toast-notification {
        background: #1f2937;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .toast-message {
        color: #f3f4f6;
    }
    
    .toast-close {
        color: #9ca3af;
    }
    
    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f3f4f6;
    }
    
    .modal-content {
        background: #1f2937;
    }
    
    .modal-title {
        color: #f9fafb;
    }
    
    .modal-message {
        color: #d1d5db;
    }
    
    .modal-btn-cancel {
        background: #374151;
        color: #d1d5db;
    }
    
    .modal-btn-cancel:hover {
        background: #4b5563;
        color: #f3f4f6;
    }
}
