/* ============================================
   Modern Toast Notification System
   Sweet, elegant notifications with animations
   ============================================ */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

/* Toast Base Styles */
.toast-notification {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Toast Icon */
.toast-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    animation: toastIconPulse 0.6s ease-out;
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.toast-message {
    font-weight: 400;
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.3;
}

/* Close Button */
.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    animation: toastProgress 5s linear forwards;
}

/* Animations */
@keyframes toastIconPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast-notification {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .toast-title {
        font-size: 14px;
    }
    
    .toast-message {
        font-size: 12px;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .toast-notification {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Multiple Toast Stacking */
.toast-notification:nth-child(1) { z-index: 100; }
.toast-notification:nth-child(2) { z-index: 99; transform: translateY(-4px) scale(0.98); }
.toast-notification:nth-child(3) { z-index: 98; transform: translateY(-8px) scale(0.96); }
.toast-notification:nth-child(4) { z-index: 97; transform: translateY(-12px) scale(0.94); }

/* Hover Effects */
.toast-notification:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.toast-notification:hover .toast-progress {
    animation-play-state: paused;
}