/* The transcript module's own styling. It travels with the module - the package the core fetches
   from it consists of its frontend assembly, this file and the player island. What only its views
   need belongs here and not in the toolkit's paula.css. */

/* THE PLAYER (decided 2026-09-28): it opens under the hit, the section or the line that plays - the video
   above, the bar with the three moments, the ways to more and the download below. */
.transcript-player
{
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 1px dashed var(--border);
}

.transcript-player video
{
  width: 100%;
  max-width: 640px;
  max-height: 45vh;
  background: #000;
  border-radius: var(--radius-sm);
}

.transcript-player audio { display: none; }

/* the cross that closes it, at its top right (decided 2026-09-29) - stop only halts */
.transcript-player-head { display: flex; justify-content: flex-end; }

.transcript-player-times
{
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.transcript-player-now { color: var(--text); font-weight: 600; }

/* THE BAR DRAWN HERE (2026-09-29): Chrome's own bar let the knob stop short of the end of its track - at
   the last moment a piece of grey stood beside it. Drawn here, the knob ends where the track ends, and the
   fill (--bar-fill, set by the player) reaches up to it. */
.transcript-player-bar {
    --bar-fill: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

.transcript-player-bar::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent) var(--bar-fill), var(--border-strong) var(--bar-fill));
}

.transcript-player-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -5px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--accent);
}

.transcript-player-bar::-moz-range-track { height: 6px; border-radius: 3px; background: var(--border-strong); }

.transcript-player-bar::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }

.transcript-player-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--accent);
}

.transcript-player-bar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.transcript-player-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }

.transcript-player-actions svg { width: 1em; height: 1em; vertical-align: -0.125em; }

.transcript-player-gap { flex: 1 1 auto; }

/* THE SIGNS OF PLAYING (decided 2026-09-28): a small speaker or camera, the language under it */
.transcript-play { display: inline-flex; flex-wrap: wrap; gap: var(--s1); vertical-align: middle; }

/* a scene under an answer of the chat (2026-09-30): its signs, then the recording and the time */
.transcript-scene-part { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }

/* inside the button of the kit: the sign, the language under it */
.transcript-play-face { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1; }

.transcript-play-sign svg { width: 1rem; height: 1rem; }

.transcript-play-language { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em; }

/* THE QUESTION and what it found */
.transcript-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }

.transcript-ask input[type="search"] { flex: 1 1 18rem; min-width: 0; }

.transcript-check { display: inline-flex; align-items: center; gap: var(--s1); cursor: pointer; }

.transcript-hit { padding: var(--s2) 0; border-bottom: 1px solid var(--border); }

.transcript-hit:last-of-type { border-bottom: none; }

/* the hit that plays - it stands out, and its player is inside it */
.transcript-hit-playing
{
  margin: var(--s1) calc(-1 * var(--s2));
  padding: var(--s2);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
}

.transcript-hit-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }

.transcript-hit-signs { margin-left: auto; }

.transcript-hit-head a { font-weight: 600; }

/* WHAT WAS SAID AT A PLACE (decided 2026-09-28): every language the words were found in, one under the
   other - two lines at most each, the words of the question marked */
.transcript-hit-texts { margin-top: var(--s1); }

.transcript-hit-text
{
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.transcript-hit-text + .transcript-hit-text { margin-top: 2px; }

.transcript-hit-text mark
{
  padding: 0 1px;
  color: inherit;
  background: var(--wait-bg);
  border-radius: 2px;
  box-shadow: inset 0 -2px 0 var(--wait-fg);
}

/* the whole text of a hit - the one that plays, or one somebody opened */
.transcript-hit-open .transcript-hit-text { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }

/* "more" only where a text is cut, "less" where it was opened - the kit's button inside */
.transcript-hit-more { display: none; }

.transcript-hit-texts[data-cut] + .transcript-hit-more,
.transcript-hit-open + .transcript-hit-more { display: inline-block; }

/* the head of the similar places, and what each of them misses */
.transcript-hits-similar
{
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1px solid var(--border);
}

.transcript-missing { color: var(--text-muted); font-size: var(--fs-sm); font-style: italic; }

.transcript-hit-scene { margin-top: 2px; font-size: var(--fs-sm); }

.transcript-hits-head
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s1);
}

/* the recordings whose names carry the words, at the right of the head of the list */
.transcript-named { margin-left: auto; color: var(--text-muted); font-size: var(--fs-sm); }

.transcript-named a { font-weight: 600; }

.transcript-hits-foot
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s2);
}

