/* Quiz wheel (generic tool 'quiz'). Loaded after wheel.css; reuses its tokens, settings rows and buttons.
   Logical properties only (RTL by dir alone), dark mode through --lh-*, reduced motion handled by wheel.css. */

/* team colours (scoreboard dots, turn highlight, "Turn: …" line in the result dialog) */
[data-qc="0"] { --c: #5B3DF5; }
[data-qc="1"] { --c: #E8590C; }
[data-qc="2"] { --c: #12805C; }
[data-qc="3"] { --c: #D6336C; }
[data-qc="4"] { --c: #1C7ED6; }
[data-qc="5"] { --c: #A67C00; }

/* the card: under the wheel on phones, first tab of the side panel on wide screens (JS) */
.lh-quiz-card:not(.is-on) { display: none; }
.lh-quiz-card { display: flex; flex-direction: column; gap: 14px; }
.lh-slot--below > .lh-quiz-card { padding: 14px 16px 6px; border: 1px solid var(--lh-border); border-radius: 16px; background: var(--lh-surface); box-shadow: var(--lh-shadow-sm); }
.lh-quiz-sec { display: flex; flex-direction: column; gap: 6px; }
.lh-quiz-sec + .lh-quiz-sec { padding-block-start: 12px; border-block-start: 1px solid var(--lh-border); }
.lh-quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.lh-quiz-h { margin: 0; color: var(--lh-muted); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .lh-quiz-h { letter-spacing: 0; font-size: .875rem; }
.lh-quiz-left { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.lh-quiz-bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--lh-surface-2); }
.lh-quiz-bar > span { display: block; inline-size: 0; height: 100%; border-radius: inherit; background: var(--lh-brand); transition: inline-size .3s var(--lh-ease); }

/* scoreboard */
.lh-quiz-teams { display: flex; flex-direction: column; gap: 8px; }
.lh-quiz-teams[hidden] { display: none; }
.lh-quiz-teams .lh-set__row { padding-block: 2px 4px; }
.lh-quiz-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lh-quiz-team {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px; padding-inline-end: 12px;
  border: 2px solid transparent; border-radius: 14px; background: var(--lh-surface-2); transition: border-color .15s, background-color .15s;
}
.lh-quiz-team.is-turn { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--lh-surface)); }
.lh-quiz-go { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.lh-quiz-go:focus-visible { outline: 2px solid var(--lh-focus); outline-offset: 0; }
.lh-quiz-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); transition: scale .15s var(--lh-ease); }
.lh-quiz-go[aria-pressed="true"] .lh-quiz-dot { scale: 1.2; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.lh-quiz-name.lh-field { min-height: 40px; padding: 6px 10px; background: var(--lh-surface); font-weight: 650; }
.lh-quiz-pts { min-width: 2ch; font-size: 1.5rem; font-weight: 850; line-height: 1; text-align: end; font-variant-numeric: tabular-nums; }
.lh-quiz-team.is-lead .lh-quiz-pts { color: var(--c); }
.lh-quiz-turn-l { margin: 0; color: var(--lh-muted); font-size: .875rem; font-weight: 700; }
.lh-quiz-turn-l:empty { display: none; }

/* result dialog: the question, Show answer → the answer, then Right / Wrong */
.lh-win.lh-quiz-dlg .lh-win__name, .lh-win.lh-quiz-dlg .lh-win__name.is-long {
  padding: .55em .85em .6em; border-radius: 20px; font-size: clamp(1.25rem, 5.4vw, 2rem); font-weight: 750; line-height: 1.3;
}
.lh-classroom .lh-win.lh-quiz-dlg .lh-win__name { font-size: clamp(1.5rem, 6.4vw, 2.75rem); }
.lh-quiz-rev { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lh-quiz-for { margin: 0; padding: 4px 14px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, var(--lh-surface)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); font-weight: 750; font-size: .9375rem; overflow-wrap: anywhere; }
.lh-quiz-ans { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; max-width: 420px; padding: 12px 16px 14px; border: 2px dashed color-mix(in srgb, var(--lh-brand) 45%, transparent); border-radius: 18px; background: var(--lh-brand-soft); animation: lh-quiz-pop .32s var(--lh-ease); }
.lh-quiz-ans[hidden] { display: none; }
.lh-quiz-ans__k { color: var(--lh-brand-soft-ink); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
:lang(ar) .lh-quiz-ans__k { letter-spacing: 0; font-size: .875rem; }
.lh-quiz-ans__t { margin: 0; font-size: clamp(1.1875rem, 4.8vw, 1.625rem); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; text-wrap: balance; }
.lh-classroom .lh-quiz-ans__t { font-size: clamp(1.5rem, 6vw, 2.5rem); }
.lh-quiz-show { width: 100%; max-width: 320px; }
.lh-quiz-marks { display: flex; gap: 8px; width: 100%; max-width: 360px; }
.lh-quiz-marks[hidden] { display: none; }
.lh-quiz-marks .lh-btn { flex: 1 1 0; min-height: 52px; border-radius: 999px; font-size: 1rem; }
.lh-quiz-ok { color: var(--lh-success); border-color: color-mix(in srgb, var(--lh-success) 50%, transparent); }
.lh-quiz-ko { color: var(--lh-danger); border-color: color-mix(in srgb, var(--lh-danger) 50%, transparent); }
.lh-quiz-ok.is-chosen { background: var(--lh-success); color: var(--lh-surface); opacity: 1 !important; }
.lh-quiz-ko.is-chosen { background: var(--lh-danger); color: var(--lh-surface); opacity: 1 !important; }
.lh-quiz-fb { margin: 0; font-weight: 750; color: var(--lh-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@keyframes lh-quiz-pop { 0% { scale: .85; opacity: 0; } 60% { scale: 1.03; opacity: 1; } }

@media (max-width: 767.98px) { .lh-app #lh-tab-quiz { display: none; } }
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023.98px) { .lh-app #lh-tab-quiz { display: none; } }
