/* academic_transcript_player.css — transcript-synced lecture audio player.
 *
 * Palette-agnostic: every colour resolves through the arm's existing tokens
 * (--bg / --panel / --border / --text / --accent, redefined for A&M in
 * academic.css under html[data-acad-theme="am"]) — same convention as
 * academic_math_editor.css. One surface, two palettes.
 * Load AFTER main.css + academic.css. */

.tp-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  color: var(--text, #e6e6e6);
  font-family: var(--font-sans, system-ui, sans-serif);
}

/* --- head ------------------------------------------------------------- */
.tp-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.tp-title { font-size: 15px; font-weight: 600; }
.tp-status { font-size: 12px; color: var(--acad-warn, #d9a521); }

/* Custom transport replaces the native controls entirely; the element itself
   carries no UI (spec-default with no `controls` attribute) but is hidden
   explicitly rather than relying on that default. */
.tp-audio { display: none; }

/* --- transport ---------------------------------------------------------- */
.tp-transport {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: var(--acad-radius, 8px);
  padding: 8px 10px;
}
.tp-btn {
  background: var(--bg, #0e1116);
  color: var(--text, #e6e6e6);
  border: 1px solid var(--border, #30363d);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.tp-btn:hover { border-color: var(--accent, #58a6ff); }
.tp-play { min-width: 34px; font-weight: 700; }
.tp-time-cur, .tp-time-total {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--text-muted, #8b949e);
  font-variant-numeric: tabular-nums;
  min-width: 3.5em;
  text-align: center;
}
.tp-scrub {
  flex: 1 1 auto;
  min-width: 80px;
  accent-color: var(--accent, #58a6ff);
}
.tp-vol-icon { font-size: 13px; }
.tp-volume {
  width: 70px;
  accent-color: var(--accent, #58a6ff);
}

/* --- transcript ---------------------------------------------------------- */
.tp-transcript-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.tp-transcript {
  height: 100%;
  overflow-y: auto;
  background: var(--panel, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: var(--acad-radius, 8px);
  padding: 4px;
}
.tp-seg {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.tp-seg:hover { background: var(--acad-row-hover, rgba(255,255,255,0.05)); }
.tp-seg:focus-visible { outline: 2px solid var(--accent, #58a6ff); outline-offset: -2px; }
.tp-seg-time {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--text-muted, #8b949e);
  flex: 0 0 auto;
  min-width: 3.5em;
}
.tp-seg-text { font-size: 13px; line-height: 1.5; }
.tp-seg-active {
  border-left-color: var(--accent, #58a6ff);
  background: color-mix(in srgb, var(--accent, #58a6ff) 12%, transparent);
}
.tp-seg-active .tp-seg-time { color: var(--accent, #58a6ff); font-weight: 600; }
.tp-word-active {
  background: color-mix(in srgb, var(--accent, #58a6ff) 35%, transparent);
  border-radius: 3px;
}

.tp-jumpnow {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent, #58a6ff);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.tp-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted, #8b949e);
  text-align: center;
}
