/* Toast 提示框 - Metro UI */
.toast-container {
    position: fixed;
    top: calc(56px + var(--spacing-unit) * 3);
    right: calc(var(--spacing-unit) * 3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    border: 2px solid;
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 3);
    display: flex;
    align-items: flex-start;
    gap: calc(var(--spacing-unit) * 2);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Toast 类型样式 */
.toast.success {
    border-color: #107c10;
}

.toast.success .toast-icon {
    color: #107c10;
}

.toast.error {
    border-color: #d13438;
}

.toast.error .toast-icon {
    color: #d13438;
}

.toast.info {
    border-color: var(--primary-color);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

/* 动画 */
@keyframes toastSlideIn {
    from {
        transform: translateX(calc(100% + var(--spacing-unit) * 3));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(calc(100% + var(--spacing-unit) * 3));
        opacity: 0;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: calc(56px + var(--spacing-unit) * 2);
        right: calc(var(--spacing-unit) * 2);
        left: calc(var(--spacing-unit) * 2);
        max-width: none;
    }
    
    .toast {
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
    }
    
    .toast-message {
        font-size: 13px;
    }
}
