/* ═══════════════════════════════════════
   CAQ — Frontend Quiz Styles
═══════════════════════════════════════ */
.caq-quiz-wrap {
  max-width: 780px;
  margin: 0 auto;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a2a4a;
}

.caq-screen { position: relative; }
.caq-hidden { display: none !important; }

/* ── INTRO ── */
.caq-hero {
  background: linear-gradient(160deg, #e8f0ff, #f4f8ff);
  border: 2px solid #d0dcf8;
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
}
.caq-shield-icon { width: 72px; height: 80px; margin: 0 auto 20px; }
.caq-shield-icon svg { width: 100%; height: 100%; }
.caq-hero h2 {
  font-size: 28px; font-weight: 800; color: #1a2a4a; margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.caq-intro-text { font-size: 16px; color: #5a6a8a; line-height: 1.6; margin-bottom: 24px; }
.caq-meta-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.caq-pill {
  background: #fff; border: 1.5px solid #d0dcf8; border-radius: 30px;
  padding: 6px 14px; font-size: 14px; font-weight: 600; color: #1a3cc8;
}

/* ── BUTTONS ── */
.caq-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 10px; padding: 12px 28px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all 0.15s ease;
}
.caq-btn-primary {
  background: linear-gradient(135deg, #1a3cc8, #2d5be3);
  color: #fff; box-shadow: 0 4px 14px rgba(26,60,200,0.25);
}
.caq-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,60,200,0.35); }
.caq-btn-outline {
  background: #fff; color: #1a3cc8;
  border: 2px solid #d0dcf8;
}
.caq-btn-outline:hover { border-color: #1a3cc8; }
.caq-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── PROGRESS ── */
.caq-progress-bar-wrap {
  height: 6px; background: #e4ecff; border-radius: 6px; margin-bottom: 8px;
}
.caq-progress-bar {
  height: 100%; background: linear-gradient(90deg, #1a3cc8, #4f8ef7);
  border-radius: 6px; transition: width 0.3s ease; width: 0%;
}
.caq-progress-label {
  font-size: 13px; color: #8090b0; text-align: right; margin-bottom: 20px;
}

/* ── QUESTION ── */
.caq-question { animation: caqFadeIn 0.3s ease; }
@keyframes caqFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.caq-q-number {
  font-size: 13px; font-weight: 700; color: #1a3cc8;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}
.caq-q-text {
  font-size: 20px; font-weight: 700; color: #1a2a4a;
  line-height: 1.4; margin-bottom: 22px;
}
.caq-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.caq-option {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 2px solid #e4ecff; border-radius: 12px;
  padding: 14px 18px; cursor: pointer;
  transition: all 0.15s ease;
}
.caq-option:hover { border-color: #1a3cc8; background: #f0f4ff; }
.caq-option-selected { border-color: #1a3cc8 !important; background: #e8f0ff !important; }
.caq-option input { display: none; }

.caq-option-letter {
  width: 32px; height: 32px; min-width: 32px;
  background: #e8f0ff; border: 1.5px solid #c0d0f0;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #1a3cc8;
}
.caq-option-selected .caq-option-letter { background: #1a3cc8; color: #fff; border-color: #1a3cc8; }
.caq-option-text { font-size: 16px; color: #2a3a5a; line-height: 1.4; }

.caq-explanation {
  background: #e8f0ff; border-left: 4px solid #1a3cc8;
  border-radius: 0 10px 10px 0; padding: 14px 18px;
  font-size: 15px; color: #1a3cc8; line-height: 1.5; margin-bottom: 16px;
}

/* ── NAVIGATION ── */
.caq-nav {
  display: flex; gap: 10px; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid #e4ecff; margin-top: 10px;
}

/* ── LOADING ── */
.caq-loading { text-align: center; padding: 60px 20px; color: #8090b0; }
.caq-spinner {
  width: 44px; height: 44px; border: 4px solid #e4ecff;
  border-top-color: #1a3cc8; border-radius: 50%;
  animation: caqSpin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes caqSpin { to { transform: rotate(360deg); } }

/* ── RESULT: HERO ── */
.caq-result-hero { text-align: center; margin-bottom: 30px; }

.caq-score-circle {
  width: 130px; height: 130px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 24px; border: 5px solid;
}
.caq-score-pass { border-color: #1a3cc8; background: #e8f0ff; }
.caq-score-fail { border-color: #ef4444; background: #fff0f0; }
.caq-score-pct {
  font-size: 32px; font-weight: 900; line-height: 1;
}
.caq-score-pass .caq-score-pct { color: #1a3cc8; }
.caq-score-fail .caq-score-pct { color: #ef4444; }
.caq-score-fraction { font-size: 14px; color: #8090b0; margin-top: 4px; }

.caq-result-banner {
  border-radius: 16px; padding: 24px 28px; margin-bottom: 20px; text-align: left;
}
.caq-banner-pass { background: linear-gradient(135deg, #e8f0ff, #f0f6ff); border: 2px solid #c0d0f0; }
.caq-banner-fail { background: #fff8f8; border: 2px solid #fecaca; }
.caq-banner-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.caq-banner-pass .caq-banner-title { color: #1a3cc8; }
.caq-banner-fail .caq-banner-title { color: #dc2626; }
.caq-banner-msg { font-size: 16px; line-height: 1.6; color: #3a4a6a; }
.caq-banner-threshold { margin-top: 10px; font-size: 14px; color: #8090b0; }

/* ── REWARD BOX ── */
.caq-reward-box {
  background: linear-gradient(135deg, #1a3cc8, #2d5be3);
  border-radius: 16px; padding: 28px 32px; text-align: center; margin-bottom: 24px;
}
.caq-reward-label { font-size: 15px; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.caq-reward-title { font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.9); margin-bottom: 12px; }
.caq-reward-code {
  display: inline-block;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px; padding: 14px 32px;
  font-family: 'Courier New', monospace;
  font-size: 28px; font-weight: 700; letter-spacing: 4px; color: #fff;
  margin-bottom: 16px; word-break: break-all;
}
.caq-reward-hint { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.5; max-width: 460px; margin: 0 auto; }

/* ── ANSWER REVIEW ── */
.caq-review { margin-bottom: 28px; }
.caq-review h3 { font-size: 18px; font-weight: 700; color: #1a2a4a; margin-bottom: 14px; }

.caq-review-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 18px; border-radius: 12px; margin-bottom: 8px; border: 1.5px solid;
}
.caq-rev-right { background: #f0fff6; border-color: #bbf7d0; }
.caq-rev-wrong { background: #fff8f8; border-color: #fecaca; }
.caq-rev-num { font-size: 15px; font-weight: 700; white-space: nowrap; min-width: 48px; padding-top: 1px; }
.caq-rev-body { flex: 1; }
.caq-rev-answer { font-size: 15px; color: #3a4a6a; margin-bottom: 6px; }
.caq-rev-exp { font-size: 14px; color: #5a6a8a; line-height: 1.5; }

/* ── RESULT ACTIONS ── */
.caq-result-actions { text-align: center; padding-top: 10px; }

/* ── ALERTS ── */
.caq-alert {
  padding: 14px 18px; border-radius: 10px; font-size: 15px;
  margin-bottom: 16px; line-height: 1.5;
}
.caq-alert-warn { background: #fffbeb; border: 1.5px solid #fcd34d; color: #92400e; }
.caq-alert-error { background: #fff8f8; border: 1.5px solid #fecaca; color: #dc2626; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .caq-hero { padding: 32px 20px; }
  .caq-hero h2 { font-size: 22px; }
  .caq-q-text { font-size: 17px; }
  .caq-reward-code { font-size: 20px; letter-spacing: 2px; padding: 12px 18px; }
  .caq-meta-pills { flex-direction: column; align-items: center; }
  .caq-nav { flex-wrap: wrap; }
}

/* ── CLAIM FORM (name + email step) ── */
.caq-claim-box {
  background: linear-gradient(160deg, #f0f6ff, #e8f0ff);
  border: 2px solid #c0d0f8;
  border-radius: 18px;
  padding: 28px 32px;
  margin: 20px 0;
  text-align: left;
}
.caq-claim-title {
  font-size: 20px; font-weight: 800; color: #1a2a4a;
  margin-bottom: 8px;
}
.caq-claim-desc {
  font-size: 14px; color: #6878a0; margin-bottom: 20px; line-height: 1.5;
}
.caq-claim-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px;
}
@media (max-width: 560px) { .caq-claim-fields { grid-template-columns: 1fr; } }

.caq-claim-field { display: flex; flex-direction: column; gap: 5px; }
.caq-claim-field label { font-size: 13px; font-weight: 700; color: #3a4a6a; }
.caq-required { color: #ef4444; }
.caq-claim-input {
  padding: 10px 14px;
  border: 2px solid #d0dcf8; border-radius: 10px;
  font-size: 15px; color: #1a2a4a;
  transition: border-color 0.15s;
  width: 100%;
}
.caq-claim-input:focus { border-color: #1a3cc8; outline: none; box-shadow: 0 0 0 3px rgba(26,60,200,0.1); }
.caq-claim-error {
  background: #fff0f0; border: 1.5px solid #fca5a5; border-radius: 8px;
  padding: 10px 14px; font-size: 14px; color: #dc2626; margin-bottom: 14px;
}
.caq-claim-privacy {
  font-size: 12px; color: #9aa0b8; margin-top: 12px; text-align: center;
}
