/* ============================================================
   WERTFINDER — eigener Bewertungs-Wizard (Vorschalt-Widget)
   Ersetzt den direkten Einstieg ins Sprengnetter-iframe.
   Mobil-first. Große Tap-Flächen (min. 48px), immer sichtbarer
   Zurück-Weg, Fortschrittsanzeige, eine Frage pro Schritt.
   ============================================================ */

.wertfinder {
  --wf-gold: #A67C52;
  --wf-gold-dark: #8A6540;
  --wf-dark: #152F38;
  --wf-creme: #F4EDE2;
  --wf-line: #DCD3C6;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
  padding: 22px 20px 24px;
  max-width: 640px;
  text-align: left;
  color: var(--wf-dark);
}

@media (max-width: 760px) {
  .wertfinder { padding: 18px 14px 20px; border-radius: 12px; }
}

/* ---------- Kopf: Fortschritt + Zurück ---------- */
.wertfinder__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 40px;
}

.wertfinder__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--wf-line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--wf-dark);
  cursor: pointer;
  min-height: 40px;
}

.wertfinder__back:hover { background: var(--wf-creme); }
.wertfinder__back[hidden] { display: none; }

.wertfinder__progress { flex: 1; }

.wertfinder__progress-label {
  display: block;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6E5535;
  margin-bottom: 5px;
}

.wertfinder__bar {
  height: 6px;
  background: var(--wf-creme);
  border-radius: 99px;
  overflow: hidden;
}

.wertfinder__bar-fill {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--wf-gold);
  border-radius: 99px;
  transition: width .3s ease;
}

/* ---------- Schritte ---------- */
.wertfinder__step[hidden] { display: none; }

.wertfinder__question {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 4px;
  font-weight: 700;
}

.wertfinder__hint {
  margin: 0 0 16px;
  font-size: .95rem;
  color: #55636A;
}

/* ---------- Auswahl-Kacheln (das war mobil unklar) ---------- */
.wertfinder__choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

@media (max-width: 420px) {
  .wertfinder__choices { grid-template-columns: 1fr; }
}

.wertfinder__choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--wf-line);
  border-radius: 10px;
  background: #fff;
  padding: 14px 14px;
  min-height: 58px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--wf-dark);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}

.wertfinder__choice:hover { border-color: var(--wf-gold); background: #FCFAF7; }
.wertfinder__choice:active { transform: scale(.99); }

.wertfinder__choice:focus-visible {
  outline: 3px solid var(--wf-gold);
  outline-offset: 2px;
}

/* Ausgewählt: Rahmen + Häkchen — auf dem Handy eindeutig sichtbar */
.wertfinder__choice.is-selected {
  border-color: var(--wf-gold);
  background: var(--wf-creme);
}

.wertfinder__choice.is-selected::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wf-gold);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wertfinder__choice-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex: 0 0 auto;
}

/* ---------- Eingabefelder ---------- */
.wertfinder__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wertfinder__fields .wf-wide { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .wertfinder__fields { grid-template-columns: 1fr; }
  .wertfinder__fields .wf-wide { grid-column: auto; }
}

.wertfinder label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--wf-dark);
}

.wertfinder input[type="text"],
.wertfinder input[type="tel"],
.wertfinder input[type="email"],
.wertfinder select,
.wertfinder textarea {
  width: 100%;
  margin-top: 5px;
  padding: 13px 12px;
  font: inherit;
  font-size: 16px; /* verhindert iOS-Zoom beim Fokus */
  color: var(--wf-dark);
  background: #fff;
  border: 1px solid var(--wf-line);
  border-radius: 8px;
  min-height: 48px;
}

.wertfinder input:focus,
.wertfinder select:focus,
.wertfinder textarea:focus {
  outline: none;
  border-color: var(--wf-gold);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, .18);
}

.wertfinder__privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.45;
  color: #55636A;
}

.wertfinder__privacy input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

/* ---------- Aktionen ---------- */
.wertfinder__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.wertfinder__next,
.wertfinder__submit {
  flex: 1;
  border: none;
  border-radius: 9px;
  background: var(--wf-gold);
  color: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  padding: 15px 18px;
  min-height: 52px;
  cursor: pointer;
}

.wertfinder__next:hover,
.wertfinder__submit:hover { background: var(--wf-gold-dark); }
.wertfinder__next:disabled,
.wertfinder__submit:disabled { opacity: .55; cursor: not-allowed; }

.wertfinder__skip {
  display: block;
  margin-top: 12px;
  font-size: .88rem;
  color: #55636A;
  text-align: center;
}

.wertfinder__skip a { color: #55636A; }

.wertfinder__reassure {
  margin: 12px 0 0;
  font-size: .84rem;
  color: #55636A;
  line-height: 1.5;
}

/* ---------- Zusammenfassung im letzten Schritt ---------- */
.wertfinder__summary {
  background: var(--wf-creme);
  border-left: 4px solid var(--wf-gold);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: .9rem;
  line-height: 1.6;
}

.wertfinder__summary strong { color: var(--wf-dark); }

/* ---------- Erfolg ---------- */
.wertfinder__done[hidden] { display: none; }

.wertfinder__done {
  text-align: center;
  padding: 12px 4px 4px;
}

.wertfinder__done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #2E7D5B;
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wertfinder__done h3 { margin: 0 0 8px; font-size: 1.25rem; }
.wertfinder__done p { margin: 0 0 14px; color: #55636A; font-size: .95rem; line-height: 1.55; }

.wertfinder__done-cta {
  display: inline-block;
  border: 2px solid var(--wf-gold);
  border-radius: 9px;
  padding: 13px 18px;
  font-weight: 700;
  color: var(--wf-gold-dark);
  text-decoration: none;
  min-height: 48px;
}

.wertfinder__done-cta:hover { background: var(--wf-creme); }

/* ---------- Fehlermeldung ---------- */
.wertfinder__error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FDECEC;
  border-left: 4px solid #C0392B;
  color: #7A241B;
  font-size: .9rem;
}

.wertfinder__error[hidden] { display: none; }

/* Honeypot */
.wertfinder__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
