/* 任务通报 · 文案模板编辑器样式
 *
 * 三栏：左（预览数据 / 加行 / 占位符）— 中（行的编辑）— 右（真实预览）。
 * 中间那栏是主体，行卡片尽量把「前缀 / 筛选 / 排序 / 上限」排在一行里，
 * 免得每加一行就往下拖一米。
 */

.tplit {
  display: grid;
  grid-template-columns: 264px minmax(420px, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  flex: 1;
  padding-bottom: 4px;
}
@media (max-width: 1360px) {
  .tplit { grid-template-columns: 240px minmax(360px, 1fr) 340px; }
}

.tside, .tmain, .tprev {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.tlabel { display: block; font-size: 12px; color: var(--ink2); margin-top: 8px; }
.tlabel input {
  width: 100%; height: 32px; margin-top: 4px; border: 1px solid var(--line);
  border-radius: 8px; padding: 0 8px; font-size: 12px; background: #fff;
}

/* ---------------- 行 ---------------- */

.tx-list { display: flex; flex-direction: column; gap: 8px; padding: 2px; }

.tx-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}
.tx-row-list { grid-template-columns: 26px minmax(0, 1fr); }

.tx-ops { display: flex; flex-direction: column; gap: 3px; align-items: stretch; }
.tx-ic {
  height: 22px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink2); font-size: 12px; line-height: 1;
  padding: 0;
}
.tx-ic:disabled { opacity: .35; }
.tx-ic.del { color: #c0392b; }
.tx-ic:not(:disabled):hover { background: var(--brand-soft, #eef3ff); border-color: #c9d8ff; }

.tx-badge {
  grid-column: 1; grid-row: 1;
  display: none;
}
.tx-row-list .tx-badge {
  display: block; grid-column: 2; grid-row: 1;
  font-size: 11px; color: var(--ink3); margin-bottom: 2px;
}
.tx-badge-t { display: none; }

.tx-input {
  grid-column: 2;
  width: 100%; min-height: 34px; resize: none; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 7px 9px; font-size: 13px; line-height: 1.55; color: var(--ink);
  font-family: inherit;
}
.tx-input:focus { border-color: var(--brand); outline: none; }

.tx-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.tx-grid label {
  display: block; font-size: 11px; color: var(--ink3); min-width: 0;
}
.tx-grid label.g2 { grid-column: span 2; }
.tx-grid label.g4 { grid-column: span 4; }
.tx-grid input[type="text"], .tx-grid input:not([type]), .tx-grid input[type="number"],
.tx-grid select {
  width: 100%; height: 28px; margin-top: 3px;
  border: 1px solid var(--line); border-radius: 7px; padding: 0 6px;
  font-size: 12px; background: #fff; color: var(--ink);
}
.tx-grid .ck {
  grid-column: span 2; display: flex; align-items: center; gap: 5px;
  margin-top: 6px; font-size: 11px; color: var(--ink2); white-space: nowrap;
}
.tx-grid .ck input { margin: 0; }

.tx-empty {
  font-size: 12px; color: var(--ink3); line-height: 1.8;
  padding: 20px 10px; text-align: center;
}

/* ---------------- 预览 ---------------- */

.tx-prev {
  flex: 1; min-height: 260px; margin: 8px 0 6px;
  padding: 12px 14px; border-radius: 10px;
  background: #0f1622; color: #e8edf6;
  font-family: "SF Mono", Menlo, Consolas, "Microsoft YaHei", monospace;
  font-size: 12.5px; line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
  overflow: auto;
}
