/* Toast Notification System - Modern & Beautiful */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    animation: slideOut 0.3s ease-in forwards;
}

/* Toast Types */
.toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.toast.success .toast-icon {
    background: #10b981;
    color: white;
}

.toast.error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast.warning .toast-icon {
    background: #f59e0b;
    color: white;
}

.toast.info .toast-icon {
    background: #3b82f6;
    color: white;
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    margin-left: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    transition: width linear;
    border-radius: 0 0 12px 12px;
}

.toast.success .toast-progress {
    background: #10b981;
}

.toast.error .toast-progress {
    background: #ef4444;
}

.toast.warning .toast-progress {
    background: #f59e0b;
}

.toast.info .toast-progress {
    background: #3b82f6;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .toast.hide {
        animation: slideOutMobile 0.3s ease-in forwards;
    }
    
    @keyframes slideIn {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOutMobile {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        color: #f9fafb;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .toast.success {
        background: linear-gradient(135deg, #064e3b 0%, #1f2937 100%);
    }
    
    .toast.error {
        background: linear-gradient(135deg, #7f1d1d 0%, #1f2937 100%);
    }
    
    .toast.warning {
        background: linear-gradient(135deg, #78350f 0%, #1f2937 100%);
    }
    
    .toast.info {
        background: linear-gradient(135deg, #1e3a8a 0%, #1f2937 100%);
    }
    
    .toast-title {
        color: #f9fafb;
    }
    
    .toast-message {
        color: #d1d5db;
    }
}
