/* Toast 通知系统样式 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease, fadeIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: slideOutRight 0.3s ease, fadeOut 0.3s ease;
}

/* Toast 类型 */
.toast.error {
    border-left: 4px solid var(--color-danger);
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

.toast.info {
    border-left: 4px solid var(--color-primary);
}

/* Toast 图标 */
.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.error .toast-icon {
    color: var(--color-danger);
}

.toast.success .toast-icon {
    color: var(--color-success);
}

.toast.warning .toast-icon {
    color: var(--color-warning);
}

.toast.info .toast-icon {
    color: var(--color-primary);
}

/* Toast 内容 */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Toast 关闭按钮 */
.toast-close {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-secondary);
}

/* Toast 进度条 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: shrinkWidth 3s linear;
}

.toast.error .toast-progress {
    color: var(--color-danger);
}

.toast.success .toast-progress {
    color: var(--color-success);
}

.toast.warning .toast-progress {
    color: var(--color-warning);
}

.toast.info .toast-progress {
    color: var(--color-primary);
}

/* 动画 */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(400px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes shrinkWidth {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}
