/* ===========================================================================
 * mc-item.css — canonical visual for McItem.
 * ===========================================================================
 * Single source of truth for .mc-choice / .mc-letter / .mc-elim / .mc-choices
 * / .mc-choice-main / .mc-choice-text / .mc-choice-annotation / .mc-stem
 * / state classes (.is-selected, .is-correct, .is-wrong, .is-eliminated,
 * .is-dimmed, .mc-choice-shake). Replaces the per-surface scoped duplicates
 * that previously lived in subjects/vocab/styles.css (.quiz-screen .mc-*),
 * subjects/math/styles.css (.math-screen .mc-*), and diagnostic-ui.css
 * (.diag-mc-region .mc-*).
 *
 * Surface stylesheets may still override individual properties for
 * surface-specific behavior (e.g. diagnostic uses a different selected-state
 * fill, hides elimination/annotations), but the bulk lives here so all
 * surfaces share the same canonical defaults.
 *
 * Loaded BEFORE surface stylesheets in index.html so per-surface overrides
 * (where they exist) win on specificity.
 * ========================================================================= */

/* --- Choice list container --------------------------------------------- */
.mc-choices {
  display: grid;
  gap: 8px;
}

/* --- Choice row --------------------------------------------------------- */
.mc-choice {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: start;
  gap: 12px;
  background: var(--surface);
  border: 2px solid var(--ink-10);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: all 0.15s;
  font-size: 14px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.mc-choice:hover:not(:disabled) { border-color: var(--ink-30); }
.mc-choice:disabled { cursor: default; }

/* Pre-reveal selected state — used by surfaces with a Submit step
 * (selecting before commit). auto-reveal surfaces skip this and go
 * straight to is-correct/is-wrong on tap. */
.mc-choice.is-selected:not(.is-correct):not(.is-wrong) {
  background: var(--accent-coral-tint);
  border-color: var(--accent-coral);
}
.mc-choice.is-selected:not(.is-correct):not(.is-wrong) .mc-letter {
  background: var(--accent-coral);
  color: #fff;
}

/* Post-reveal correctness states. */
.mc-choice.is-correct {
  background: var(--accent-sage-tint);
  border-color: var(--accent-sage);
  color: var(--accent-sage-ink);
}
.mc-choice.is-correct .mc-letter { background: var(--accent-sage); color: #fff; }
.mc-choice.is-wrong {
  background: var(--accent-coral-tint);
  border-color: var(--accent-coral);
  color: var(--accent-coral-ink);
}
.mc-choice.is-wrong .mc-letter { background: var(--accent-coral); color: #fff; }

.mc-choice.is-dimmed { opacity: 0.75; }
.mc-choice.mc-choice-shake { animation: mc-shake 0.35s; }

.mc-choice.is-eliminated { opacity: 0.5; cursor: default; }
.mc-choice.is-eliminated .mc-choice-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--ink-30);
}

/* --- Letter chip -------------------------------------------------------- */
.mc-letter {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--ink-10);
  color: var(--ink-70);
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* --- Choice text + annotation slot ------------------------------------- */
.mc-choice-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-wrap: pretty;
}
.mc-choice-text { display: block; }
.mc-choice-annotation {
  font-size: 12px;
  color: var(--ink-70);
  line-height: 1.4;
}
.mc-choice-annotation .opt-src { color: var(--ink-soft); }
.mc-choice-annotation .opt-src em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-70);
}

/* --- Eliminate button --------------------------------------------------- */
.mc-elim {
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ink-10);
  color: var(--ink-30);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.mc-elim:hover { border-color: var(--ink-30); color: var(--ink-soft); }
.mc-elim.is-on {
  background: var(--accent-coral-tint);
  border-color: var(--accent-coral);
  color: var(--accent-coral-ink);
}

/* --- Shake keyframes (mc-choice-shake animation target) ---------------- */
@keyframes mc-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
