/* ---------- Formular ---------- */

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.3rem; }
.form-field { display: flex; flex-direction: column; gap: .38rem; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-head); font-size: .86rem; font-weight: 700; color: var(--navy-800); }
.form-field label small { font-weight: 500; color: var(--ink-soft); }
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .75rem .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(27, 143, 212, .18);
  background: #fff;
}
.form-field textarea { resize: vertical; min-height: 130px; }

.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.choice {
  position: relative;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: .95rem 1rem .9rem;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.choice:hover { border-color: var(--blue-500); }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice strong { font-family: var(--font-head); font-size: .92rem; color: var(--navy-800); }
.choice span { font-size: .8rem; color: var(--ink-soft); line-height: 1.4; }
.choice:has(input:checked) {
  border-color: var(--blue-600);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 143, 212, .15);
}
.choice:has(input:checked) strong { color: var(--blue-600); }

.form-note { font-size: .86rem; color: var(--ink-soft); margin-top: 1rem; }

/* Honeypot: für Menschen unsichtbar, Bots füllen es aus */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-success {
  display: none;
  background: #eafaf0;
  border: 1.5px solid #35b06f;
  color: #14663c;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-top: 1.2rem;
  font-weight: 500;
}
.form-success.is-visible { display: block; }

/* ---------- PV-Konfigurator / Fragebogen ---------- */

.qwizard { max-width: 860px; margin-inline: auto; }

.qwizard__progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.qwizard__bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-mute);
  overflow: hidden;
}
.qwizard__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500), var(--cyan-400));
  transition: width .3s ease;
}
.qwizard__count {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.qstep { border: none; margin: 0; padding: 0; }
.qstep[hidden] { display: none; }
.qstep__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-800);
  margin-bottom: .4rem;
  padding: 0;
}
.qstep__hint { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.3rem; }

.qgroup { margin-bottom: 1.6rem; }
.qgroup:last-child { margin-bottom: 0; }
.qgroup__label {
  display: block;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: .7rem;
}
.qgroup__label small { font-weight: 500; color: var(--ink-soft); }

.imggrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.imggrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.imggrid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.imgchoice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  text-align: center;
  padding: 1.1rem .7rem .95rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
  min-height: 108px;
}
.imgchoice:hover { border-color: var(--blue-500); transform: translateY(-2px); }
.imgchoice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.imgchoice .icon { width: 40px; height: 40px; color: var(--blue-600); }
.imgchoice svg.angle { width: 52px; height: 34px; }
.imgchoice strong {
  font-family: var(--font-head);
  font-size: .87rem;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.25;
}
.imgchoice span { font-size: .76rem; color: var(--ink-soft); line-height: 1.3; }
.imgchoice:has(input:checked) {
  border-color: var(--blue-600);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 143, 212, .16);
}
.imgchoice:has(input:checked) strong { color: var(--blue-600); }
.imgchoice:has(input:checked) .icon { color: var(--blue-600); }

.imgchoice__badge {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--bg-mute);
  border: 1.5px solid var(--line);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .95rem;
  color: var(--navy-800);
  line-height: 1;
}
.imgchoice:has(input:checked) .imgchoice__badge {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.num-wrap { position: relative; max-width: 260px; }
.num-wrap input { padding-right: 4.6rem !important; }
.num-wrap::after {
  content: attr(data-unit);
  position: absolute;
  right: .95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
  pointer-events: none;
}

.qnote {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--bg-mute);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .95rem 1.1rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.qnote .icon { width: 20px; height: 20px; flex: none; color: var(--blue-600); margin-top: .1rem; }

.qerror {
  display: none;
  color: #c0392b;
  background: #fdf0ee;
  border: 1.5px solid #e6b0a8;
  border-radius: 10px;
  padding: .7rem 1rem;
  font-size: .92rem;
  font-weight: 500;
  margin-top: 1.2rem;
}
.qerror.is-visible { display: block; }

.qwizard__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.qwizard__nav .btn[disabled] { opacity: .45; pointer-events: none; }

/* Eingebetteter PV-Block im Anfrage-Formular */
.pv-embed {
  margin-top: .4rem;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.2rem;
  background: #fff;
}
.pv-embed[hidden] { display: none; }
.pv-embed__head {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 1.2rem;
}
.pv-embed__head .icon { width: 20px; height: 20px; color: var(--amber-600); }
.pv-embed .qstep { margin-bottom: 1.6rem; }
.pv-embed .qstep:last-child { margin-bottom: 0; }
.pv-embed .qstep__title { font-size: 1.02rem; }
.pv-embed .qstep__hint { margin-bottom: 1rem; }
.pv-embed .imggrid,
.pv-embed .imggrid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-embed .imggrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.form-submit-error { background:#fff1f1; color:#902b3a; padding:1rem; border-left:3px solid #b23943; border-radius:4px; margin-top:1rem; line-height:1.7; }

@media (max-width: 880px) {
  .imggrid, .imggrid--5, .imggrid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qwizard__nav { flex-wrap: wrap; }
  .form-grid, .choice-grid { grid-template-columns: minmax(0, 1fr); }
}
