/* ── Anforderungsanalyse Wizard ── */

.hero-compact { margin-bottom: 12px; }
.hero-compact h1 { margin: 0 0 6px; }
.hero-compact p { font-size: 1rem; }
.footer-link { margin: 0; }

/* ── Progress Bar ── */
.wizard-progress { margin-bottom: 24px; }
.progress-steps { list-style: none; margin: 0; padding: 0; display: flex; }
.progress-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; z-index: 1; cursor: default; }
.progress-step.done { cursor: pointer; }
.progress-step:not(:last-child)::after {
  content: ''; position: absolute; top: 16px; left: calc(50% + 18px);
  width: calc(100% - 36px); height: 2px; background: var(--progress-fill-bg); z-index: 0;
  transition: background 0.3s;
}
.progress-step.done:not(:last-child)::after { background: var(--accent); }
.step-number {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 0.85rem;
  background: var(--border-soft); color: var(--muted); position: relative; z-index: 2;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.progress-step.active .step-number { background: var(--accent); color: #fff; transform: scale(1.12); box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb) / 0.3); }
.progress-step.done .step-number { background: var(--accent); color: #fff; }
.step-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-top: 6px; transition: color 0.3s; }
.progress-step.active .step-label,
.progress-step.done .step-label { color: var(--accent); }
.step-mobile-label { display: none; text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin: 8px 0 0; }

/* ── Wizard Steps ── */
.wizard-step { display: none; animation: fadeIn 0.3s ease; }
.wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.step-title { font-family: "Fraunces","DM Serif Display","Georgia",serif; font-size: 1.3rem; margin: 0 0 6px; }
.step-desc { font-size: 0.92rem; color: var(--muted); margin: 0 0 20px; line-height: 1.5; }

/* ── Section titles ── */
.section-title {
  font-family: "Fraunces","DM Serif Display","Georgia",serif; font-size: 1.1rem;
  margin: 20px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}

/* ── Form overrides ── */
label { font-size: 0.92rem; }
.value { white-space: nowrap; }
.select-wrap { margin-bottom: 16px; }
.select-wrap label { display: block; margin-bottom: 6px; }
select { cursor: pointer; margin-bottom: 0; font-size: 0.95rem; }

/* ── Option Groups (Visual Selectors) ── */
.option-group {
  margin-bottom: 20px; border: none; padding: 0;
}
.option-group legend {
  display: block; font-size: 0.92rem; font-weight: 600;
  margin-bottom: 10px; padding: 0; color: var(--ink);
}

.button-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.option-button {
  flex: 1; min-width: 140px; padding: 12px 14px;
  border: 2px solid var(--border-strong); border-radius: 12px;
  background: #fff; color: var(--ink); cursor: pointer;
  font-size: 0.9rem; font-weight: 500; font-family: inherit;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; white-space: normal; text-align: center;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.option-button:hover {
  background: #faf5ed; border-color: #d8cebd;
}

.option-button.active {
  border-color: var(--accent); background: var(--highlight-bg);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb) / 0.1);
  position: relative;
}

.option-button.active::after {
  content: '✓'; position: absolute; top: 4px; right: 6px;
  font-size: 1rem; color: var(--accent); font-weight: 700;
}

.option-button .icon {
  font-size: 1.4rem; line-height: 1.2;
}

.option-button .label {
  font-size: 0.85rem; line-height: 1.3;
}

/* ── Timeline variant (Bauperiode) ── */
.button-group.timeline {
  gap: 6px;
}

.button-group.timeline .option-button {
  flex: 1; min-width: 100px; padding: 10px 8px;
  font-size: 0.82rem;
}

/* ── Floors variant (compact) ── */
.button-group.floors {
  gap: 8px;
}

.button-group.floors .option-button {
  min-width: 70px; padding: 14px 12px; font-size: 1rem;
  font-weight: 700;
}

/* ── Roofs variant (with icons) ── */
.button-group.roofs {
  gap: 8px;
}

.button-group.roofs .option-button {
  min-width: 120px;
}

/* ── Heating systems variant ── */
.button-group.heating {
  gap: 8px;
}

.button-group.heating .option-button {
  flex: 1; min-width: 120px; padding: 10px 8px;
  font-size: 0.8rem;
}

/* ── Hot water variant ── */
.button-group.hotwater {
  gap: 8px;
}

.button-group.hotwater .option-button {
  flex: 1; min-width: 110px; padding: 10px 8px;
  font-size: 0.8rem;
}

/* ── Insulation variant ── */
.button-group.insulation {
  gap: 8px;
}

.button-group.insulation .option-button {
  flex: 1; min-width: 110px;
}

/* ── Windows variant (progression) ── */
.button-group.windows {
  gap: 8px;
}

.button-group.windows .option-button {
  flex: 1; min-width: 100px;
}

/* ── Suggestion Box ── */
.suggestion-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--highlight-bg); border: 1px solid rgba(var(--brand-primary-rgb) / 0.2);
  border-radius: 14px; padding: 16px 18px; margin-top: 20px;
  transition: box-shadow 0.3s;
}
.suggestion-box:hover { box-shadow: 0 4px 16px rgba(var(--brand-primary-rgb) / 0.1); }
.suggestion-icon { font-size: 1.4rem; flex-shrink: 0; }
.suggestion-text { font-size: 0.88rem; line-height: 1.5; }
.suggestion-text strong { color: var(--accent); }
.suggestion-detail { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--muted); }

