/*
 * The part bodies of the trainer page /7-days (trainer-rework ui.md, PartBody components). Every value
 * comes from tokens.css; the page frame lives in trainer.css. Three type styles only: the display heading
 * (--fs-headline), the body (--fs-body) and the small line (--fs-small). trainer-redesign: the controls and
 * lines here take the tool accent family; the redesign type scale (KD-T16, KD-T17) lives in trainer-frame.css,
 * because the trainer-rework type check (TEST-028) keeps this file on the three styles.
 */

/* Shared: chip toggles (SaidToggle, recall chips, self-check) and phrase chips (PhraseChip, kit.py .chip): pills
   at TX_CHIP_MIN_HEIGHT_PX with a CONTROL_LINE border; pressed takes the selected fill and line and a tick, so the
   state never rests on colour alone (UX-004) */
.chip-toggle,
.recall-chip,
.phrase-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tx-chip-tick-gap);
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  border: var(--tx-pick-border-width) solid var(--option-line);
  border-radius: var(--tx-chip-radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
}

.chip-toggle[aria-pressed="true"],
.recall-chip[aria-pressed="true"] {
  border-color: var(--selected-line);
  background: var(--selected-bg);
  color: var(--selected-ink);
}

.chip-toggle[aria-pressed="true"]::before,
.recall-chip[aria-pressed="true"]::before {
  content: "";
  flex: none;
  width: var(--tx-chip-tick-size);
  height: var(--tx-chip-tick-size);
  background: currentColor;
  -webkit-mask: var(--tx-icon-check) center / contain no-repeat;
  mask: var(--tx-icon-check) center / contain no-repeat;
}

/* PhraseCard and TranslationReveal */
.phrase-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.phrase-card,
.recall-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.phrase-card p,
.recall-row p {
  margin: 0;
}

.phrase-card__label {
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.phrase-card__en {
  font-size: var(--fs-body);
  font-weight: 700;
}

.phrase-card__example,
.phrase-card__uk {
  font-size: var(--fs-small);
  color: var(--ink);
}

.phrase-group-title {
  margin: var(--space-sm) 0 0;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--ink-2);
}

/* PhraseSupport */
.phrase-support__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.phrase-support__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.phrase-chip__uk {
  font-size: var(--fs-small);
  color: var(--ink);
}

/* RecallList */
.recall-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.recall-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

/* WordAssembler, LaunchDrill, WhyQuiz, RetellPicker, PromptCard, SelfCheckList */
.word-assemblers,
.launch-drills,
.why-quizzes,
.self-check,
.why-quiz__options,
.retell-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.word-assembler,
.launch-drill,
.why-quiz {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.word-assembler p,
.launch-drill p,
.why-quiz p,
.prompt-card p {
  margin: 0;
}

.word-assembler__slots {
  min-height: var(--tap-min);
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 2px dashed var(--option-line);
  font-weight: 700;
}

.word-assembler[data-state="complete"] .word-assembler__slots {
  border-bottom-style: solid;
  border-bottom-color: var(--tool-accent);
}

.word-assembler__bank {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.word-tile {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0 var(--space-sm);
  border: var(--tx-pick-border-width) solid var(--option-line);
  border-radius: var(--tx-chip-radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.word-tile:disabled {
  opacity: 0.4;
}

.word-assembler__uk,
.launch-drill__uk {
  font-size: var(--fs-small);
  color: var(--ink);
}

.launch-drill__count {
  font-family: var(--font-display);
  font-size: var(--fs-headline);
  font-weight: 800;
  color: var(--tool-accent-ink);
}

.launch-drill__hint {
  font-weight: 700;
}

.why-quiz__option {
  min-height: var(--tap-min);
  padding: var(--space-xs) var(--space-sm);
  border: var(--tx-pick-border-width) solid var(--option-line);
  border-radius: var(--tx-pick-radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.why-quiz__option[aria-pressed="true"] {
  border-color: var(--selected-line);
  background: var(--selected-bg);
  color: var(--selected-ink);
}

.why-quiz__option[data-result="key"] {
  background: var(--tool-accent-soft);
}

.retell-dim {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
}

.prompt-card__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0;
  padding-left: var(--space-md);
}

/* ChatGptHandoff, PromptDisclosure, CorrectionSaver (TR23, TR24, TR36) */
.chatgpt-handoff,
.correction-saver {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.handoff-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.handoff-step__number {
  font-weight: 700;
  color: var(--tool-accent-ink);
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.prompt-disclosure__preview,
.prompt-disclosure__full {
  margin: 0;
  white-space: pre-wrap;
  font-size: var(--fs-small);
}

/* PhraseSetSorter (TR44) */
.phrase-set,
.phrase-set__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.phrase-set__title {
  margin: 0;
  font-size: var(--fs-body);
}

.phrase-set__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
