/* ═══════════════════════════════════════
   WORKBENCH CHAPTERS — a chapter's Worlds, Locations and Expand with AI
   sub-tabs (WorkbenchChapterWorlds.js, WorkbenchChapterLocations.js,
   WorkbenchChapterExpand.js)
   ═══════════════════════════════════════ */

/* ── A chapter surface fills its slot and scrolls inside it ── */
.wbch-surface {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

/* ── A card's title with its button beside it ── */
.wbch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── A list row's buttons ── */
.wbch-acts {
  white-space: nowrap;
  text-align: right;
}

/* ── A linked world's name opens the world ── */
.wbch-open {
  cursor: pointer;
}

.wbch-open:hover strong {
  text-decoration: underline;
}

/* ── The location being edited stays marked in the list ── */
.wbch-surface .wb-table tr.wb-link.on td {
  background: var(--bg-hover);
}

.wbch-desc {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* ── A side card's buttons ── */
.wbch-editor-acts {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* ── Work the AI is doing, said on the page ── */
.wbch-working {
  margin: 10px 0 0;
  color: var(--amber);
}

/* ── Expand with AI: what the chapter holds beside the suggestion ── */
.wbch-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wbch-sub {
  margin: 12px 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.wbch-prose {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .wbch-compare {
    grid-template-columns: 1fr;
  }
}