/* ── Toggle Switch (Ja/Nein) ── */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row-label { font-weight: 600; font-size: 0.92rem; }

.toggle-switch {
  position: relative; width: 48px; height: 26px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 999px; background: #d8d0c6;
  cursor: pointer; transition: background 0.2s;
}
.toggle-track::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-track { background: var(--accent); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(22px); }

/* ── Conditional Fields ── */
.conditional-fields {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
  padding: 0 0 0 16px; border-left: 3px solid transparent;
}
.conditional-fields.open {
  max-height: 400px; opacity: 1; padding: 12px 0 12px 16px;
  border-left-color: var(--accent);
}

/* ── Checkbox Group ── */
.checkbox-group {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 18px;
}
.checkbox-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.checkbox-item:hover { background: #faf5ed; }
.checkbox-item.checked { border-color: var(--accent); background: var(--highlight-bg); }
.checkbox-item input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0;
}
.checkbox-item span { font-size: 0.88rem; font-weight: 500; }

/* ── Priority Selection ── */
.priority-list { display: grid; gap: 8px; margin-bottom: 18px; }
.priority-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.priority-item:hover { background: #faf5ed; }
.priority-item.selected { border-color: var(--accent); background: var(--highlight-bg); }
.priority-badge {
  width: 24px; height: 24px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 0.75rem;
  font-weight: 700; background: var(--border-soft); color: var(--muted); flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.priority-item.selected .priority-badge { background: var(--accent); color: #fff; }
.priority-item span:last-child { font-size: 0.9rem; font-weight: 500; }

/* ── Textarea ── */
.notes-textarea {
  box-sizing: border-box; width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: #fff; font-family: inherit;
  font-size: 0.9rem; color: var(--ink); resize: vertical; min-height: 80px;
  outline: none; transition: border-color 0.15s;
}
.notes-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb) / 0.12); }

