/**
 * ComfyUI Workflow Manager - Frontend Styles
 * UIkit CSS 兼容样式
 */

/* 任务状态容器 */
.cwm-task-status-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cwm-section {
    margin-bottom: 40px;
}

.cwm-section h3 {
    margin-bottom: 20px;
    color: #333;
}

/* 任务卡片 */
.cwm-task-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cwm-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cwm-task-completed {
    border-left: 4px solid #32d296;
}

.cwm-task-failed {
    border-left: 4px solid #f0506e;
}

/* 状态徽章 */
.cwm-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.cwm-status-pending {
    background: #fff3cd;
    color: #856404;
}

.cwm-status-queued {
    background: #e2e3e5;
    color: #383d41;
}

.cwm-status-running {
    background: #cce5ff;
    color: #004085;
}

.cwm-status-completed {
    background: #d4edda;
    color: #155724;
}

.cwm-status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* 进度条 */
.cwm-progress-wrapper {
    position: relative;
    margin: 10px 0;
}

.cwm-progress-wrapper .uk-progress {
    height: 20px;
    margin: 0;
}

.cwm-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* 任务进度容器 */
.cwm-task-progress-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

.cwm-progress-wrapper-large {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cwm-progress-bar-large {
    position: relative;
    margin: 20px 0;
}

.cwm-progress-bar-large .uk-progress {
    height: 30px;
    margin: 0;
}

.cwm-progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 结果预览 */
.cwm-results-preview img,
.cwm-results-preview video {
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.cwm-results-preview a:hover img,
.cwm-results-preview a:hover video {
    transform: scale(1.02);
}

.cwm-task-preview img {
    border-radius: 4px;
    max-height: 200px;
    object-fit: cover;
}

/* 任务信息 */
.cwm-task-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.cwm-task-meta {
    margin-top: 10px;
}

/* 状态信息 */
.cwm-status-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* 动画 */
@keyframes cwm-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.cwm-status-running .cwm-status-badge {
    animation: cwm-pulse 2s infinite;
}

/* 响应式 */
@media (max-width: 640px) {
    .cwm-task-status-container {
        padding: 10px;
    }

    .cwm-progress-wrapper-large {
        padding: 15px;
    }

    .cwm-task-info {
        flex-direction: column;
        gap: 5px;
    }
}
