/* Transcription. The page tokens and buttons are AI Tools' (aitools/aitools.css: --bg, --fg, --card, --line,
 * --muted, --accent, the theme's colours); this file lays out the drop zone, the file list and the transcript. */
/* The page: the intro, then (once a model is in) TlbxFrame's View · Panel (shared/frame) filling the rest of the window:
   the files and the transcript in the middle, recording, the language, saving and Transcribe in the panel on the right. */
body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
main.tr-app { max-width: none; width: 100%; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0; box-sizing: border-box; overflow: auto; }
.tr-intro, .tr-gate { padding: 16px 20px 0; }
.tr-ui { flex: 1 1 auto; min-height: 340px; margin-top: 12px; border-top: 1px solid var(--line); }
/* With files in, the intro gives its room to the tool, so the panel and Transcribe stay in the window */
.tr-app:has(#trFiles > li) > .tr-intro { display: none; }
.tr-main { padding: 0 20px 20px; }
.tr-side .tr-controls, .tr-side .tr-lang { display: grid; gap: 6px; }
.tr-side button, .tr-side .tr-modelbtn { width: 100%; }
.tr-side .sf-foot-acts button { width: auto; }
.tr-app [hidden] { display: none !important; }   /* aitools.css gives every button a display */
.tr-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.tr-intro h1 { margin: 0 0 4px; font-size: 26px; }
.tr-lede { margin: 0; color: var(--muted); max-width: 60ch; }
.tr-steps .sd-preview { justify-content: flex-start; margin: 12px 0 0; }
.tr-steps .sd-steps { flex: 1 1 auto; font-size: 14px; color: var(--text, inherit); }
.tr-flow { flex: none; color: var(--muted); }
.tr-gate:not(:empty) { margin-top: 14px; }
.tr-gate:empty { display: none; }
.tr-add { margin: 18px 0 8px; display: grid; gap: 10px; }
.tr-drop { min-height: 96px; display: grid; place-items: center; padding: 14px; border: 2px dashed var(--line); border-radius: 12px; background: var(--card); text-align: center; }
.tr-controls > button { min-height: 38px; }
.tr-lang { font-size: 13px; color: var(--muted); }
.tr-lang select, .tr-tools select { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; min-height: 38px; }
.tr-rec { display: inline-flex; align-items: center; gap: 8px; }
.tr-rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #d93025; }
.tr-rec.is-on { border-color: #d93025; color: #d93025; }
.tr-rec.is-on::before { border-radius: 2px; animation: tr-pulse 1s ease-in-out infinite; }
@keyframes tr-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tr-rec.is-on::before { animation: none; } }
.tr-rectime { align-self: center; font-variant-numeric: tabular-nums; color: #d93025; font-weight: 600; }
.tr-msg { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 14px; }

.tr-work { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tr-list, .tr-pane { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.tr-head { display: flex; align-items: center; gap: 10px; }
.tr-head h2 { margin: 0; font-size: 16px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-count { color: var(--muted); font-size: 13px; }
.tr-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tr-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.tr-file:hover { border-color: var(--muted); }
.tr-file.is-on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.tr-file-main { display: grid; min-width: 0; }
.tr-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-file-meta { color: var(--muted); font-size: 12.5px; }
.tr-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tr-chip.is-done { color: var(--ok); border-color: currentColor; }
.tr-chip.is-error { color: var(--bad); border-color: currentColor; }
.tr-chip.is-reading { color: var(--fg); }
.tr-x { padding: 0 6px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--muted); }
.tr-prog { grid-column: 1 / -1; width: 100%; height: 6px; }
.tr-err { grid-column: 1 / -1; margin: 0; color: var(--bad); font-size: 13px; }
.tr-empty { color: var(--muted); font-size: 14px; margin: 10px 0 2px; }
.tr-meta { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.tr-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: auto; }
.tr-edited { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.tr-edited button { padding: 2px 8px; font-size: 13px; }
.tr-text { width: 100%; min-height: 360px; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
.tr-text[readonly] { color: var(--muted); }

@media (max-width: 760px) {
  .tr-intro, .tr-gate { padding: 12px 16px 0; }
  .tr-main { padding: 0 16px 16px; }
  .tr-work { grid-template-columns: minmax(0, 1fr); }
  .tr-intro h1 { font-size: 22px; }
  .tr-text { min-height: 260px; }
}
/* the Language and model button and the line under a transcript (js/choose.js, js/models.js) */
.tr-modelbtn { font: inherit; font-size: 14px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 38px; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-suggest { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 6px; font-size: 14px; }
.tr-detect { margin: 0; color: var(--muted); }
.tr-upgrade { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-upgrade-busy { font-variant-numeric: tabular-nums; }
.tr-link { background: none; border: 0; padding: 0; min-height: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
body:has(#trUi[hidden]) .sf-toggle { display: none; }   /* no panel to show while the model prompt is up */
