/* 20-c3-view.css — Phase 7c: C-level selector + C3 by-turn view (item 20).
 *
 * Owns:
 *   - .v2-c-levels                — pill row at top of #action-layer-C
 *   - .v2-c-level-pill            — C1..C5 pills (visually like .v2-c-subpill)
 *   - .v2-c-level-stub            — "Незабаром" placeholder for C2/C4/C5
 *   - .v2-c3-view                 — full C3 by-turn player view
 *   - .c3-strips, .c3-strip-*     — prev/current/next placeholder strips
 *   - .c3-controls, .c3-mcq*      — playback + MCQ panel
 *
 * Level visibility gates (body classes set by v2-c-levels.js):
 *   body.v2-clevel-1 → C1 view visible, C3 hidden
 *   body.v2-clevel-3 → C3 view visible, C1 hidden
 *   body.v2-clevel-2/4/5 → both hidden, stub shown
 *
 * The C1 view (.v2-c1-view from 19-c1-view.css) and the existing
 * #comprehension-area also get gated here.  19-c1-view.css doesn't know
 * about C-levels — that's intentional: Phase 7c slots its visibility
 * under the new selector without editing 19.
 */

/* ── Level selector pill row ──────────────────────────────────────── */
.v2-c-levels {
  display: none;            /* shown only when C action layer is visible */
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 8px 6px 10px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--v2-hairline, #e5e3dc);
}
body.v2-mode-C .action-layer-C .v2-c-levels { display: flex; }

