/* 进度显示样式 */

/* 页面级进度容器（旧版本兼容） */
.progress-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    width: 320px;
    max-width: 90vw;
}

/* 消息内进度容器 */
.message-progress-container {
    margin: 12px 0;
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.message-progress-container .progress-container {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    z-index: auto;
    margin: 0;
}

/* 进度项 */
.progress-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.3s ease-out;
}

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

/* 进度内容 */
.progress-content {
    display: flex;
    align-items: center;
    padding: 16px;
    min-height: 60px;
}

/* 进度图标 */
.progress-icon {
    font-size: 20px;
    margin-right: 12px;
    min-width: 24px;
    text-align: center;
}

/* 进度信息 */
.progress-info {
    flex: 1;
    min-width: 0;
}

/* 进度标题 */
.progress-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 进度消息 */
.progress-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* 进度条容器 */
.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

/* 进度填充 */
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 进度百分比 */
.progress-percent {
    font-size: 12px;
    color: #666;
    text-align: right;
    font-weight: 500;
}

/* 整体进度样式 */
.overall-progress-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.overall-progress-label {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    margin-bottom: 6px;
}

.overall-progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.overall-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #21CBF3);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.overall-progress-percent {
    font-size: 11px;
    color: #2196F3;
    text-align: right;
    font-weight: 600;
}

/* 状态特定样式 */
.progress-started .progress-icon {
    animation: spin 1s linear infinite;
}

.progress-progressing .progress-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-completed .progress-icon {
    color: #4CAF50;
}

.progress-error .progress-icon {
    color: #f44336;
}

.progress-error .progress-title {
    color: #f44336;
}

.progress-error .progress-message {
    color: #d32f2f;
}

/* 动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .progress-container {
        top: 60px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: none;
    }
    
    .message-progress-container .progress-container {
        width: 100%;
        max-width: 100%;
    }
    
    .progress-content {
        padding: 12px;
    }
    
    .progress-title {
        font-size: 13px;
    }
    
    .progress-message {
        font-size: 12px;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .progress-item {
        background: rgba(30, 30, 30, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .progress-title {
        color: #fff;
    }
    
    .progress-message {
        color: #ccc;
    }
    
    .progress-bar {
        background-color: #444;
    }
    
    .progress-percent {
        color: #aaa;
    }
    
    .progress-error .progress-title {
        color: #ff6b6b;
    }
    
    .progress-error .progress-message {
        color: #ff5252;
    }
}

/* 进度清单样式 */
.todo-list {
    width: 100%;
    max-width: 400px;
    margin: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.todo-item.completed {
    opacity: 0.8;
}

.todo-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.todo-item.error {
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

.todo-item.pending {
    opacity: 0.5;
}

/* 图标样式已移至伪元素定义 */

.todo-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 圆圈+勾样式 */
.todo-icon::before {
    content: '○';
    color: #999;
}

.todo-item.completed .todo-icon::before {
    content: '●';
    color: #4CAF50;
}

.todo-item.completed .todo-icon::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 10px;
    margin-left: -1px;
    margin-top: -1px;
}

.todo-item.active .todo-icon::before {
    content: '◐';
    color: #2196F3;
    animation: spin 1s linear infinite;
}

.todo-item.error .todo-icon::before {
    content: '●';
    color: #f44336;
}

.todo-item.error .todo-icon::after {
    content: '✗';
    position: absolute;
    color: white;
    font-size: 10px;
    margin-left: -1px;
    margin-top: -1px;
}

.todo-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.todo-title {
    font-weight: 500;
    font-size: 13px;
    color: #282828;
}

.todo-description {
    font-size: 12px;
    color: #282828;
    line-height: 1.3;
    word-wrap: break-word;
    margin-left: 4px;
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .todo-item.active {
        background: rgba(59, 130, 246, 0.15);
    }
    
    .todo-item.error {
        background: rgba(239, 68, 68, 0.15);
    }
}

/* 移除复杂的动画效果，保持简洁 */