/* JSON to TOON: the options bar, the input and output side by side, and the size table. */

.toon { display: flex; flex-direction: column; gap: 24px; }

.toon-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; }

.toon-option { display: flex; flex-direction: column; gap: 6px; }
.toon-option-label { font-size: 14px; font-weight: 700; }
.toon-option .segmented-btn { min-height: 40px; padding: 0 14px; font-size: 14px; }

.toon-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 700; cursor: pointer; }
.toon-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

.toon-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* Both panes get a head of the same height, so the two text boxes line up. */
.toon-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }

.toon-text {
  display: block;
  width: 100%;
  height: 420px;
  margin: 0;
  padding: 14px 16px;
  font: 14px/1.55 var(--font-mono);
  color: var(--ink);
  tab-size: 4;
  white-space: pre;
  overflow: auto;
  background: var(--surface-2);
  border: var(--border);
  border-radius: 12px;
}
textarea.toon-text { resize: vertical; }
.toon-output { background: var(--surface); }
.toon-output.is-empty { color: var(--line-soft); }

.toon-copy { min-height: 40px; padding: 0 14px; font-size: 14px; }
.toon-copy:disabled { opacity: 0.5; cursor: not-allowed; }

.toon-badge { background: var(--cat-json); }

.toon-stats { width: 100%; border-collapse: collapse; font-size: 15px; }
.toon-stats caption { padding-bottom: 8px; font-size: 14px; font-weight: 700; text-align: left; }
.toon-stats th, .toon-stats td { padding: 10px 12px; text-align: right; border-bottom: 2px solid var(--grid); }
.toon-stats thead th { color: var(--on-ink); background: var(--ink); border-bottom: 0; }
.toon-stats th:first-child { text-align: left; }
.toon-stats tbody th { font-weight: 600; }
.toon-stats td { font-family: var(--font-mono); }
.toon-stats-toon th, .toon-stats-toon td { font-weight: 700; }

.toon-note {
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  background: var(--surface-2);
  border: var(--border);
  border-left: 6px solid var(--accent);
  border-radius: 12px;
}

.toon-footnote { margin: 0; font-size: 13px; color: var(--ink-3); }

@media (max-width: 860px) {
  .toon-panes { grid-template-columns: minmax(0, 1fr); }
  .toon-text { height: 300px; }
}

@media (max-width: 640px) {
  .toon-stats { font-size: 13px; }
  .toon-stats th, .toon-stats td { padding: 8px 6px; }
}
