/* 批量改图 - 场景模式样式 */

/* ===== 场景选择区 ===== */
.batch-scene-selector {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.batch-scene-header {
    text-align: center;
    margin-bottom: 12px;
}

.batch-scene-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    margin: 0 0 4px 0;
}

.batch-scene-header p {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

/* 场景网格 - 一行6个 */
.batch-scene-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

/* 场景卡片 */
.batch-scene-card {
    background: var(--bg-primary, #ffffff);
    border: 1.5px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.batch-scene-card:hover {
    border-color: var(--mx-violet, #713dea);
    background: var(--bg-hover, #f5f3ff);
    transform: translateY(-1px);
}

.batch-scene-card:focus {
    outline: none;
    border-color: var(--mx-violet, #713dea);
    box-shadow: 0 0 0 2px rgba(113, 61, 234, 0.2);
}

.batch-scene-card.active {
    border-color: var(--mx-violet, #713dea);
    background: rgba(113, 61, 234, 0.08);
}

.batch-scene-card.active .batch-scene-icon {
    color: var(--mx-violet, #713dea);
}

.batch-scene-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #6b7280);
    transition: color 0.2s ease;
}

.batch-scene-icon svg {
    width: 22px;
    height: 22px;
}

.batch-scene-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.batch-scene-desc {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    line-height: 1.2;
}

/* 场景示例区 */
.batch-scene-examples {
    margin-top: 12px;
    padding: 14px 16px;
    background: var(--bg-primary, #ffffff);
    border-radius: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.batch-scene-example-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.batch-scene-example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.batch-scene-example-item .example-label {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.batch-scene-example-item .example-box {
    width: 100px;
    height: 64px;
    background: var(--bg-secondary, #f3f4f6);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-color, #d1d5db);
    font-size: 11px;
    color: var(--text-tertiary, #9ca3af);
}

.batch-scene-example-arrow {
    font-size: 20px;
    color: var(--text-tertiary, #9ca3af);
}

.batch-scene-example-text {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.batch-scene-example-text p {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.5;
}

/* ===== 场景模式上传区 ===== */
.batch-scene-upload-area {
    /* 场景模式下的双上传区容器 */
}

/* 参考图区域 */
.batch-reference-area {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.batch-reference-area .batch-card-head {
    margin-bottom: 10px;
}

.batch-ref-required {
    font-size: 11px;
    color: var(--error-color, #ef4444);
    margin-left: 4px;
}

/* 参考图上传区样式调整 */
.batch-upload-zone-ref {
    min-height: 100px;
    padding: 16px;
}

.batch-upload-zone-ref .batch-upload-icon {
    font-size: 24px;
}

.batch-upload-zone-ref .batch-upload-title {
    font-size: 13px;
}

.batch-upload-zone-ref .batch-upload-sub {
    font-size: 11px;
}

/* 参考图预览 */
.batch-reference-preview {
    position: relative;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
}

.batch-reference-preview img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    display: block;
    background: var(--bg-secondary, #f3f4f6);
}

.batch-ref-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.batch-ref-remove:hover {
    background: var(--error-color, #ef4444);
}

/* ===== 场景参数区 ===== */
.batch-scene-params {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

.batch-scene-params-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 10px;
}

.batch-scene-param-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.batch-scene-param-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s;
}

.batch-scene-param-option:hover {
    border-color: var(--mx-violet, #713dea);
}

.batch-scene-param-option.active {
    background: var(--mx-violet, #713dea);
    border-color: var(--mx-violet, #713dea);
    color: #fff;
}

.batch-scene-param-option input[type="radio"] {
    display: none;
}

/* 复选框样式 */
.batch-scene-param-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s;
}

.batch-scene-param-checkbox:hover {
    border-color: var(--mx-violet, #713dea);
}

.batch-scene-param-checkbox.checked {
    background: rgba(113, 61, 234, 0.08);
    border-color: var(--mx-violet, #713dea);
    color: var(--mx-violet, #713dea);
}

.batch-scene-param-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--mx-violet, #713dea);
}

/* ===== 队列项样式 ===== */
.batch-queue-item {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
    flex-shrink: 0;
}

.batch-queue-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.batch-queue-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.batch-queue-item:hover .batch-queue-remove {
    opacity: 1;
}

.batch-queue-remove:hover {
    background: var(--error-color, #ef4444);
}

/* 场景模式队列列表 - 横向排列 */
#batchQueueListScene {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    gap: 8px !important;
    max-height: none !important;
    overflow: visible !important;
}

/* 覆盖原始 batch-edit.css 中的样式 */
#batchQueueListScene .batch-queue-item {
    display: block !important;
    grid-template-columns: none !important;
    padding: 0 !important;
    gap: 0 !important;
    align-items: initial !important;
    width: 56px !important;
    height: 56px !important;
    flex-shrink: 0;
}

/* ===== 隐藏/显示控制 ===== */
.batch-scene-upload-area[hidden],
.batch-standard-area[hidden],
.batch-scene-examples[hidden],
.batch-reference-preview[hidden],
.batch-scene-params[hidden] {
    display: none !important;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .batch-scene-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .batch-scene-selector {
        padding: 12px 14px;
    }

    .batch-scene-header {
        margin-bottom: 10px;
    }

    .batch-scene-header h2 {
        font-size: 15px;
    }

    .batch-scene-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .batch-scene-card {
        padding: 10px 6px;
    }

    .batch-scene-icon {
        width: 24px;
        height: 24px;
    }

    .batch-scene-icon svg {
        width: 20px;
        height: 20px;
    }

    .batch-scene-title {
        font-size: 12px;
    }

    .batch-scene-desc {
        font-size: 10px;
    }

    .batch-scene-example-content {
        flex-direction: column;
        gap: 10px;
    }

    .batch-scene-example-arrow {
        transform: rotate(90deg);
    }

    .batch-scene-param-group {
        flex-direction: column;
    }

    .batch-scene-param-option,
    .batch-scene-param-checkbox {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .batch-scene-selector {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .batch-scene-header h2 {
        font-size: 14px;
    }

    .batch-scene-header p {
        font-size: 12px;
    }

    .batch-scene-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 暗色主题 ===== */
.theme-night .batch-scene-selector {
    background: var(--bg-secondary-dark, #1f2937);
}

.theme-night .batch-scene-header h2 {
    color: var(--text-primary-dark, #f9fafb);
}

.theme-night .batch-scene-header p {
    color: var(--text-secondary-dark, #9ca3af);
}

.theme-night .batch-scene-card {
    background: var(--bg-primary-dark, #111827);
    border-color: var(--border-color-dark, #374151);
}

.theme-night .batch-scene-card:hover {
    border-color: var(--mx-violet, #713dea);
    background: var(--bg-hover-dark, #1e293b);
}

.theme-night .batch-scene-card.active {
    background: rgba(113, 61, 234, 0.15);
}

.theme-night .batch-scene-card.active .batch-scene-icon {
    color: var(--mx-violet-soft, #ab7aff);
}

.theme-night .batch-scene-icon {
    color: var(--text-secondary-dark, #9ca3af);
}

.theme-night .batch-scene-title {
    color: var(--text-primary-dark, #f9fafb);
}

.theme-night .batch-scene-desc {
    color: var(--text-secondary-dark, #9ca3af);
}

.theme-night .batch-scene-examples {
    background: var(--bg-primary-dark, #111827);
    border-color: var(--border-color-dark, #374151);
}

.theme-night .batch-scene-example-item .example-box {
    background: var(--bg-secondary-dark, #1f2937);
    border-color: var(--border-color-dark, #374151);
    color: var(--text-tertiary-dark, #6b7280);
}

.theme-night .batch-reference-area {
    border-top-color: var(--border-color-dark, #374151);
}

.theme-night .batch-reference-preview {
    border-color: var(--border-color-dark, #374151);
}

.theme-night .batch-reference-preview img {
    background: var(--bg-secondary-dark, #1f2937);
}

.theme-night .batch-scene-params {
    background: var(--bg-secondary-dark, #1f2937);
}

.theme-night .batch-scene-params-title {
    color: var(--text-primary-dark, #f9fafb);
}

.theme-night .batch-scene-param-option,
.theme-night .batch-scene-param-checkbox {
    background: var(--bg-primary-dark, #111827);
    border-color: var(--border-color-dark, #374151);
    color: var(--text-secondary-dark, #9ca3af);
}

.theme-night .batch-scene-param-option:hover,
.theme-night .batch-scene-param-checkbox:hover {
    border-color: var(--mx-violet, #713dea);
}

.theme-night .batch-scene-param-checkbox.checked {
    background: rgba(113, 61, 234, 0.15);
    color: var(--mx-violet-soft, #ab7aff);
}

.theme-night .batch-queue-item {
    border-color: var(--border-color-dark, #374151);
}

/* ===== 结果查看器双图显示 ===== */
.batch-result-viewer-uploads-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-result-viewer-uploads-row .batch-hover-preview {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
}

.batch-result-viewer-upload-label {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    text-align: center;
    margin-bottom: 4px;
}

.batch-result-viewer-uploads-row .batch-result-viewer-upload img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

/* 夜间模式 */
.theme-night .batch-result-viewer-upload-label {
    color: var(--text-secondary-dark, #9ca3af);
}
