/**
 * batch.css
 * Batch export panel (Phase 8): document list, per-file results, progress.
 * Dark by default like the other studio dialogs; light-mode rules at the end.
 *
 * Dependencies: css/study.css (.ts-study-dialog, progress bar, buttons),
 * css/studio.css (.ts-studio-section, .ts-studio-row).
 */

.ts-study-dialog.ts-batch-dialog .ts-study-dialog-box {
  width: min(880px, 100%);
}

.ts-batch-files,
.ts-batch-results {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.ts-batch-files li,
.ts-batch-results li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ts-batch-files li:last-child,
.ts-batch-results li:last-child {
  border-bottom: 0;
}

.ts-batch-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-batch-file-size {
  font-size: 0.85rem;
  opacity: 0.7;
}

.ts-batch-icon {
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
}

.ts-batch-folder {
  font-weight: 600;
}

.ts-batch-start {
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

.ts-batch-results {
  max-height: 22rem;
}

.ts-batch-results li {
  flex-wrap: wrap;
}

.ts-batch-result-detail {
  flex-basis: 100%;
  padding-left: 1.9rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

.ts-batch-results li.is-failed .ts-batch-result-detail {
  color: #fca5a5;
  opacity: 1;
}

.ts-batch-results li.is-working {
  background: rgba(34, 197, 94, 0.1);
}

.ts-batch-status {
  margin: 0.3rem 0;
}

body.light-mode .ts-batch-files,
body.light-mode .ts-batch-results {
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .ts-batch-files li,
body.light-mode .ts-batch-results li {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .ts-batch-icon {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.03);
}

body.light-mode .ts-batch-results li.is-failed .ts-batch-result-detail {
  color: #b91c1c;
}
