/* ============================================================
   Solution Wizard — 7-step guided material recommendation tool.
   Dark "Quiet Foundry" theme: navy surfaces, white text, one gold
   accent for the active/selected state. Shared between the homepage
   embed and the dedicated /solution-wizard/ page.
   ============================================================ */

.wizard { background: var(--navy-900); padding-block: var(--space-9); color: var(--white); }
.wizard-page-wrap .wizard { padding-top: calc(var(--header-h, 116px) + var(--space-7)); }

.wizard-head { max-width: 640px; margin: 0 auto var(--space-8); text-align: center; }
.wizard-eyebrow {
  font-size: var(--text-eyebrow); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: var(--space-3);
}
.wizard-title { font-family: var(--font-heading); font-size: 34px; margin-bottom: var(--space-4); }
.wizard-sub { color: rgba(255,255,255,0.65); font-size: 16px; line-height: 1.6; }

/* ---------- Progress bar ---------- */
.wizard-progress {
  display: flex; justify-content: space-between; align-items: flex-start;
  max-width: 820px; margin: 0 auto var(--space-7); position: relative;
}
.wizard-progress::before {
  content: ""; position: absolute; top: 17px; left: 5%; right: 5%; height: 2px;
  background: var(--border-dark); z-index: 0;
}
.wizard-progress-step {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  gap: 8px; flex: 1;
}
.wizard-progress-dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy-700);
  border: 2px solid var(--border-dark); color: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; transition: all var(--duration-base) var(--ease-out-quart);
}
.wizard-progress-label {
  font-size: 11px; color: rgba(255,255,255,0.4); text-align: center;
  display: none;
}
.wizard-progress-step.is-active .wizard-progress-dot {
  background: var(--gold); border-color: var(--gold); color: var(--navy-900);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.wizard-progress-step.is-active .wizard-progress-label { color: var(--gold); font-weight: 600; }
.wizard-progress-step.is-done .wizard-progress-dot { background: var(--navy-700); border-color: var(--gold-dark); color: var(--gold-dark); }
@media (min-width: 720px) {
  .wizard-progress-label { display: block; }
}

/* ---------- Panel + steps ---------- */
.wizard-panel {
  max-width: 820px; margin: 0 auto; background: var(--navy-700);
  border: 1px solid var(--border-dark); border-radius: var(--radius-md);
  padding: var(--space-7);
}
.wizard-step { display: none; animation: wizardFadeIn 0.35s var(--ease-out-quart); }
.wizard-step.is-active { display: block; }
@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.wizard-step-title { font-family: var(--font-heading); font-size: 22px; margin-bottom: var(--space-6); text-align: center; }
.wizard-step-optional { color: rgba(255,255,255,0.45); font-family: var(--font-body); font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; }

.wizard-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-4); }
.wizard-options-icon { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.wizard-option {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: var(--space-5) var(--space-3); border-radius: var(--radius-sm);
  background: var(--navy-900); border: 1.5px solid var(--border-dark); color: var(--white);
  cursor: pointer; text-align: center; font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  transition: border-color var(--duration-base), transform var(--duration-fast), background var(--duration-base);
}
.wizard-option:hover { border-color: rgba(227,167,18,0.5); transform: translateY(-2px); }
.wizard-option.is-selected { border-color: var(--gold); background: rgba(227,167,18,0.1); color: var(--gold); }
.wizard-option-icon { width: 30px; height: 30px; color: var(--gold-dark); }
.wizard-option.is-selected .wizard-option-icon { color: var(--gold); }
.wizard-option-icon svg { width: 100%; height: 100%; }

.wizard-option-chip {
  flex-direction: row; padding: 12px 18px; border-radius: 999px; font-size: 14px;
}

.wizard-nav { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-7); }
.wizard-nav .btn { min-width: 120px; text-align: center; }
.wizard-nav .btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ---------- Results ---------- */
.wizard-results { max-width: 1100px; margin: 0 auto; }
.wizard-results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); flex-wrap: wrap; gap: var(--space-3); }
.wizard-results-head h3 { font-family: var(--font-heading); font-size: 26px; }
.wizard-restart { background: none; border: 1px solid rgba(255,255,255,0.3); color: var(--white); border-radius: 999px; padding: 8px 18px; font-size: 13.5px; cursor: pointer; transition: border-color var(--duration-base); }
.wizard-restart:hover { border-color: var(--gold); color: var(--gold); }

