/* ═══════════════════════════════════════════════════════════════
   ConveyorMatch Wizard — styles
   Matches ACSI design tokens (variables.css)
   ═══════════════════════════════════════════════════════════════ */

/* ── Cookie Consent Overlay ─────────────────────────────────────── */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s var(--ease);
}
.cookie-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.cookie-panel {
  max-width: 520px;
  width: 100%;
  background: linear-gradient(180deg, var(--steel-800) 0%, var(--steel-700) 100%);
  border: 1px solid var(--steel-600);
  border-radius: 6px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  position: relative;
}
.cookie-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--amber);
  border-radius: 6px 6px 0 0;
}
.cookie-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.cookie-panel h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.cookie-panel p {
  color: var(--steel-200);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.cookie-note {
  font-size: 0.82rem !important;
  color: var(--steel-300) !important;
  font-style: italic;
}
.cookie-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 12px;
}
.cookie-decline {
  margin-top: 4px;
}
.cookie-decline-btn {
  background: none;
  border: none;
  color: var(--steel-400);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
  padding: 4px 8px;
}
.cookie-decline-btn:hover {
  color: var(--steel-200);
}

/* ── Wizard Section Layout ──────────────────────────────────────── */
.wizard-section {
  padding: 40px 0 80px;
  min-height: 60vh;
  position: relative;
}

/* ── Progress Bar ───────────────────────────────────────────────── */
.wizard-progress {
  max-width: 880px;
  margin: 0 auto 40px;
}
.wizard-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--steel-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.progress-step-text strong {
  color: var(--amber);
  font-weight: 700;
}
.progress-pct {
  color: var(--amber);
  font-weight: 700;
}
.wizard-progress-track {
  height: 6px;
  background: var(--steel-700);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--steel-600);
}
.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-dim) 0%, var(--amber) 100%);
  border-radius: 3px;
  transition: width 0.4s var(--ease);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.4);
}

/* ── Wizard Stage (where steps render) ──────────────────────────── */
.wizard-stage {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  min-height: 400px;
}

.wizard-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--steel-300);
}
.wizard-loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  border: 3px solid var(--steel-600);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Step Panels (each wizard step is a panel) ─────────────────── */
.step-panel {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  position: absolute;
  inset: 0 0 auto 0;
  pointer-events: none;
}
.step-panel.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}
.step-panel.exit-left {
  opacity: 0;
  transform: translateX(-30px);
}
.step-panel.exit-right {
  opacity: 0;
  transform: translateX(30px);
}

/* ── Step Header ────────────────────────────────────────────────── */
.step-header {
  margin-bottom: 32px;
  text-align: center;
}
.step-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.step-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.step-title em {
  color: var(--amber);
  font-style: normal;
}
.step-subtitle {
  color: var(--steel-200);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}
.step-help-trigger {
  margin-top: 14px;
}
.step-help-trigger button {
  background: none;
  border: 1px solid var(--steel-600);
  color: var(--steel-200);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.step-help-trigger button:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245, 166, 35, 0.05);
}

/* ── Option Cards Grid ──────────────────────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.option-card {
  position: relative;
  background: var(--steel-800);
  border: 2px solid var(--steel-600);
  border-radius: 6px;
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-body);
}
.option-card:hover {
  border-color: var(--amber-dim);
  background: var(--steel-700);
  transform: translateY(-2px);
}
.option-card.selected {
  border-color: var(--amber);
  background: linear-gradient(180deg, var(--steel-700) 0%, var(--steel-800) 100%);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.15), 0 0 0 1px var(--amber) inset;
}
.option-card.selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--amber);
  font-weight: 800;
  font-size: 1.1rem;
}
.option-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.option-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  letter-spacing: -0.005em;
}
.option-card.selected .option-label {
  color: var(--amber);
}
.option-description {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--steel-300);
}

/* ── Wizard Navigation Buttons ──────────────────────────────────── */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  gap: 20px;
}
.wizard-nav .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.wizard-nav-meta {
  flex: 1;
  text-align: center;
}
.wizard-saved {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  transition: opacity 0.3s var(--ease);
}
.wizard-saved.show {
  opacity: 1 !important;
}

/* ── Help Panel (slide-in drawer) ───────────────────────────────── */
.help-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100vh;
  background: var(--steel-800);
  border-left: 1px solid var(--steel-600);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  display: flex;
  flex-direction: column;
}
.help-panel.open {
  transform: translateX(0);
}
.help-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--steel-600);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--steel-900);
}
.help-panel-header h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  margin: 0;
}
.help-close {
  background: none;
  border: 1px solid var(--steel-600);
  color: var(--steel-200);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.help-close:hover {
  background: var(--steel-700);
  border-color: var(--amber);
  color: var(--amber);
}
.help-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  color: var(--steel-200);
  line-height: 1.7;
  font-size: 0.92rem;
}
.help-panel-body h4 {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 24px 0 10px;
}
.help-panel-body h4:first-child {
  margin-top: 0;
}
.help-panel-body p {
  margin-bottom: 14px;
}
.help-panel-body a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--amber-dim);
  text-underline-offset: 3px;
}
.help-panel-body a:hover {
  color: var(--amber-glow);
}
.help-link-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.help-link-list li {
  padding: 6px 0;
  border-top: 1px solid var(--steel-700);
}
.help-link-list li:first-child {
  border-top: none;
}
.help-link-list a {
  display: block;
  font-size: 0.86rem;
}

