/**
 * Gifty Toast System - CSS Styles
 * Sistema di notifiche toast riutilizzabili per Gifty
 * 
 * Utilizzare con le funzioni JavaScript:
 * - showGiftyToast(message, type, duration, options)
 * - showGiftySuccess(message, duration)
 * - showGiftyError(message, duration)
 * - showGiftyWarning(message, duration)
 * - showGiftyInfo(message, duration)
 */

/* Stili base per toast Gifty */
.gifty-toast {
    border-radius: 12px !important;
    padding: 16px 20px !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(129, 205, 199, 0.2) !important;
    min-width: 280px !important;
    max-width: 350px !important;
    position: relative !important;
    overflow: hidden !important;
}

.gifty-toast-content {
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #666666 !important;
    text-align: left !important;
    margin-bottom: 0 !important;
    word-wrap: break-word !important;
}

.gifty-toast-icon {
    width: 32px !important;
    height: 32px !important;
    margin: 0 8px 0 0 !important;
    font-size: 18px !important;
    border: none !important;
    background: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(129, 205, 199, 0.1) !important;
    border-radius: 50% !important;
    border: 2px solid rgba(129, 205, 199, 0.3) !important;
}

/* Personalizzazione icone per diversi tipi */
.swal2-toast .swal2-icon {
    width: 32px !important;
    height: 32px !important;
    margin: 0 8px 0 0 !important;
    font-size: 18px !important;
    border: none !important;
    background: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Personalizzazione contenuto toast */
.swal2-toast .swal2-title {
    margin: 0 !important;
    padding: 0 !important;
    display: none !important; /* Nascondiamo il titolo per design minimale */
}

.swal2-toast .swal2-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Close button per toast */
.swal2-toast .swal2-close {
    font-size: 18px !important;
    color: #999 !important;
    width: 20px !important;
    height: 20px !important;
    top: 8px !important;
    right: 8px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    transition: color 0.3s ease !important;
}

.swal2-toast .swal2-close:hover {
    color: #666 !important;
    background: none !important;
}

/* Animazione per la barra di progresso */
@keyframes giftyProgressBar {
    from {
        width: 100%;
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    to {
        width: 0%;
        opacity: 0.5;
    }
}

/* Effetti hover per il toast */
.gifty-toast:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .gifty-toast {
        min-width: 260px !important;
        max-width: 300px !important;
        padding: 14px 18px !important;
        border-radius: 10px !important;
        margin: 10px !important;
    }
    
    .gifty-toast-content {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }
    
    .gifty-toast-icon {
        width: 28px !important;
        height: 28px !important;
        margin: 0 6px 0 0 !important;
    }
    
    .swal2-toast .swal2-icon {
        width: 28px !important;
        height: 28px !important;
        margin: 0 6px 0 0 !important;
    }
    
    .swal2-toast .swal2-close {
        font-size: 16px !important;
        width: 18px !important;
        height: 18px !important;
        top: 6px !important;
        right: 6px !important;
    }
}

/* Personalizzazione per posizioni diverse */
.swal2-container[class*='swal2-top-end'] .gifty-toast {
    margin-right: 20px !important;
    margin-top: 20px !important;
}

.swal2-container[class*='swal2-top-start'] .gifty-toast {
    margin-left: 20px !important;
    margin-top: 20px !important;
}

.swal2-container[class*='swal2-bottom-end'] .gifty-toast {
    margin-right: 20px !important;
    margin-bottom: 20px !important;
}

.swal2-container[class*='swal2-bottom-start'] .gifty-toast {
    margin-left: 20px !important;
    margin-bottom: 20px !important;
}

/* Animazione di entrata personalizzata */
@keyframes giftyToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.gifty-toast.swal2-show {
    animation: giftyToastSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Personalizzazione per tema scuro (se necessario in futuro) */
@media (prefers-color-scheme: dark) {
    .gifty-toast {
        background: #2c3e50 !important;
        border: 1px solid rgba(129, 205, 199, 0.3) !important;
        color: #ecf0f1 !important;
    }
    
    .gifty-toast-content {
        color: #bdc3c7 !important;
    }
    
    .swal2-toast .swal2-close {
        color: #bdc3c7 !important;
    }
    
    .swal2-toast .swal2-close:hover {
        color: #ecf0f1 !important;
    }
}

/* Stacking per multiple toast */
.swal2-container .swal2-popup.gifty-toast {
    position: relative !important;
    margin-bottom: 10px !important;
}

/* Personalizzazione per animazioni multiple */
.gifty-toast:nth-child(2) {
    animation-delay: 0.1s !important;
}

.gifty-toast:nth-child(3) {
    animation-delay: 0.2s !important;
}

.gifty-toast:nth-child(4) {
    animation-delay: 0.3s !important;
} 