/* Parse page — mirrors transcribe.css; reuses admin CSS vars from /admin/assets/style.css. */

/* app shell */
.tx-app { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.tx-top { height: 56px; flex: none; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.tx-logo { font-size: 15px; color: var(--text); text-decoration: none; display: inline-flex; align-items: center;
  gap: 7px; border-radius: 8px; padding: 5px 8px; margin: 0 -8px; transition: background .15s; }
.tx-logo:hover { background: var(--accent-soft); }
.tx-logo b { color: var(--accent); font-weight: 700; }
.tx-logo .ctx { color: var(--muted); }
.tx-logo .home-ic { color: var(--faint); transition: color .15s; }
.tx-logo:hover .home-ic { color: var(--accent); }
.tx-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* centered flow card */
.tx-flow { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 16px; }
.tx-card { background: var(--card); border-radius: 16px; width: 100%; max-width: 640px;
  padding: 40px 44px; box-shadow: 0 1px 3px rgba(50,50,93,.10), 0 10px 30px rgba(50,50,93,.07); }
.tx-brand { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.tx-card h1 { font-size: 27px; color: var(--text); margin: 8px 0 20px; letter-spacing: -.02em; }

.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ta { width: 100%; box-sizing: border-box; resize: vertical; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 14.5px; color: var(--text);
  font-family: inherit; background: var(--bg); }
.ta:focus { outline: none; border-color: var(--accent); }

.drop-zone { border: 1.5px dashed #c7cdf0; background: #f7f8fe; border-radius: 14px;
  padding: 46px 30px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.drag { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone .ic { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.drop-zone .big { color: var(--text); font-size: 16px; font-weight: 600; }
.drop-zone .sml { font-size: 13px; color: var(--faint); margin-top: 5px; }

/* processing */
.proc { text-align: center; padding: 8px 0 4px; }
.spin { width: 30px; height: 30px; border: 3px solid #d7ddf7; border-top-color: var(--accent);
  border-radius: 99px; margin: 0 auto 14px; animation: tx-sp 1s linear infinite; }
@keyframes tx-sp { to { transform: rotate(360deg); } }
.proc-phase { color: var(--text); font-size: 15px; font-weight: 600; }

/* full-width result */
.tx-result { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.res-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 16px 28px; background: var(--card); border-bottom: 1px solid var(--line); }
.res-meta { font-size: 14px; color: var(--text); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-actions { display: flex; gap: 10px; align-items: center; }
.btn-dl { background: var(--accent); color: #fff; border: none; border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-dl:hover { filter: brightness(.96); }
.btn-dl.alt { background: var(--card); color: var(--accent); border: 1.5px solid var(--accent); }
.btn-dl.alt:hover { background: var(--accent-soft); }
.btn-exp { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; cursor: pointer; }
.btn-exp:hover { color: var(--text); }

.res-body { flex: 1; min-height: 0; display: flex; gap: 18px; padding: 18px 28px; overflow: auto; background: var(--bg); }
.res-img-wrap { flex: none; width: 38%; max-width: 420px; }
.res-img-wrap img { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.res-text { flex: 1; min-width: 0; margin: 0; padding: 16px 18px; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: 10px; font-size: 14.5px; line-height: 1.7;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "Cascadia Code", monospace; }

@media (max-width: 720px) { .res-body { flex-direction: column; } .res-img-wrap { width: 100%; } }

.tx-err { color: var(--danger); font-size: 13px; margin-top: 10px; }

/* dark-mode overrides for hardcoded light surfaces */
[data-theme="dark"] .tx-card { box-shadow: 0 1px 3px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.4); }
[data-theme="dark"] .drop-zone { border-color: #3a4150; background: #191c22; }
[data-theme="dark"] .spin { border-color: #2d3340; border-top-color: var(--accent); }
[data-theme="dark"] .res-img-wrap img { background: var(--card); }