/* ── Results Page ───────────────────────────────────────────────── */
.results-header {
  text-align: center;
  margin-bottom: 40px;
}
.results-celebration {
  font-size: 3rem;
  margin-bottom: 8px;
}
.results-summary {
  background: var(--steel-800);
  border: 1px solid var(--steel-600);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 32px;
}
.results-summary-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.results-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.results-summary-item {
  font-size: 0.84rem;
}
.results-summary-label {
  color: var(--steel-400);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.results-summary-value {
  color: var(--white);
  font-weight: 600;
}

.recommendation-card {
  background: linear-gradient(180deg, var(--steel-700) 0%, var(--steel-800) 100%);
  border: 1px solid var(--steel-600);
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s var(--ease);
}
.recommendation-card:hover {
  border-color: var(--amber-dim);
  border-left-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.recommendation-card.primary {
  border-left-width: 6px;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.04) 0%, var(--steel-800) 100%);
}
.recommendation-rank {
  position: absolute;
  top: -10px;
  right: 24px;
  background: var(--amber);
  color: var(--steel-900);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 12px;
}
.recommendation-card.primary .recommendation-rank {
  background: var(--amber-glow);
}
.recommendation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 700px) {
  .recommendation-grid {
    grid-template-columns: 220px 1fr;
  }
}
.recommendation-image {
  background: var(--steel-700);
  border: 1px solid var(--steel-600);
  border-radius: 4px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.recommendation-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.recommendation-image-fallback {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  color: var(--amber);
  letter-spacing: 0.05em;
}
.recommendation-meta .model-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}
.recommendation-meta h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.recommendation-meta .full-name {
  color: var(--steel-200);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.recommendation-meta .tagline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber-glow);
  background: rgba(245, 166, 35, 0.06);
  border-left: 2px solid var(--amber);
  padding: 8px 12px;
  margin-bottom: 14px;
  border-radius: 0 4px 4px 0;
}
.recommendation-meta .why-fit {
  font-size: 0.88rem;
  color: var(--steel-200);
  line-height: 1.65;
  margin-bottom: 16px;
}
.recommendation-meta .why-fit-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}
.recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.recommendation-actions .btn {
  font-size: 0.84rem;
  padding: 8px 18px;
}

/* ── Score badge (subtle) ──────────────────────────────────────── */
.recommendation-score {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-400);
  margin-left: 12px;
}

/* ── Results action bar ─────────────────────────────────────────── */
.results-actions {
  margin: 40px 0 0;
  padding: 28px;
  background: var(--steel-800);
  border: 1px solid var(--steel-600);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.results-actions-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-300);
  margin-right: 8px;
}

/* ── Email modal ───────────────────────────────────────────────── */
.email-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 18, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.email-modal-backdrop.open {
  display: flex;
}
.email-modal {
  max-width: 440px;
  width: 100%;
  background: var(--steel-800);
  border: 1px solid var(--steel-600);
  border-radius: 6px;
  padding: 28px;
  text-align: center;
}
.email-modal h3 {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.email-modal p {
  color: var(--steel-200);
  margin-bottom: 18px;
  font-size: 0.9rem;
}
.email-modal input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--steel-900);
  border: 1px solid var(--steel-600);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.email-modal input[type="email"]:focus {
  outline: none;
  border-color: var(--amber);
}
.email-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.email-modal-message {
  font-size: 0.86rem;
  margin-top: 12px;
  min-height: 1.2em;
}
.email-modal-message.success { color: var(--amber); }
.email-modal-message.error { color: #ef5350; }

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .step-title {
    font-size: 1.7rem;
  }
  .step-subtitle {
    font-size: 0.9rem;
  }
  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .option-card {
    padding: 18px;
  }
  .wizard-nav {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .wizard-nav .btn {
    width: 100%;
  }
  .cookie-panel {
    padding: 28px 22px 22px;
  }
  .cookie-panel h2 {
    font-size: 1.3rem;
  }
  .cookie-actions {
    flex-direction: column;
  }
  .cookie-actions .btn {
    width: 100%;
  }
  .results-actions {
    flex-direction: column;
  }
  .results-actions .btn {
    width: 100%;
  }
}

/* ── Accessibility focus ────────────────────────────────────────── */
.option-card:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