.transcript-language
{
  margin-left: var(--s1);
  padding: 0 4px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ONE RECORDING: its sections, each with its lines */
.transcript-section { padding: var(--s2) 0; border-bottom: 1px solid var(--border); }

.transcript-section:last-of-type { border-bottom: none; }

/* the head of a chapter - a title of a CD, a chapter of a film; a click on it opens or closes it
   (decided 2026-09-29) */
.transcript-chapter { margin: var(--s3) 0 0; }

.transcript-chapter-fold
{
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.transcript-chapter-sign { display: inline-block; width: 1em; color: var(--text-muted); }

/* the section a hit led to */
.transcript-section-found { border-left: 3px solid var(--accent); padding-left: var(--s2); }

.transcript-line mark
{
  padding: 0 1px;
  color: inherit;
  background: var(--wait-bg);
  border-radius: 2px;
  box-shadow: inset 0 -2px 0 var(--wait-fg);
}

/* a section that was taken over although it sounded known */
.transcript-section-twin { border-left: 3px solid var(--wait-fg); padding-left: var(--s2); }

.transcript-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }

.transcript-section-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* the number of a section - the one a duplicate of an import names (decided 2026-09-29) */
.transcript-section-number { color: var(--text-muted); white-space: nowrap; }

.transcript-section-scene { margin-top: var(--s1); color: var(--text-muted); font-style: italic; }

.transcript-edit
{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s2);
  margin: var(--s2) 0;
  padding: var(--s2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.transcript-edit label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); }

/* what happens in the section - the whole width of the box */
.transcript-edit-wide { flex: 1 1 100%; }

.transcript-edit-wide textarea { width: 100%; }

.transcript-lines { margin-top: var(--s1); }

.transcript-line { display: flex; gap: var(--s2); padding: 1px 0; }

/* a name does not break (decided 2026-09-29) - "Hui Buh:" stays in one piece, the line wraps beside it */
.transcript-line > strong { flex: 0 0 auto; white-space: nowrap; }

/* play and take along one line - small, in front of the line, one column (decided 2026-09-29) */
.transcript-line-signs { display: inline-flex; flex: 0 0 auto; gap: 2px; align-items: flex-start; }

.transcript-line-signs .btn-icon { padding: 1px; }

.transcript-line-signs .btn-icon svg { width: 14px; height: 14px; }

.transcript-line-playing { background: var(--surface-2); border-radius: var(--radius-sm); }

.transcript-line-time
{
  flex: 0 0 3.5rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}

/* THE IMPORTS */
.transcript-warning { color: var(--err-fg); font-weight: 600; }

.transcript-state { min-width: 14rem; }

/* the whole recording, one link per language and kind (decided 2026-09-29) */
.transcript-whole { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin-left: auto; }

/* settings, start and halt of one file beside its state, in its line - the bar stands under both, so the
   signs do not move when the state changes (decided 2026-09-29) */
.transcript-state-line { display: flex; align-items: center; gap: var(--s2); }

/* the title of a recording and the pencil that changes what it is called, at the right edge
   (decided 2026-09-29) */
.transcript-title-line { display: flex; align-items: center; gap: var(--s2); }
.transcript-row-signs { display: inline-flex; flex: none; gap: var(--s1); margin-left: auto; }

/* how far the recordings read again are - the sentence above its bar, over the list (2026-10-01) */
.transcript-rescan { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s2); }

/* the state is a chip of the kit (2026-09-29); its sentence may be long ("gestoppt: " and a reason), so in
   this cell it breaks instead of widening the column */
.transcript-state-line > .chip { min-width: 0; white-space: normal; }

/* the titles of a CD in the settings of its import - one under the other */
.transcript-titles { display: flex; flex-direction: column; gap: var(--s1); }

.transcript-actions { white-space: nowrap; text-align: right; }

.transcript-decision
{
  margin: var(--s2) 0;
  padding: var(--s2) var(--s3);
  background: var(--wait-bg);
  color: var(--wait-fg);
  border-radius: var(--radius-sm);
}

/* the stills of a pair (2026-09-30) - A and B side by side under its row, of one width and each in its
   own shape, so the format shows; a click decides */
.transcript-stills { display: flex; flex-wrap: wrap; gap: var(--s3); padding: var(--s1) 0; }

.transcript-still-side { margin: 0; display: flex; flex-direction: column; gap: var(--s1); }

.transcript-still-side figcaption { font-weight: 600; font-size: var(--fs-xs); }

.transcript-still
{
  display: block;
  width: 16rem;
  max-width: 100%;
  height: auto;
  background: #000;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.transcript-still:hover { border-color: var(--accent, var(--text)); }

.transcript-options { display: flex; flex-direction: column; gap: var(--s3); }

.transcript-field { display: flex; flex-direction: column; gap: var(--s1); }

/* an option that exists but does not fit this file - visible, switched off, its reason under the
   pointer (decided 2026-09-28) */
.transcript-off { color: var(--text-faint); cursor: help; }

.transcript-off input { cursor: help; }
