/* ==============================================
   Toast Notifications
   ============================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    animation: toastSlideIn 0.3s ease;
    pointer-events: auto;
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

@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;
    }
}

/* Toast Icon */
.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

/* Toast Content */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Toast Close */
.toast-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

/* Toast Types */
.toast-success {
    border-left: 3px solid var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left: 3px solid var(--danger);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning {
    border-left: 3px solid var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info {
    border-left: 3px solid var(--accent);
}

.toast-info .toast-icon {
    color: var(--accent);
}

/* Toast with action */
.toast-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.toast-action {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.toast-action:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}