/* ── Rating Badge ── */
.rating-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 14px; margin-bottom: 16px;
  font-weight: 700; font-size: 0.95rem;
  transition: background 0.3s, border-color 0.3s;
}
.rating-badge.good { background: #edf7ed; border: 1px solid #a3d9a5; color: #1b6e20; }
.rating-badge.ok { background: #fef8e7; border: 1px solid #f0d68a; color: #8a6d00; }
.rating-badge.poor { background: #fdecea; border: 1px solid #f5b7b1; color: #a52019; }
.rating-icon { font-size: 1.3rem; }

/* ── Score Bar ── */
.score-bar-wrap { margin-bottom: 20px; }
.score-bar-label {
  display: flex; justify-content: space-between; font-size: 0.82rem;
  font-weight: 600; color: var(--muted); margin-bottom: 6px;
}
.score-bar {
  height: 12px; border-radius: 999px; background: var(--border-soft); overflow: hidden;
}
.score-bar-fill {
  height: 100%; border-radius: 999px; transition: width 0.6s ease, background 0.3s;
}
.score-bar-fill.good { background: var(--accent); }
.score-bar-fill.ok { background: var(--accent-2); }
.score-bar-fill.poor { background: #d94f4f; }

/* ── KPI ── */
.hero-kpi { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.kpi-value { font-family: "Fraunces","DM Serif Display","Georgia",serif; font-size: clamp(22px,3vw,32px); color: var(--accent); font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ── Recommendation Cards ── */
.recommendations { display: grid; gap: 12px; margin-bottom: 20px; }
.recommendation-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; transition: box-shadow 0.2s;
}
.recommendation-card:hover { box-shadow: 0 4px 16px var(--shadow); }
.rec-priority {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
  font-size: 0.85rem; background: var(--accent); color: #fff; flex-shrink: 0;
}
.rec-content { flex: 1; min-width: 0; }
.rec-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.rec-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.rec-calc-btn {
  display: inline-flex; align-items: center; flex-shrink: 0; align-self: center;
  padding: 9px 18px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 0.82rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.rec-calc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb) / 0.3);
}

/* ── Summary Panel ── */
.summary-panel { margin-bottom: 20px; }
.summary-title {
  font-family: "Fraunces","DM Serif Display","Georgia",serif;
  font-size: 1.1rem; margin: 0 0 14px;
}
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-item {
  background: rgba(255,255,255,0.6); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px;
}
.summary-label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.summary-value { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink); }

/* ── Wizard Nav ── */
.wizard-nav { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 28px; }
.wizard-btn { padding: 12px 28px; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.wizard-btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-back { border: 1px solid var(--border-strong); background: #fff; color: var(--ink); }
.btn-back:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-next { margin-left: auto; border: none; background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb) / 0.25); }
.btn-next:hover { box-shadow: 0 8px 18px rgba(var(--brand-primary-rgb) / 0.35); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero-kpi { grid-template-columns: repeat(2,1fr); }
  .checkbox-group { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }
  .step-mobile-label { display: block; }

  .button-group {
    gap: 6px;
  }

  .option-button {
    min-width: 100px; padding: 10px 8px; font-size: 0.82rem;
  }

  .button-group.timeline .option-button {
    min-width: 80px; padding: 8px 6px; font-size: 0.75rem;
  }

  .button-group.floors .option-button {
    min-width: 60px; padding: 12px 10px; font-size: 0.9rem;
  }

  .button-group.roofs .option-button {
    min-width: 90px; padding: 10px 8px;
  }

  .option-button .icon {
    font-size: 1.1rem;
  }

  .option-button .label {
    font-size: 0.75rem;
  }
}
@media (max-width: 480px) {
  .hero-kpi { grid-template-columns: 1fr; }

  .option-button {
    min-width: 85px; padding: 10px 6px; font-size: 0.75rem;
  }

  .button-group.timeline .option-button {
    min-width: 70px; padding: 8px 4px; font-size: 0.7rem;
  }

  .button-group.floors .option-button {
    min-width: 50px; padding: 12px 8px; font-size: 0.85rem;
  }

  .option-button .icon {
    font-size: 1rem;
  }

  .option-button .label {
    font-size: 0.7rem;
  }
}
/* ── Dark-Mode-Overrides ── */
[data-theme="dark"] .option-button { background: var(--surface); }
[data-theme="dark"] .option-button:hover { background: var(--surface-hover); border-color: var(--border-strong); }
[data-theme="dark"] .checkbox-item { background: var(--surface); }
[data-theme="dark"] .checkbox-item:hover { background: var(--surface-hover); }
[data-theme="dark"] .priority-item { background: var(--surface); }
[data-theme="dark"] .priority-item:hover { background: var(--surface-hover); }
[data-theme="dark"] .toggle-track { background: var(--toggle-track-fill); }
[data-theme="dark"] .toggle-track::after { background: var(--toggle-thumb); }
[data-theme="dark"] .notes-textarea { background: var(--surface); }
[data-theme="dark"] .recommendation-card { background: var(--surface); }
[data-theme="dark"] .summary-item { background: var(--surface-translucent); }
[data-theme="dark"] .btn-back { background: var(--surface); }
[data-theme="dark"] .score-bar-fill.poor { background: #e26f6f; }

[data-theme="dark"] .rating-badge.good { background: rgba(var(--brand-primary-rgb) / 0.10); border-color: rgba(var(--brand-primary-rgb) / 0.35); color: var(--accent); }
[data-theme="dark"] .rating-badge.ok { background: rgba(var(--brand-secondary-rgb) / 0.10); border-color: rgba(var(--brand-secondary-rgb) / 0.35); color: var(--variant-ink); }
[data-theme="dark"] .rating-badge.poor { background: rgba(217,79,79,0.10); border-color: rgba(217,79,79,0.35); color: #f08a8a; }
