/* WHYZ Customer Intake Wizard — additive stylesheet, reuses styles.css's
   design tokens (--bg/--surface/--text/--violet/--good/--danger/--mono/
   --sans). No new colors, no new fonts. */

.wizard-body {
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

#wizard-app {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wizard-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wizard-brand h1 {
  font-size: 20px;
  margin: 0;
}

.wizard-back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.wizard-back-link:hover {
  color: var(--violet2);
}

#wizard-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface2);
  overflow: hidden;
}

#wizard-progress-fill {
  height: 100%;
  background: var(--violet);
  transition: width 0.2s ease;
}

#wizard-progress-label {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#wizard-templates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

#wizard-templates button {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

#wizard-templates button.wizard-danger {
  color: var(--danger);
  border-color: rgba(var(--danger-rgb), 0.4);
  margin-left: auto;
}

.wizard-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Real bug found via screenshot evidence (Morning Productization Closure
   Sprint, Phase 2): `.wizard-step { display: flex }` above has the same
   specificity as the browser's built-in `[hidden] { display: none }`
   rule, and an author stylesheet always wins a specificity tie against
   the user-agent stylesheet — so the `hidden` attribute silently stopped
   hiding anything, and all 12 steps rendered stacked at once. This rule
   restores the native behavior explicitly. */
.wizard-step[hidden] {
  display: none;
}

.wizard-step h2 {
  margin: 0;
  font-size: 16px;
}

.wizard-step label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.wizard-step-warning {
  color: var(--danger);
  font-size: 12px;
  font-family: var(--mono);
}

.wizard-hint {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.wizard-step input[type="text"],
.wizard-step input[type="date"],
.wizard-step textarea,
.wizard-step select {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
}

.wizard-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wizard-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px !important;
}

#wizard-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  background: linear-gradient(to top, var(--bg2) 60%, transparent);
}

#wizard-nav button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--violet);
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
}

#wizard-back {
  background: var(--surface2);
}

#wizard-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#wizard-summary pre,
.wizard-file-card pre {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-size: 11px;
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.wizard-ok {
  color: var(--good);
  font-weight: 600;
}

.wizard-error {
  color: var(--danger);
  font-weight: 600;
}

#wizard-generate {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--violet);
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
}

.wizard-file-card summary {
  cursor: pointer;
  font-size: 13px;
  padding: 6px 0;
  color: var(--violet2);
}

@media (max-width: 700px) {
  #wizard-app {
    padding: 20px 14px 72px;
  }
  .wizard-step {
    padding: 18px;
  }
}