.v2-c-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 0.82rem/1 ui-monospace, SF Mono, Menlo, monospace;
  background: #fff;
  color: var(--v2-ink, #14140f);
  border: 1px solid var(--v2-hairline, #e5e3dc);
  border-radius: 6px;
  padding: 0 10px;
  height: 28px;
  min-width: 34px;
  cursor: pointer;
  letter-spacing: 0.04em;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.v2-c-level-pill:hover {
  background: var(--v2-surface-2, #f3f1ea);
  border-color: var(--v2-ink-3, #8a877e);
}
.v2-c-level-pill:active { transform: scale(0.97); }
.v2-c-level-pill:focus-visible {
  outline: 2px solid var(--v2-target, #b08d34);
  outline-offset: 2px;
}
.v2-c-level-pill.is-active {
  background: var(--v2-ink, #14140f);
  color: #fff;
  border-color: var(--v2-ink, #14140f);
}
.v2-c-level-glyph { font: inherit; letter-spacing: 0; }
.v2-c-level-label {
  font: 500 0.62rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.85;
}
@media (max-width: 480px) {
  .v2-c-level-label { display: none; }
  .v2-c-level-pill { padding: 0 8px; min-width: 30px; }
}

/* ── "Незабаром" stub for C2/C4/C5 ────────────────────────────────── */
.v2-c-level-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 1.25rem 1rem;
  margin: 0.5rem 0;
  border: 1px dashed var(--v2-hairline, #e5e3dc);
  border-radius: 10px;
  background: var(--v2-surface, #fdfcf7);
  color: var(--v2-ink-3, #8a877e);
  text-align: center;
}
.v2-c-level-stub[hidden] { display: none; }
.v2-c-level-stub-title {
  font: 700 1rem/1.4 Inter, system-ui, sans-serif;
  color: var(--v2-ink, #14140f);
}
.v2-c-level-stub-msg {
  font: 500 0.85rem/1.5 Inter, system-ui, sans-serif;
}

/* ── Pane visibility gates ─────────────────────────────────────────
 * Default state with no level class on body = show C1 (Phase 6 default).
 * Once v2-c-levels.js applies a body class, that wins.
 */
body.v2-mode-C .v2-c1-view { display: flex; }
body.v2-mode-C.v2-clevel-2 .v2-c1-view,
body.v2-mode-C.v2-clevel-3 .v2-c1-view,
body.v2-mode-C.v2-clevel-4 .v2-c1-view,
body.v2-mode-C.v2-clevel-5 .v2-c1-view {
  display: none !important;
}

/* #comprehension-area (legacy comp tabs) — hide under C2..C5 since
 * Phase 6 had no level concept. C1 keeps it visible (legacy behavior).
 */
body.v2-mode-C.v2-clevel-2 #comprehension-area,
body.v2-mode-C.v2-clevel-3 #comprehension-area,
body.v2-mode-C.v2-clevel-4 #comprehension-area,
body.v2-mode-C.v2-clevel-5 #comprehension-area {
  display: none !important;
}

/* ── C3 view container ────────────────────────────────────────────── */
.v2-c3-view {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 6px 4px 12px;
}
body.v2-mode-C.v2-cmode-Q.v2-clevel-3 .v2-c3-view { display: flex; }
.v2-c3-view[hidden] { display: none !important; }

/* ── Three-strip placeholder area ─────────────────────────────────── */
.c3-strips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--v2-hairline, #e5e3dc);
  border-radius: 10px;
  background: var(--v2-surface, #fdfcf7);
}
.c3-strip {
  padding: 6px 4px;
  line-height: 1.7;
  border-radius: 6px;
  transition: background 0.16s ease, opacity 0.16s ease;
}
.c3-strip.is-dim { opacity: 0.55; }
.c3-strip.is-empty { color: var(--v2-ink-3, #8a877e); font-style: italic; }
.c3-strip.c3-strip-current {
  background: var(--v2-surface-2, #f3f1ea);
  border: 1px solid var(--v2-hairline-strong, #c9c5b9);
  padding: 8px 8px;
}
.c3-strip-empty {
  color: var(--v2-ink-3, #8a877e);
  font-style: italic;
  letter-spacing: 0.08em;
}

/* ── Controls ─────────────────────────────────────────────────────── */
.c3-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.c3-play-btn,
.c3-ready-btn,
.c3-next-btn {
  font: 600 0.9rem/1 Inter, system-ui, sans-serif;
  border: 1px solid var(--v2-hairline, #e5e3dc);
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: var(--v2-ink, #14140f);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.c3-play-btn { background: var(--v2-ink, #14140f); color: #fff; border-color: var(--v2-ink, #14140f); }
.c3-play-btn:hover { background: var(--v2-ink-2, #4a4842); border-color: var(--v2-ink-2, #4a4842); }
.c3-play-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.c3-ready-btn:hover,
.c3-next-btn:hover {
  background: var(--v2-surface-2, #f3f1ea);
  border-color: var(--v2-ink-3, #8a877e);
}

/* ── MCQ panel ────────────────────────────────────────────────────── */
.c3-mcq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--v2-hairline, #e5e3dc);
  border-radius: 10px;
  background: #fff;
}
.c3-mcq[hidden] { display: none !important; }

.c3-mcq-prompt {
  font: 600 0.95rem/1.4 Inter, system-ui, sans-serif;
  color: var(--v2-ink, #14140f);
}

.c3-mcq-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.c3-mcq-option {
  display: flex;
  align-items: flex-start;
  text-align: left;
  font: 500 0.9rem/1.4 Inter, system-ui, sans-serif;
  background: var(--v2-surface, #fdfcf7);
  color: var(--v2-ink, #14140f);
  border: 1px solid var(--v2-hairline, #e5e3dc);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.c3-mcq-option:hover:not(.is-locked) {
  background: #fff;
  border-color: var(--v2-ink-3, #8a877e);
}
.c3-mcq-option:disabled,
.c3-mcq-option.is-locked { cursor: default; }
.c3-mcq-option.is-correct {
  background: #ddf3e0;
  border-color: #2e7d32;
  color: #14401a;
}
.c3-mcq-option.is-incorrect {
  background: #fce0e0;
  border-color: #b03030;
  color: #4d1212;
}
.c3-mcq-option.is-right-answer:not(.is-correct):not(.is-incorrect) {
  border-color: #2e7d32;
  background: #f1fbf3;
}

.c3-mcq-feedback {
  font: 600 0.85rem/1.4 Inter, system-ui, sans-serif;
  min-height: 1.2em;
}
.c3-mcq-feedback.is-correct { color: #2e7d32; }
.c3-mcq-feedback.is-incorrect { color: #b03030; }

/* ── Mobile niceties ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .c3-strips { padding: 6px 6px; }
  .c3-strip.c3-strip-current { padding: 6px 6px; }
  .c3-play-btn, .c3-ready-btn, .c3-next-btn { width: 100%; }
}

/* ── Phase 8: "Більше контексту" chip + C3 extra-context strips ────── */
/* The chip is shared visual language across C3 + C4 (C4's sheet only adds
 * its strip cosmetics; the chip rules live here as canonical). */
.v2-c-more-context-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 0.78rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.02em;
  background: var(--v2-surface, #fdfcf7);
  color: var(--v2-ink-2, #4a4842);
  border: 1px dashed var(--v2-hairline-strong, #c9c5b9);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  margin: 2px auto 6px;
}
.v2-c-more-context-chip:hover {
  background: var(--v2-surface-2, #f3f1ea);
  color: var(--v2-ink, #14140f);
  border-color: var(--v2-ink-3, #8a877e);
}
.v2-c-more-context-chip:focus-visible {
  outline: 2px solid var(--v2-target, #b08d34);
  outline-offset: 2px;
}
.v2-c-more-context-chip.is-expanded {
  background: var(--v2-ink, #14140f);
  color: #fff;
  border-color: var(--v2-ink, #14140f);
  border-style: solid;
}
.v2-c-more-context-chip .v2-c-mc-glyph {
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 0.95em;
  line-height: 1;
}

/* C3 extra-context strips — dimmer than the regular prev/next strip. */
.c3-strip-extra {
  opacity: 0.32;
  padding: 4px 4px;
  line-height: 1.6;
  border-radius: 5px;
  font-size: 0.92em;
}
.c3-strip-extra.is-empty {
  color: var(--v2-ink-3, #8a877e);
  font-style: italic;
}
