/* ═══════════════════════════════════════════════════════════════════════
   academy/css/quiz.css — QUIZ + RESULT screens
   Uses ONLY core tokens (tokens.css). Prefix: acp-
   Dark fallbacks are last-resort; real tokens win in light AND dark.
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════ QUIZ ═══════════════ */
.acp-quiz-top {
  position: sticky; top: 0; z-index: 5;
  background: var(--hb-bg, var(--bg, #0D0C10));
  padding: 12px 0 14px;
}
.acp-quiz-count {
  font-size: 13px; font-weight: 700; color: var(--text, #F5F4F7);
  margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
}
.acp-quiz-count .acp-q-type {
  font-size: 11px; font-weight: 800; color: var(--text-3, #9B9AA3);
  background: var(--bg-3, #29282F); padding: 4px 11px; border-radius: 999px;
}

.acp-q {
  animation: acp-fade .3s ease both;
}
.acp-q-media {
  width: 100%; border-radius: var(--radius-lg, 18px);
  margin-bottom: 16px; overflow: hidden; background: #000; display: block;
}
.acp-q-text {
  font-size: 19px; font-weight: 800; line-height: 1.45;
  color: var(--text, #F5F4F7); margin-bottom: 6px;
}
.acp-q-points { font-size: 12px; color: var(--text-3, #9B9AA3); font-weight: 700; margin-bottom: 16px; }

.acp-opts { display: flex; flex-direction: column; gap: 12px; }
.acp-opt {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px;
  padding: 15px 16px;
  border: 2px solid var(--border, rgba(255,255,255,.1));
  border-radius: var(--radius-md, 16px);
  background: var(--bg-2, #141318);
  box-shadow: 0 3px 0 var(--border);
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .1s ease, transform .1s ease;
}
.acp-opt:active { transform: translateY(3px); box-shadow: 0 0 0 var(--border); }
.acp-opt.sel {
  border-color: var(--info, #1CB0F6);
  background: var(--info-bg, rgba(28,176,246,.14));
  box-shadow: 0 3px 0 var(--info, #1CB0F6);
}
.acp-opt.sel:active { transform: translateY(3px); box-shadow: 0 0 0 var(--info, #1CB0F6); }
.acp-opt-mark {
  width: 26px; height: 26px; flex: none;
  border: 2px solid var(--border, rgba(255,255,255,.25));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: transparent;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s var(--bounce);
}
.acp-opt.single .acp-opt-mark { border-radius: 50%; }
.acp-opt.multi .acp-opt-mark { border-radius: 8px; }
.acp-opt.sel .acp-opt-mark {
  background: var(--info, #1CB0F6); border-color: var(--info, #1CB0F6);
  color: #fff; transform: scale(1.08);
}
.acp-opt-text { font-size: 15px; line-height: 1.5; color: var(--text, #F5F4F7); font-weight: 700; flex: 1; }
.acp-opt-img { width: 100%; border-radius: 10px; margin-top: 4px; }
.acp-opt.card { flex-direction: column; align-items: stretch; text-align: left; }

/* Review mode (admin course-preview, quiz.js Academy.quizQuestionCardHtml
   with {review:true}) — marks the correct option(s). Additive state class
   only; never applied on the live interactive quiz screen (review always
   false there), so this cannot affect the real employee quiz flow. */
.acp-opt.correct {
  border-color: var(--success, #58CC02);
  background: var(--success-bg, rgba(88,204,2,.12));
  box-shadow: 0 3px 0 var(--success, #58CC02);
}
.acp-opt-correct-badge { flex: none; font-size: 16px; }
.acp-q-explain {
  font-size: 13px; line-height: 1.6; color: var(--text-2, #C9C8CF);
  background: var(--info-bg, rgba(28,176,246,.1));
  border-radius: var(--radius-md, 14px); padding: 12px 14px; margin-top: 14px;
}

.acp-quiz-nav {
  position: sticky; bottom: 0;
  display: flex; gap: 10px; padding: 14px 0; margin-top: 20px;
  background: linear-gradient(to top, var(--hb-bg, var(--bg, #0D0C10)) 65%, transparent);
}
.acp-quiz-nav .acp-btn { flex: 1; border-radius: var(--radius-full, 999px); }

/* ═══════════════ RESULT ═══════════════ */
.acp-result-hero {
  text-align: center; padding: 18px 0 8px;
  animation: acp-pop .4s ease both;
}
.acp-ring-wrap { position: relative; width: 180px; height: 180px; margin: 0 auto 8px; }
.acp-ring { transform: rotate(-90deg); }
.acp-ring-bg { fill: none; stroke: var(--bg-3, #29282F); }
.acp-ring-fg {
  fill: none; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.3,1);
}
.acp-ring-pass { stroke: var(--success, #7DD87D); }
.acp-ring-fail { stroke: var(--danger, #F58B8B); }
.acp-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.acp-ring-pct { font-size: 40px; font-weight: 800; color: var(--text, #F5F4F7); line-height: 1; }
.acp-ring-lbl { font-size: 12px; color: var(--text-3, #9B9AA3); margin-top: 4px; }

.acp-result-verdict { font-size: 22px; font-weight: 800; margin: 10px 0 4px; }
.acp-result-verdict.pass { color: var(--success, #7DD87D); }
.acp-result-verdict.fail { color: var(--danger, #F58B8B); }
.acp-result-sub { font-size: 14px; color: var(--text-3, #9B9AA3); }

.acp-result-badges {
  display: flex; justify-content: center; gap: 10px; margin: 16px 0 6px; flex-wrap: wrap;
}
.acp-rbadge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-2, #141318); border: 2px solid var(--border, rgba(255,255,255,.1));
  border-radius: 999px; padding: 9px 16px; font-size: 15px; font-weight: 900;
  color: var(--text, #F5F4F7);
}
.acp-rbadge.xp { color: var(--gold-edge, #E0A800); border-color: color-mix(in srgb, var(--gold, #FFC800) 55%, var(--border)); }
.acp-rbadge.streak { color: var(--streak, #FF9600); border-color: color-mix(in srgb, var(--streak, #FF9600) 50%, var(--border)); }

.acp-levelup {
  text-align: center; margin: 16px 0;
  background: var(--gold, #F2C94C); color: #6b4e00;
  border-radius: var(--radius-md, 16px); padding: 15px;
  font-size: 15px; font-weight: 900;
  box-shadow: 0 4px 0 var(--gold-edge, #E0A800);
  animation: acp-pop .5s var(--bounce) both;
}

.acp-wrong-title {
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--danger, #F58B8B); margin: 26px 0 12px;
}
.acp-wrong {
  padding: 16px; margin-bottom: 12px;
  background: var(--bg-2, #141318);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-left: 3px solid var(--danger, #F58B8B);
  border-radius: var(--radius-md, 16px);
}
.acp-wrong-q { font-size: 15px; font-weight: 700; color: var(--text, #F5F4F7); margin-bottom: 8px; }
.acp-wrong-exp {
  font-size: 13px; line-height: 1.6; color: var(--text-2, #C9C8CF);
  background: var(--success-bg, rgba(52,199,89,.1));
  border-radius: 10px; padding: 10px 12px; margin-top: 8px;
}
.acp-wrong-exp b { color: var(--success, #7DD87D); }
.acp-wrong video, .acp-wrong img { width: 100%; border-radius: 10px; margin-top: 10px; }

/* Feedback stars */
.acp-feedback { margin: 24px 0 10px; }
.acp-stars { display: flex; gap: 6px; justify-content: center; margin: 12px 0; }
.acp-star {
  font-size: 34px; cursor: pointer; color: var(--bg-3, #4a4952);
  transition: transform .12s ease, color .12s ease; background: none; border: none;
}
.acp-star.on { color: var(--gold, #F2C94C); }
.acp-star:hover { transform: scale(1.15); }
.acp-fb-comment {
  width: 100%; background: var(--bg-3, #29282F); color: var(--text, #F5F4F7);
  border: 2px solid var(--border, rgba(255,255,255,.1)); border-radius: var(--radius-md, 16px);
  padding: 12px 14px; font-size: 14px; font-weight: 600; resize: vertical; min-height: 64px; margin-top: 8px;
  transition: border-color .18s ease;
}
.acp-fb-comment:focus { border-color: var(--info, #1CB0F6); }

.acp-result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