.wizard-loading { display: flex; align-items: center; gap: var(--space-3); color: rgba(255,255,255,0.6); font-size: 14.5px; padding: var(--space-6) 0; }
.wizard-spinner {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--gold);
  animation: wizardSpin 0.7s linear infinite;
}
@keyframes wizardSpin { to { transform: rotate(360deg); } }

.wizard-empty { color: rgba(255,255,255,0.6); font-size: 15px; }
.wizard-empty a { color: var(--gold); }

.wizard-results-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
@media (min-width: 720px) {
  .wizard-results-grid { grid-template-columns: repeat(2, 1fr); }
}

.wizard-card {
  background: var(--navy-700); border: 1px solid var(--border-dark); border-radius: var(--radius-md);
  overflow: hidden; animation: wizardFadeIn 0.4s var(--ease-out-quart);
}
.wizard-card-media { position: relative; aspect-ratio: 16/10; background: var(--navy-900); }
.wizard-card-media img { width: 100%; height: 100%; object-fit: cover; }
.wizard-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(255,255,255,0.35); font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.04em; }
.wizard-badge {
  position: absolute; top: 12px; right: 12px; padding: 5px 13px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.wizard-badge-strong-match { background: var(--gold); color: var(--navy-900); }
.wizard-badge-good-match { background: rgba(56,189,248,0.9); color: var(--navy-900); }
.wizard-badge-possible-match { background: rgba(255,255,255,0.85); color: var(--navy-900); }

.wizard-card-body { padding: var(--space-6); }
.wizard-card-cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold-dark); margin-bottom: 6px; }
.wizard-card-body h4 { font-size: 20px; margin-bottom: var(--space-4); }
.wizard-card-body h4 a { color: var(--white); text-decoration: none; }
.wizard-card-body h4 a:hover { color: var(--gold); }

.wizard-reasons { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.wizard-reasons li {
  font-size: 13.5px; color: rgba(255,255,255,0.75); line-height: 1.6; padding-left: 20px; position: relative; margin-bottom: 6px;
}
.wizard-reasons li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(227,167,18,0.5);
}

.wizard-specs { margin-bottom: var(--space-4); border-top: 1px solid var(--border-dark); padding-top: var(--space-3); }
.wizard-spec-row { display: flex; justify-content: space-between; gap: var(--space-3); padding: 5px 0; font-size: 13px; }
.wizard-spec-row span { color: rgba(255,255,255,0.5); }
.wizard-spec-row strong { color: var(--white); text-align: right; }

.wizard-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-4); }
.wizard-chip { font-size: 11.5px; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--border-dark); color: rgba(255,255,255,0.7); }

.wizard-related { margin-bottom: var(--space-5); }
.wizard-related-group { margin-bottom: var(--space-3); }
.wizard-related-group span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,0.4); margin-bottom: 5px; }
.wizard-related-group a { display: inline-block; font-size: 13px; color: var(--gold); text-decoration: none; margin-right: var(--space-4); }
.wizard-related-group a:hover { text-decoration: underline; }

.wizard-card-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.wizard-card-btn { font-size: 13.5px; padding: 10px 16px; }

@media (max-width: 640px) {
  .wizard-panel { padding: var(--space-5); }
  .wizard-nav .btn { min-width: 0; flex: 1; }
}

/* ---------- "Not sure this is right?" CTA on single product pages ---------- */
.pd-wizard-cta {
  margin-top: var(--space-7); padding: var(--space-6); text-align: center;
  background: var(--navy-700); border: 1px dashed rgba(227,167,18,0.35); border-radius: var(--radius-md);
}
.pd-wizard-cta p { color: rgba(255,255,255,0.7); font-size: 15px; margin-bottom: var(--space-4); }
.pd-wizard-cta .btn { display: inline-flex; }
