/* =========================================================
   OKHOOL — Playful Unified (Final)
   Palette: Cream/Soft — Accessible, Minimal Motion
   ========================================================= */
:root{
  --accent: #7c3aed;      /* progress & checked accent */
  --primary: #1e40af;     /* primary buttons */
  --ink: #0f172a;         /* main text */
  --muted: #64748b;       /* secondary text */
  --line: #e5e7eb;        /* subtle borders */
  --bg-soft: #faf8f3;     /* cream */
  --opt-hover: #fbfaff;   /* very light selection hover */
  --chip-bg: #eef2ff;     /* result icon chip */
  --chip-border: #c7d2fe;
  --chip-ink: #223f8e;
  --bar-fill: #ff8a4c;    /* trait bars */
  --bar-track:#e2e8f0;
}

/* ===== Page wrapper ===== */
.leveltest-wrapper{
  background: var(--bg-soft);
  color: var(--ink);
  max-width: 940px;
  margin: 24px auto 64px;
  padding: 0 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

/* small entrance effect (very light) */
.leveltest-wrapper .lt-fade{
  opacity: 0; transform: translateY(4px) scale(0.99); transition: opacity .2s ease, transform .2s ease;
}
.leveltest-wrapper .lt-fade.show{
  opacity: 1; transform: none;
}

/* ===== Test-internal headings (SEO: use H3 inside test) ===== */
.leveltest-wrapper .lt-test-title{
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 800;
  margin: 0 0 8px;
  color: #111827;
}
.leveltest-wrapper .lt-q-title{
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  margin: 8px 0 12px;
  color: var(--ink);
}

/* =========================================================
   PROGRESS (uses your DOM)
   .lt-progress-row > .lt-progress-topline (labels)
                     > .lt-progress-bar-track > #progressFill.lt-progress-bar-fill
   ========================================================= */
.leveltest-wrapper .lt-progress-row{
  margin: 8px 0 16px;
}
.leveltest-wrapper .lt-progress-topline{
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: var(--muted);
  margin-bottom: 8px;
}
.leveltest-wrapper .lt-progress-bar-track{
  position: relative; height: 8px;
  background: #ede9fe; border-radius: 999px; overflow: hidden;
}
.leveltest-wrapper #progressFill.lt-progress-bar-fill{
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: var(--accent); border-radius: 999px; transition: width .25s ease;
}

/* =========================================================
   QUESTION CARD + CHOICES
   ========================================================= */
.leveltest-wrapper .lt-q-head{ margin-bottom: 12px; }
.leveltest-wrapper .lt-q-count{ color: var(--muted); font-weight: 600; margin-bottom: 6px; }

/* vertical list with clear spacing so items never stick */
.leveltest-wrapper .lt-q-choices{
  display: flex; flex-direction: column; gap: 16px;  /* <-- anti-stick gap */
}

/* each choice row */
.leveltest-wrapper .lt-choice-row{ display: flex; align-items: stretch; }

/* actual clickable card */
.leveltest-wrapper .lt-option-btn{
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 2px solid var(--line); background: #fff; border-radius: 12px;
  padding: 14px 16px; min-height: 44px;
  cursor: pointer; user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

/* hover = border + very light bg (no dim/scale) */
@media (hover:hover){
  .leveltest-wrapper .lt-option-btn:hover{
    border-color: #cbd5e1; background: var(--opt-hover);
  }
}

/* hide native radio; keep accessible */
.leveltest-wrapper .lt-radio{ position: absolute; opacity: 0; pointer-events: none; }

/* checked state: accent border + soft ring + very light bg */
.leveltest-wrapper .lt-radio:checked + .lt-option-btn{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
  background: #fbfaff;
}

/* focus for keyboard users */
.leveltest-wrapper .lt-option-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(30,90,200,.20);
}

/* ---- “Checked dot” without letter badges ----
   draw a small dot at left when checked; no A/B/C labels */
.leveltest-wrapper .lt-option-btn::before{
  content: ''; width: 0; height: 0; margin-right: 0; /* default hidden */
}
.leveltest-wrapper .lt-radio:checked + .lt-option-btn::before{
  content: ''; flex: 0 0 10px; height: 10px; margin-right: 4px;
  border-radius: 50%; background: var(--accent);
}

/* remove any shake/invalid animations globally */
.leveltest-wrapper .shake, .leveltest-wrapper [data-anim="shake"]{
  animation: none !important; transform: none !important;
}

/* =========================================================
   BOTTOM NAV (Previous left, Next right)
   ========================================================= */
.leveltest-wrapper .lt-quiz-nav{
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px;
}
.leveltest-wrapper .lt-btn{
  padding: 12px 18px; border-radius: 12px; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; background: #fff; color: var(--ink);
  transition: transform .04s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.leveltest-wrapper .lt-btn.outline{
  background: #f8fafc; color: #0f172a; border-color: var(--line); justify-self: start;
}
.leveltest-wrapper .lt-btn.primary{
  background: var(--primary); color: #fff; justify-self: end;
}
.leveltest-wrapper .lt-btn:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(30,90,200,.2); }

/* =========================================================
   RESULTS (share-friendly width)
   ========================================================= */
#lt-results{ display: none; }
.leveltest-wrapper .lt-result-card{
  max-width: 600px;   /* social-friendly narrow card */
  margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.leveltest-wrapper #resultIcon{
  display: flex; justify-content: center; margin: 10px 0 8px;
}
.leveltest-wrapper #resultIcon .planet-badge{
  width: 128px; height: 128px; border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.leveltest-wrapper #resultTitle{
  font-size: clamp(26px, 3.6vw, 34px); font-weight: 800;
  text-align: center; color: #111827; margin: 6px 0;
}
.leveltest-wrapper #resultTagline{
  text-align: center; color: #4b5563; margin-bottom: 16px;
}

/* strengths / bullets with small icon chips (optional) */
.leveltest-wrapper .lt-result-bullets.iconized{
  list-style: none; padding: 0; margin: 8px 0 18px;
}
.leveltest-wrapper .lt-result-bullets.iconized li{
  display: flex; align-items: center; gap: 10px; margin: 10px 0;
}
.leveltest-wrapper .lt-result-bullets.iconized .ico{
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--chip-bg); color: var(--chip-ink); border: 1px solid var(--chip-border);
  font-size: 16px;
}

/* traits bars */
.leveltest-wrapper .trait-row{
  display: grid; grid-template-columns: 140px 1fr; align-items: center;
  gap: 12px; margin: 10px 0;
}
.leveltest-wrapper .trait-label{ color: #334155; font-weight: 600; }
.leveltest-wrapper .trait-track{
  background: var(--bar-track); height: 12px; border-radius: 8px; overflow: hidden;
}
.leveltest-wrapper .trait-fill{
  height: 100%; background: var(--bar-fill); width: 0%;
  transition: width .35s ease;
}

/* actions (Share / Test again) */
.leveltest-wrapper .lt-actions{
  display: flex; justify-content: center; gap: 12px; margin-top: 16px;
}
.leveltest-wrapper .lt-actions .lt-btn.primary{ background: var(--primary); color: #fff; }
.leveltest-wrapper .lt-actions .lt-btn.outline{ background: #fafcff; color: var(--chip-ink); border-color: #cbd5e1; }

/* =========================================================
   MISC
   ========================================================= */
@media (max-width: 480px){
  .leveltest-wrapper{ margin-bottom: 48px; }
  .leveltest-wrapper .lt-q-choices{ gap: 14px; }
  .leveltest-wrapper .lt-result-card{ padding: 16px; }
}
