/* ═══════════════════════════════════════════════
   HMS Tests — Shared Test Page Styles
   Clean, inviting, modern survey design
═══════════════════════════════════════════════ */

.test-page-wrap { background:#fdf9f3; min-height:100vh; padding-bottom:60px; }

/* ── Test hero banner ── */
.test-hero {
  padding:44px 0 36px;
  position:relative; overflow:hidden;
}
.test-hero::before {
  content:''; position:absolute; inset:0;
  background-image:radial-gradient(circle,rgba(37,99,235,.15) 1px,transparent 1px);
  background-size:28px 28px; opacity:.4; pointer-events:none;
}
.test-hero-inner { max-width:760px; margin:0 auto; padding:0 20px; position:relative; z-index:1; }
.test-icon-wrap {
  width:60px; height:60px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  font-size:24px; margin-bottom:16px;
  box-shadow:0 4px 16px rgba(0,0,0,.1);
}
.test-hero h1 { font-size:clamp(1.6rem,3.5vw,2.2rem); font-weight:800;
  color:#0f172a; letter-spacing:-.03em; margin-bottom:8px; }
.test-hero p { font-size:15px; color:#475569; line-height:1.7; max-width:560px; margin-bottom:0; }
.test-meta-chips { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.test-chip {
  display:inline-flex; align-items:center; gap:5px;
  background:rgba(255,255,255,.8); border:1px solid rgba(37,99,235,.2);
  border-radius:5px; padding:5px 12px; font-size:11px; font-weight:600;
  color:#334155; backdrop-filter:blur(6px);
}
.test-chip i { font-size:9px; color:#2563eb; }

/* ── Progress bar ── */
.test-progress-bar-wrap {
  max-width:760px; margin:0 auto; padding:0 20px 20px;
}
.test-progress-track {
  height:5px; background:#e2e8f0; border-radius:10px; overflow:hidden;
  margin-bottom:8px;
}
.test-progress-fill {
  height:100%; background:linear-gradient(90deg,#2563eb,#0891b2);
  border-radius:10px; transition:width .4s ease;
}
.test-progress-label {
  font-size:11px; font-weight:600; color:#94a3b8;
  display:flex; justify-content:space-between;
}

/* ── Question cards ── */
.test-body { max-width:760px; margin:0 auto; padding:0 20px; }

.test-q-card {
  background:#fff; border:1.5px solid #e2e8f0; border-radius:16px;
  padding:28px; margin-bottom:14px; transition:border-color .2s;
}
.test-q-card:focus-within { border-color:#bfdbfe; box-shadow:0 0 0 3px rgba(37,99,235,.08); }

.test-q-num {
  font-size:10px; font-weight:800; color:#bfdbfe; letter-spacing:.08em;
  text-transform:uppercase; margin-bottom:10px;
  display:flex; align-items:center; gap:8px;
}
.test-q-num::after { content:''; flex:1; height:1px; background:#f1f5f9; }

.test-q-text {
  font-size:16px; font-weight:600; color:#0f172a; line-height:1.5;
  margin-bottom:20px; letter-spacing:-.01em;
}
.test-q-sub { font-size:13px; color:#64748b; margin-top:-14px; margin-bottom:18px; line-height:1.6; }

/* Radio options — the key UI element */
.test-options { display:flex; flex-direction:column; gap:8px; }
.test-options.horizontal { flex-direction:row; flex-wrap:wrap; }
.test-options.horizontal .test-opt { flex:1; min-width:100px; text-align:center; }

.test-opt { position:relative; }
.test-opt input[type="radio"] { position:absolute; opacity:0; width:0; height:0; }

.test-opt-label {
  display:flex; align-items:center; gap:12px;
  padding:13px 16px; border:1.5px solid #e2e8f0;
  border-radius:10px; cursor:pointer; transition:all .15s;
  font-size:14px; font-weight:500; color:#374151;
  background:#fafbfd; user-select:none;
}
.test-options.horizontal .test-opt-label {
  flex-direction:column; gap:6px; padding:16px 12px;
  justify-content:center; text-align:center; min-height:80px;
}
.test-opt-label:hover {
  border-color:#bfdbfe; background:#f0f7ff; color:#1e40af;
}
.test-opt input:checked + .test-opt-label {
  border-color:#2563eb; background:#eff6ff; color:#1d4ed8;
  box-shadow:0 0 0 3px rgba(37,99,235,.1);
}
.test-opt input:checked + .test-opt-label .opt-circle {
  background:#2563eb; border-color:#2563eb;
}
.test-opt input:checked + .test-opt-label .opt-circle::after {
  content:''; width:7px; height:7px; border-radius:50%; background:#fff;
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
}
.opt-circle {
  width:18px; height:18px; border-radius:50%;
  border:2px solid #d1d5db; flex-shrink:0; transition:all .15s;
  position:relative;
}
.test-options.horizontal .opt-circle { display:none; }

.opt-emoji { font-size:1.3rem; flex-shrink:0; }
.opt-text { flex:1; }
.opt-score { font-size:10px; font-weight:700; color:#94a3b8; margin-left:auto; flex-shrink:0; }

/* ── Instruction box ── */
.test-instruction {
  background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px;
  padding:14px 18px; margin-bottom:18px; font-size:13px; color:#1e3a8a;
  display:flex; gap:10px; align-items:flex-start; line-height:1.65;
}
.test-instruction i { margin-top:1px; flex-shrink:0; }

/* ── Submit button ── */
.test-submit-wrap { margin-top:24px; }
.test-submit {
  width:100%; padding:15px; border-radius:12px;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff; font-size:15px; font-weight:700;
  border:none; cursor:pointer; font-family:inherit;
  box-shadow:0 4px 16px rgba(37,99,235,.4);
  transition:all .2s; letter-spacing:-.01em;
}
.test-submit:hover { transform:translateY(-2px); box-shadow:0 8px 28px rgba(37,99,235,.5); }

/* ── Results ── */
.test-result { display:none; }
.result-hero {
  background:linear-gradient(135deg,#1e293b,#0f172a);
  border-radius:20px; padding:36px; text-align:center; margin-bottom:20px;
  position:relative; overflow:hidden;
}
.result-hero::before { content:''; position:absolute; width:300px; height:300px;
  border-radius:50%; background:rgba(37,99,235,.1); top:-100px; right:-60px; }

/* Gauge */
.gauge-wrap { margin:20px auto; width:180px; }
.gauge-svg { width:100%; }

.result-score-num {
  font-size:3.5rem; font-weight:900; color:#fff; letter-spacing:-.04em; line-height:1;
  position:relative; z-index:1;
}
.result-score-label {
  font-size:1rem; font-weight:700; color:rgba(255,255,255,.6); margin-top:6px;
  position:relative; z-index:1;
}
.result-level {
  display:inline-block; border-radius:6px; padding:6px 16px;
  font-size:13px; font-weight:700; margin-top:14px; position:relative; z-index:1;
}
.level-minimal { background:rgba(5,150,105,.3); color:#6ee7b7; }
.level-mild    { background:rgba(234,179,8,.25); color:#fcd34d; }
.level-moderate{ background:rgba(249,115,22,.25); color:#fdba74; }
.level-severe  { background:rgba(220,38,38,.3);  color:#fca5a5; }

.result-details {
  background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:24px; margin-bottom:14px;
}
.result-interpretation { font-size:15px; color:#1e293b; line-height:1.75; margin-bottom:14px; }
.result-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.result-bar-label { font-size:12px; color:#64748b; font-weight:500; width:100px; flex-shrink:0; }
.result-bar-track { flex:1; height:7px; background:#f1f5f9; border-radius:10px; overflow:hidden; }
.result-bar-fill { height:100%; border-radius:10px; transition:width 1s ease; }
.result-next {
  background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:20px;
}
.result-cta-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }

/* ── Warning for crisis ── */
.test-crisis-banner {
  background:#fef2f2; border:1.5px solid #fecaca; border-radius:12px;
  padding:16px 20px; margin-bottom:16px; display:flex; gap:12px;
}
