/* Toast Notification System */

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

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

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

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

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

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

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

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

.toast.success .toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.toast.warning .toast-icon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

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

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    margin: -4px -4px -4px 0;
    border-radius: 4px;
    transition: all 0.15s;
    flex-shrink: 0;
}

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

.toast-close svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Toast Action Button */
.toast-action {
    margin-top: 8px;
}

.toast-action-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.toast-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.toast.success .toast-action-btn:hover {
    border-color: var(--success);
    color: var(--success);
}

.toast.error .toast-action-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--text-muted);
    opacity: 0.3;
    transition: width linear;
}

.toast.success .toast-progress {
    background: var(--success);
}

.toast.error .toast-progress {
    background: var(--danger);
}

.toast.warning .toast-progress {
    background: var(--warning);
}

.toast.info .toast-progress {
    background: var(--info);
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 12px;
        right: 12px;
        max-width: none;
    }

    .toast {
        padding: 12px;
    }
}
