/* ============================================================
   TOAST NOTIFICATION SYSTEM
   ============================================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: var(--card-bg);
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    min-width: 320px;
    position: relative;
    overflow: hidden;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Toast Types */
.toast.success {
    border-color: var(--success-color);
    background: var(--toast-success-bg);
}

.toast.error {
    border-color: var(--danger-color);
    background: var(--toast-error-bg);
}

.toast.info {
    border-color: var(--primary-color);
    background: var(--toast-info-bg);
}

.toast.warning {
    border-color: var(--warning-color);
    background: #fffbeb;
}

[data-theme="dark"] .toast.warning {
    background: #78350f;
}

/* Toast Icon */
.toast-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    line-height: 1;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

/* Toast Content */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.875em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Toast Close Button */
.toast-close {
    background: none;
    border: none;
    font-size: 1.2em;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toastProgress 5s linear;
}

.toast.success .toast-progress {
    background: var(--success-color);
}

.toast.error .toast-progress {
    background: var(--danger-color);
}

.toast.info .toast-progress {
    background: var(--primary-color);
}

.toast.warning .toast-progress {
    background: var(--warning-color);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
    }
}
