/* CSV <-> JSON page. Builds on the shared classes in /styles.css. */
.csv-dir { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.csv-dir button { border: 0; border-radius: 0; min-height: 34px; }
.csv-dir button + button { border-left: 1px solid var(--border); }
.csv-dir button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.csv-app .options select { max-width: 100%; }
.csv-help { flex-basis: 100%; margin: 0; font-size: .82rem; color: var(--muted); }

.csv-out-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding-right: 10px; }
.csv-out-actions { display: inline-flex; gap: 6px; padding-top: 6px; }

.csv-app .io-grid textarea { white-space: pre; overflow: auto; }
.csv-app #in-pane.dragover textarea { background: var(--surface-2); outline: 2px dashed var(--accent); outline-offset: -6px; }

.csv-preview { border-top: 1px solid var(--border); }
.csv-preview h2 { margin: 0; }
.csv-preview .csv-help { padding: 2px 14px 6px; }
/* The table scrolls inside its own box so the page never scrolls sideways. */
.csv-table-wrap { max-width: 100%; max-height: 420px; overflow: auto; }
.csv-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.csv-table { width: max-content; min-width: 100%; }
.csv-table th, .csv-table td { max-width: 28ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; font-family: var(--mono); font-size: .82rem; }
.csv-table thead th { position: sticky; top: 0; background: var(--surface-2); color: var(--text); }
.csv-table td.num { color: var(--muted); text-align: right; }
.csv-table td.null { color: var(--muted); font-style: italic; }
.csv-app form[hidden] { display: none; }
.csv-out-note { padding: 2px 14px 4px; color: var(--warn); }
