/*
 * Assessment Quiz Styles
 * ─────────────────────────────────────────────
 * Add this to your theme's stylesheet, or enqueue it as a separate
 * file. All selectors are prefixed with .aq- to avoid conflicts
 * with your theme or other plugins.
 *
 * The quiz inherits your theme's body font automatically.
 * Adjust the CSS custom properties in .aq-wrap to match your brand.
 */

/* ── Variables ──────────────────────────────── */
.aq-wrap {
  --aq-primary:       #1a3a5c;
  --aq-primary-light: #2563a8;
  --aq-accent:        #00b4a0;
  --aq-accent-bg:     #e0f7f5;
  --aq-surface:       #f8fafc;
  --aq-card:          #ffffff;
  --aq-border:        #e2e8f0;
  --aq-text:          #0f172a;
  --aq-muted:         #64748b;
  --aq-radius:        10px;
  --aq-radius-lg:     16px;

  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  font-family: inherit;
  color: var(--aq-text);
  line-height: 1.6;
}

/* ── Header ─────────────────────────────────── */
.aq-header {
  background: var(--aq-primary);
  border-radius: var(--aq-radius-lg);
  padding: 2.5rem 2rem 2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}
.aq-header::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(0,180,160,0.12);
  pointer-events: none;
}
.aq-tag {
  display: inline-block;
  background: rgba(0,180,160,0.2);
  color: var(--aq-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.aq-title {
  color: #ffffff;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  position: relative;
  z-index: 1;
}
.aq-instructions {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  max-width: 520px;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ── Progress bar (sticky floating pill) ───── */
.aq-progress-bar-wrap {
  position: sticky;
  top: 150px;
  z-index: 100;
  background: var(--aq-card);
  border: 1px solid var(--aq-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  /* Float to the right, leave room for content */
  margin-left: auto;
  margin-right: 0;
  width: fit-content;
  max-width: 260px;
}
.aq-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--aq-primary);
  white-space: nowrap;
}
.aq-progress-track {
  width: 80px;
  height: 6px;
  background: var(--aq-border);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.aq-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aq-accent), var(--aq-primary-light));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}
.aq-progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--aq-accent);
  white-space: nowrap;
}

/* ── Question card ──────────────────────────── */
.aq-question-card {
  background: var(--aq-card);
  border: 1px solid var(--aq-border);
  border-radius: var(--aq-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.aq-question-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.aq-question-card.aq-missing {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.aq-question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}
.aq-q-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--aq-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.aq-question-card.aq-answered .aq-q-num {
  background: var(--aq-accent);
}
.aq-q-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aq-muted);
}
.aq-question-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--aq-text);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Answer options ─────────────────────────── */
.aq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 520px) {
  .aq-options { grid-template-columns: 1fr; }
  .aq-progress-bar-wrap { top: 50px; }
}

.aq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--aq-radius);
  border: 1.5px solid var(--aq-border);
  background: var(--aq-surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--aq-text);
  line-height: 1.4;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.aq-option:hover {
  border-color: var(--aq-accent);
  background: var(--aq-accent-bg);
}
.aq-opt-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--aq-border);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.aq-opt-text {
  flex: 1;
}

/* Selected state — single colour, no score chip */
.aq-option.aq-selected {
  border-color: var(--aq-primary-light);
  background: #e8f4ff;
}
.aq-option.aq-selected .aq-opt-dot {
  border-color: var(--aq-primary-light);
  background: var(--aq-primary-light);
}

/* ── Submit area ─────────────────────────────── */
.aq-submit-area {
  margin-top: 2rem;
  text-align: center;
}
.aq-unanswered-msg {
  font-size: 0.875rem;
  color: #b91c1c;
  margin-bottom: 0.75rem;
}
.aq-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--aq-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 2.5rem;
  border: none;
  border-radius: var(--aq-radius);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}
.aq-btn-submit:hover  { background: var(--aq-primary-light); }
.aq-btn-submit:active { transform: scale(0.98); }

/* ── Results header ──────────────────────────── */
.aq-results-header {
  background: var(--aq-primary);
  border-radius: var(--aq-radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  color: #fff;
}
.aq-score-display {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.aq-score-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--aq-accent);
}
.aq-score-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}
.aq-tier-name {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ── Tier result card ────────────────────────── */
.aq-tier-card {
  border-radius: var(--aq-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--aq-accent-bg);
  border-left: 5px solid var(--aq-accent);
}
.aq-tier-range {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--aq-muted);
  margin-bottom: 6px;
}
.aq-tier-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--aq-primary);
  margin: 0 0 0.5rem;
}
.aq-tier-desc {
  font-size: 0.95rem;
  color: var(--aq-text);
  margin: 0 0 0.75rem;
}
.aq-focus-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.07);
  color: var(--aq-muted);
}

/* ── Subcategory breakdown ───────────────────── */
.aq-subcats-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--aq-muted);
  margin-bottom: 0.75rem;
}
.aq-subcats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}
@media (max-width: 480px) {
  .aq-subcats-grid { grid-template-columns: 1fr; }
}
.aq-subcat-card {
  background: var(--aq-card);
  border: 1px solid var(--aq-border);
  border-radius: var(--aq-radius);
  padding: 1rem;
}
.aq-subcat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aq-muted);
  margin-bottom: 6px;
}
.aq-subcat-track {
  height: 8px;
  background: var(--aq-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.aq-subcat-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--aq-primary-light);
  transition: width 0.6s ease;
}
.aq-subcat-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--aq-text);
}

/* ── Retake button ───────────────────────────── */
.aq-retake-wrap {
  text-align: center;
  margin-top: 1rem;
}
.aq-btn-retake {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--aq-primary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--aq-primary);
  border-radius: var(--aq-radius);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.aq-btn-retake:hover {
  background: var(--aq-primary);
  color: #fff;
}

/* ── Results footer (CTA + retake) ──────────────────────────────────────── */
.aq-results-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.aq-btn-cta {
  display: inline-flex;
  align-items: center;
  background: var(--aq-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--aq-radius);
  text-decoration: none;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}
.aq-btn-cta:hover  { background: #009688; color: #fff; text-decoration: none; }
.aq-btn-cta:active { transform: scale(0.98); }

/* ── Results Explained ───────────────────────────── */

.aq-results-explainer {margin-top: 3rem;}