/* <typed-composer> -- the Lo window's typed row, lifted out for surfaces that
 * only had hold-to-speak (the post-task coach layer, the encounter screen).
 * Same construction as `.lo-window__input` / `.lo-mode` / `.lo-hint` in
 * lo-window.css, so the two read as one control wherever they meet.
 * Spec: [TBLT-LO-18]. */

typed-composer { display: block; }

typed-composer .tc-form {
  flex: none;
  display: flex;
  gap: var(--loka-space-1, 4px);
  padding: var(--loka-space-2, 8px);
  border-top: 1px solid var(--loka-rule-dark);
}

typed-composer .tc-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--loka-space-1, 4px);
  font-family: inherit;
  /* 16px keeps iOS Safari from zooming the shell on focus. */
  font-size: var(--loka-text-sm, 16px);
  color: var(--loka-ink);
  background: var(--loka-cream);
  border: 1px solid var(--loka-rule-dark);
}

typed-composer .tc-form button[type="submit"] {
  min-height: 32px;
  padding: 0 var(--loka-space-2, 8px);
  font-family: inherit;
  font-size: var(--loka-text-pixel-md, 10px);
  letter-spacing: var(--loka-track-pixel-md, 0.16em);
  text-transform: uppercase;
  color: var(--loka-cream);
  background: var(--loka-ink);
  border: 0;
  cursor: pointer;
}

typed-composer .tc-mode {
  flex: none;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  font-family: var(--loka-font-pixel, var(--loka-font-mono, monospace));
  font-size: var(--loka-text-pixel-lg, 11px);
  letter-spacing: 0;
  color: var(--loka-ink);
  background: var(--loka-cream);
  border: var(--loka-border-2, 2px solid);
  border-color: var(--loka-rule-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Small mic glyph, same construction as the thread's PTT mic, ink on cream. */
typed-composer .tc-mode__mic {
  position: relative;
  width: 10px;
  height: 14px;
  background: var(--loka-ink);
  border: 2px solid var(--loka-rule-dark);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 5px 0 -2px var(--loka-rule-dark);
}

/* The composer's answer when a typed line could not be taken: one quiet line
 * under the input bar, up for 2s. `hidden` is left to the UA default -- no
 * author-origin `display` here to defeat it. */
typed-composer .tc-hint {
  font-size: var(--loka-text-note, 13px);
  color: var(--loka-ink-soft);
  padding: 0 var(--loka-space-2, 8px) var(--loka-space-1, 4px);
}

/* One input method on screen at a time: in voice mode the typed row folds
 * away (the host's hold-to-speak bar shows instead) and the "Aa" switch is
 * the way back; in text mode the row is up and "Aa" has nothing to say. */
typed-composer[data-input="voice"] .tc-form { display: none; }
typed-composer[data-input="text"] > .tc-mode[data-to="text"] { display: none; }

/* A coach visit is spoken from end to end ([TBLT-LO-18], PO ruling
 * 2026-09-15): the way to typing is closed for the whole visit. Voice is
 * applied for the same span, so the host's hold-to-speak bar is what is left
 * on screen. */
typed-composer[data-voice-only="true"] .tc-mode { display: none; }
