/* ============================================================
   hw-configurator.css — v6
   Design: 1:1 handwertig.com/de/index.html
   Font: system-ui | Buttons: .btn-primary | Keine Preise | Cards
   ============================================================ */

/* ── Basis ─────────────────────────────────────────────────── */
.hw-configurator-wrapper {
  max-width: 860px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #101112;
}
.hw-configurator {
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: hidden;
}

/* ── Progress ─────────────────────────────────────────────── */
.hw-cfg-progress { height: 4px; background: #e8e8e8; }
.hw-cfg-progress-bar {
  height: 100%;
  background: #e22278;
  transition: width .35s ease;
}

/* ── Price Bar — komplett ausgeblendet ────────────────────── */
.hw-cfg-price-bar,
.hw-cfg-price-hidden { display: none !important; }

/* ── Header ───────────────────────────────────────────────── */
.hw-cfg-header {
  padding: 28px 32px 16px;
  border-bottom: 1px solid #ebebeb;
}
.hw-cfg-step-label {
  font-size: .7rem;
  color: #e22278;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 8px;
}
.hw-cfg-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #101112;
  margin: 0 0 6px;
  line-height: 1.25;
}
.hw-cfg-subtitle {
  font-size: .9rem;
  color: #666;
  margin: 0;
  font-weight: 400;
}

/* ── Body ─────────────────────────────────────────────────── */
.hw-cfg-body {
  padding: 28px 32px;
  min-height: 200px;
}

