/* line.css — the LineEditor component (chip.js), shared by word and sentence mode (P4).
   Extracted from P3's word.css with neutral le-* class names so both modes wear one
   look. Every pressable element here carries .raised (tokens.css), so the reduced-
   motion swap (no travel, thicker border) applies without repeating it. No new colour
   values: reuses --panel/--ink/--sunk/--calm/--green/--edge-secondary locked in
   tools/contrast-check.mjs. --danger stays unused (a permanent-confirm colour, never
   shown to a child, per plan.md), so the delete and carry controls are black on white. */

.le-mode {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* ---- the token line: chips and thin caret gaps ---- */
.le-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 88px;
  padding: 12px;
  background: var(--panel);
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-lg);
}
.le-line-hint {
  font-family: var(--font-body);
  color: var(--calm-text);
  font-size: 16px;
  padding: 0 4px;
}

.le-chip-wrap { display: inline-flex; align-items: center; gap: 4px; }

.le-chip {
  min-height: 64px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
}
.le-chip.selected { background: var(--ink); color: var(--panel); }

.le-gap {
  width: 32px;
  min-height: 64px;
  position: relative;
}
.le-gap::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 2px;
  background: var(--sunk);
  transform: translateX(-50%);
}
.le-gap.caret::after {
  width: 3px;
  background: var(--ink);
}

.le-input {
  min-height: 64px;
  min-width: 120px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  background: var(--sunk);
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius);
}

/* Delete and reorder satellites on a selected chip: smaller than the 64px chip they
   sit beside, matching 05/09's own 34-40px armed-delete precedent. */
.le-del,
.le-move {
  width: 40px;
  height: 40px;
  min-height: 0;
  flex: none;
  border-radius: 50%;
  background: var(--panel);
  border: var(--border-width) solid var(--ink);
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- capture tools: mic, editor panel, chooser, keyboard toggle ---- */
.le-tools { display: flex; flex-direction: column; gap: 12px; }

.le-mic .act-hint { font-family: var(--font-body); }

.le-kb-toggle {
  align-self: flex-start;
  min-height: var(--control-min);
  padding: 0 20px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px;
}
.le-kb-toggle.pressed { background: var(--calm); color: var(--calm-text); }

.le-editor {
  background: var(--sunk);
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.le-editor-hear {
  align-self: flex-start;
  min-height: var(--control-min);
  padding: 0 20px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px;
}
.le-alts-label { font-family: var(--font-body); font-size: 14px; color: var(--calm-text); }
.le-alts { display: flex; flex-wrap: wrap; gap: 8px; }
.le-alt {
  min-height: var(--control-min);
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}

.le-editor-extras { display: flex; flex-wrap: wrap; gap: 8px; }
.le-carry {
  min-height: var(--control-min);
  padding: 0 20px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px;
}

.le-chooser { display: flex; flex-direction: column; gap: 12px; }
.le-chooser-hint { font-family: var(--font-body); font-size: 16px; }
.le-cands { display: flex; flex-wrap: wrap; gap: 12px; }
.le-cand { display: flex; align-items: center; gap: 8px; }
.le-cand-word {
  min-height: var(--control-min);
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
}
.le-cand.heard .le-cand-word { background: var(--sunk); }
.le-cand-ok {
  width: 64px;
  height: 64px;
  min-height: 64px;
  padding: 0;
  border-radius: 50%;
  background: var(--green);
  font-size: 22px;
  visibility: hidden;
}
.le-cand.heard .le-cand-ok { visibility: visible; }

.le-cand-again {
  align-self: flex-start;
  min-height: var(--control-min);
  padding: 0 20px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px;
}

@media (min-width: 600px) {
  .le-chip, .le-input { font-size: 24px; }
}
