/* ========== TOAST NOTIFICATION SYSTEM ========== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.toast.error .toast-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.toast.info .toast-icon {
    background: linear-gradient(135deg, #74c0fc 0%, #339af0 100%);
    color: white;
}

.toast.warning .toast-icon {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: white;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Progress bar for auto-dismiss */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 12px 12px;
    transition: width linear;
}

.toast.success .toast-progress {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.toast.error .toast-progress {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.toast.info .toast-progress {
    background: linear-gradient(135deg, #74c0fc 0%, #339af0 100%);
}

.toast.warning .toast-progress {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
}

/* Dark mode adjustments */
[data-theme="dark"] .toast {
    background: var(--card-bg);
    border-color: var(--card-border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 14px 16px;
    }
    
    .toast-title {
        font-size: 15px;
    }
    
    .toast-message {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .toast-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .toast {
        padding: 12px 14px;
        border-radius: 10px;
    }
    
    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .toast-title {
        font-size: 14px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

/* Animation keyframes */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Hover effects */
.toast:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toast:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