/* ── Hilfstexte / Section-Titel ───────────────────────────── */
.hw-cfg-helptext { font-size: .85rem; color: #888; margin-top: 12px; }
.hw-cfg-optional { font-size: .75rem; color: #aaa; font-weight: 400; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.hw-cfg-section-title {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e22278;
}

/* ══ SCHRITT 1 — OBJEKTTYP ═══════════════════════════════════ */
.hw-cfg-objekttyp {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.hw-cfg-obj-card {
  border: 1px solid #d8d8d8;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
}
.hw-cfg-obj-card:hover { border-color: #e22278; }
.hw-cfg-obj-card-head {
  background: #f4f4f4;
  padding: 16px 14px 14px;
  border-bottom: 1px solid #d8d8d8;
  text-align: center;
}
.hw-cfg-obj-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-cfg-obj-card-icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #101112;
  stroke-width: 1.5;
}
.hw-cfg-obj-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hw-cfg-obj-card-options {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.hw-cfg-obj-option {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #e8e8e8;
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  color: #444;
  font-family: inherit;
  text-align: left;
  transition: background .12s, color .12s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hw-cfg-obj-option:first-child { border-top: none; }
.hw-cfg-obj-option:hover { background: #fef2f7; color: #e22278; }
.hw-cfg-obj-option.selected { background: #e22278; color: #fff; font-weight: 700; }
.hw-cfg-obj-option-marker {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-cfg-obj-option.selected .hw-cfg-obj-option-marker::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  display: block;
}

/* ══ SCHRITT 2 — GEWERKE ═════════════════════════════════════ */
.hw-cfg-gewerke-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.hw-cfg-gewerk-card {
  border: 1px solid #d8d8d8;
  background: #fff;
  padding: 18px 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  position: relative;
  transition: border-color .12s, background .12s;
  box-shadow: none;
  border-radius: 0;
}
.hw-cfg-gewerk-card:hover { border-color: #e22278; }
.hw-cfg-gewerk-card.selected {
  border-color: #e22278;
  background: #fef2f7;
}
.hw-cfg-gewerk-svg {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: none;
}
.hw-cfg-gewerk-card.selected .hw-cfg-gewerk-svg {
  filter: none;
}
.hw-cfg-gewerk-label {
  font-size: .78rem;
  font-weight: 600;
  color: #101112;
  line-height: 1.3;
}
.hw-cfg-gewerk-card.selected .hw-cfg-gewerk-label { color: #e22278; }
.hw-cfg-gewerk-check {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: .75rem;
  font-weight: 800;
  color: #e22278;
  line-height: 1;
}

/* Zustand */
.hw-cfg-zustand-block { margin-top: 22px; }
.hw-cfg-zustand-title {
  font-size: .7rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.hw-cfg-zustand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #ebebeb;
  gap: 12px;
  flex-wrap: wrap;
}
.hw-cfg-zustand-row:last-of-type { border-bottom: none; }
.hw-cfg-zustand-label { font-size: .9rem; font-weight: 600; color: #101112; flex: 1; min-width: 120px; }
.hw-cfg-zustand-opts { display: flex; gap: 6px; }
.hw-cfg-zustand-btn {
  padding: 5px 16px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: .8rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  border-radius: 0;
  transition: border-color .1s, background .1s, color .1s;
  letter-spacing: .03em;
}
.hw-cfg-zustand-btn:hover { border-color: #e22278; color: #e22278; }
.hw-cfg-zustand-btn.active { border-color: #e22278; background: #e22278; color: #fff; }

/* m² */
.hw-cfg-sqm-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid #ebebeb; }
.hw-cfg-sqm-label { display: block; font-size: .75rem; font-weight: 700; color: #101112; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.hw-cfg-sqm-input-wrap { display: flex; align-items: center; gap: 10px; }
.hw-cfg-sqm-input {
  width: 150px;
  padding: 9px 14px;
  border: 1px solid #d0d0d0;
  font-size: 1rem;
  font-weight: 600;
  color: #101112;
  font-family: inherit;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}
.hw-cfg-sqm-input:focus { outline: none; border-color: #e22278; }
.hw-cfg-sqm-unit { font-size: .95rem; font-weight: 600; color: #444; }

/* ══ SCHRITT 3 — PROJEKTPROFIL ═══════════════════════════════ */
.hw-cfg-projektprofil { display: flex; flex-direction: column; gap: 24px; }
.hw-cfg-profil-group {}
.hw-cfg-profil-group-title {
  font-size: .7rem;
  font-weight: 700;
  color: #e22278;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.hw-cfg-profil-options { display: flex; gap: 12px; flex-wrap: wrap; }
.hw-cfg-profil-card {
  flex: 1;
  min-width: 200px;
  border: 1px solid #d8d8d8;
  background: #fff;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: border-color .12s, background .12s;
  position: relative;
  border-radius: 0;
}
.hw-cfg-profil-card:hover { border-color: #e22278; }
.hw-cfg-profil-card.selected {
  border-color: #e22278;
  background: #fef2f7;
}
.hw-cfg-profil-card-label {
  font-size: .95rem;
  font-weight: 700;
  color: #101112;
  line-height: 1.3;
}
.hw-cfg-profil-card-desc {
  font-size: .82rem;
  color: #777;
  line-height: 1.5;
  font-weight: 400;
}
.hw-cfg-profil-card-check {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #e22278;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.hw-cfg-profil-card.selected .hw-cfg-profil-card-check { display: flex; }
.hw-cfg-profil-card-check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #e22278;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

/* ══ SCHRITT 4 — PROJEKTDATEN ════════════════════════════════ */
.hw-cfg-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.hw-cfg-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.hw-cfg-label {
  font-size: .72rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hw-cfg-input, .hw-cfg-textarea {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #d0d0d0;
  font-size: .9rem;
  color: #101112;
  background: #fff;
  transition: border-color .12s;
  box-sizing: border-box;
  font-family: inherit;
  border-radius: 0;
  box-shadow: none;
}
.hw-cfg-input:focus, .hw-cfg-textarea:focus { outline: none; border-color: #e22278; }
.hw-cfg-input.error, .hw-cfg-textarea.error { border-color: #dc3545; }
.hw-cfg-textarea { resize: vertical; min-height: 90px; }
.hw-cfg-error-msg { font-size: .78rem; color: #dc3545; margin-top: 3px; }
.col-sm-3 { max-width: 110px; }
.col-sm-4 { max-width: 140px; }

/* Upload */
.hw-cfg-upload-zone {
  border: 1.5px dashed #c8c8c8;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  margin-bottom: 10px;
  transition: border-color .12s, background .12s;
}
.hw-cfg-upload-zone:hover,
.hw-cfg-upload-zone.drag-over { border-color: #e22278; background: #fef2f7; }
.hw-cfg-upload-zone input[type="file"] { display: none; }
.hw-cfg-upload-text { font-size: .88rem; color: #555; margin-bottom: 4px; }
.hw-cfg-upload-hint { font-size: .78rem; color: #aaa; }
.hw-cfg-file-list { display: flex; flex-direction: column; gap: 5px; }
.hw-cfg-file-item {
  display: flex; align-items: center; gap: 8px;
  background: #f2f2f2; padding: 7px 12px; font-size: .83rem; color: #444;
}
.hw-cfg-file-remove { margin-left: auto; background: none; border: none; cursor: pointer; color: #aaa; font-size: 1rem; line-height: 1; }
.hw-cfg-file-remove:hover { color: #dc3545; }

/* Checkbox */
.hw-cfg-checkbox-wrap { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.hw-cfg-checkbox-wrap input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: #e22278;
  margin-top: 3px; flex-shrink: 0; cursor: pointer;
}
.hw-cfg-checkbox-label { font-size: .83rem; color: #444; line-height: 1.55; cursor: pointer; }
.hw-cfg-checkbox-label a { color: #e22278; text-decoration: underline; }

/* ══ SCHRITT 5 — BUCHUNGSWAHL ════════════════════════════════ */
.hw-cfg-booking-title {
  font-size: .7rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.hw-cfg-booking-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 26px;
}
.hw-cfg-booking-card {
  border: 1px solid #d8d8d8;
  background: #fff;
  padding: 22px 20px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: border-color .12s, background .12s;
  border-radius: 0;
  box-shadow: none;
}
.hw-cfg-booking-card:hover { border-color: #e22278; }
.hw-cfg-booking-card.selected {
  border-color: #e22278;
  background: #fef2f7;
}
.hw-booking-recommended { border-color: #101112; border-width: 2px; }
.hw-booking-recommended.selected { border-color: #e22278; }
.hw-cfg-booking-badge-recommended {
  position: absolute;
  top: -1px; right: 16px;
  background: #e22278;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.hw-cfg-booking-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #101112;
  margin-bottom: 6px;
  line-height: 1.3;
}
.hw-cfg-booking-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #e22278;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.hw-cfg-booking-card-desc {
  font-size: .85rem;
  color: #555;
  line-height: 1.6;
}
.hw-cfg-booking-badge {
  display: inline-block;
  background: #f0fdf4;
  color: #166534;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  margin-top: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 0;
}

/* Zusammenfassung */
.hw-cfg-summary {
  background: #f6f6f6;
  border-left: 3px solid #e22278;
  padding: 14px 18px;
  margin-bottom: 22px;
}
.hw-cfg-summary-title {
  font-size: .7rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.hw-cfg-summary-row { display: flex; justify-content: space-between; font-size: .85rem; padding: 4px 0; border-bottom: 1px solid #e8e8e8; }
.hw-cfg-summary-row:last-child { border-bottom: none; }
.hw-cfg-summary-key { color: #777; }
.hw-cfg-summary-val { font-weight: 700; color: #101112; text-align: right; max-width: 55%; }

/* ── Navigation / Buttons ─────────────────────────────────── */
/* 1:1 wie .btn-primary und .btn auf handwertig.com */
.hw-cfg-footer {
  padding: 16px 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ebebeb;
  gap: 12px;
}
.hw-cfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 1.4rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .2rem;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease-in-out;
  border-radius: 0;
  box-shadow: none;
  white-space: nowrap;
}

/* Zurück: outline-Stil */
.hw-cfg-btn-back {
  background: transparent;
  color: #555;
  border: 1px solid #c0c0c0;
}
.hw-cfg-btn-back:hover {
  border-color: #101112;
  color: #101112;
  background: transparent;
}

/* Weiter / Absenden: exakt wie .btn-primary */
.hw-cfg-btn-next,
.hw-cfg-btn-submit {
  background-color: #e22278;
  border: 0;
  color: #fff;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.hw-cfg-btn-next::before,
.hw-cfg-btn-submit::before {
  content: '';
  left: 0; top: 0; bottom: auto;
  position: absolute;
  width: 100%; height: 0%;
  background-color: #fff;
  z-index: -1;
  transition: all 0.3s;
}
.hw-cfg-btn-next:hover,
.hw-cfg-btn-submit:hover {
  color: #e22278;
  background-color: #fff;
  border: 1px solid #e22278;
}
.hw-cfg-btn-next:hover::before,
.hw-cfg-btn-submit:hover::before {
  height: 100%;
  top: auto;
  bottom: 0;
}
.hw-cfg-btn-next:disabled,
.hw-cfg-btn-submit:disabled {
  background-color: #e22278;
  opacity: .3;
  cursor: not-allowed;
}
.hw-cfg-btn-submit { flex: 1; }

/* Step-Dots */
.hw-cfg-step-dots { display: flex; gap: 5px; align-items: center; }
.hw-cfg-dot { width: 6px; height: 6px; background: #d0d0d0; transition: all .2s; border-radius: 0; }
.hw-cfg-dot.active { background: #e22278; width: 16px; }
.hw-cfg-dot.done { background: #e22278; }

/* ── Erfolg ───────────────────────────────────────────────── */
.hw-cfg-success { text-align: center; padding: 52px 32px; }
.hw-cfg-success-check {
  width: 60px; height: 60px;
  border: 2px solid #e22278;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.hw-cfg-success-check::after {
  content: '';
  width: 14px; height: 24px;
  border: 3px solid #e22278;
  border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-4px);
  display: block;
}
.hw-cfg-success-title { font-size: 1.35rem; font-weight: 700; color: #101112; margin-bottom: 12px; }
.hw-cfg-success-text { font-size: .92rem; color: #555; line-height: 1.6; max-width: 480px; margin: 0 auto; }

/* ── Loader ───────────────────────────────────────────────── */
.hw-cfg-spinner { width: 28px; height: 28px; border: 3px solid #ebebeb; border-top-color: #e22278; border-radius: 50%; animation: hw-spin .7s linear infinite; margin: 48px auto; }
@keyframes hw-spin { to { transform: rotate(360deg); } }

/* ── Gewerke-Detail-Fragen ────────────────────────────────── */
.hw-cfg-detail-group {
  padding: 14px 0;
  border-bottom: 1px solid #ebebeb;
}
.hw-cfg-detail-group:last-child { border-bottom: none; }
.hw-cfg-detail-group-title {
  font-size: .8rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.hw-cfg-detail-frage {
  font-size: .88rem;
  color: #555;
  margin-bottom: 10px;
  font-weight: 400;
}
.hw-cfg-detail-optionen {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.hw-cfg-detail-opt {
  padding: 7px 16px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: .82rem;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  font-family: inherit;
  border-radius: 0;
  transition: border-color .1s, background .1s, color .1s;
  white-space: nowrap;
}
.hw-cfg-detail-opt:hover { border-color: #e22278; color: #e22278; }
.hw-cfg-detail-opt.active { border-color: #e22278; background: #e22278; color: #fff; font-weight: 600; }

/* Textfelder (Fenster & Türen) */
.hw-cfg-detail-textfelder {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hw-cfg-detail-textfeld-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hw-cfg-detail-textfeld-label {
  font-size: .75rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hw-cfg-detail-textfeld {
  width: 130px;
  padding: 9px 12px;
  border: 1px solid #d0d0d0;
  font-size: .95rem;
  font-weight: 600;
  color: #101112;
  font-family: inherit;
  background: #fff;
  border-radius: 0;
}
.hw-cfg-detail-textfeld:focus { outline: none; border-color: #e22278; }

/* Objektdaten (Baujahr + m²) */
.hw-cfg-objektdaten-title {
  font-size: .7rem;
  font-weight: 700;
  color: #101112;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.hw-cfg-objektdaten-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.hw-cfg-objektdaten-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .hw-cfg-header { padding: 20px 18px 14px; }
  .hw-cfg-body   { padding: 18px; }
  .hw-cfg-footer { padding: 14px 18px 20px; }
  .hw-cfg-objekttyp { grid-template-columns: 1fr; }
  .hw-cfg-gewerke-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hw-cfg-booking-options { grid-template-columns: 1fr; }
  .hw-cfg-form-row { grid-template-columns: 1fr; }
  .hw-cfg-profil-options { flex-direction: column; }
  .hw-cfg-zustand-row { flex-direction: column; align-items: flex-start; }
}
