/* Gemeinsame Gestaltung für Auftrags- und Widerrufsformular */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 var(--schrift);
  color: var(--text);
  background: transparent;
}
main { max-width: 640px; margin: 0 auto; padding: 8px 4px 16px; }
h1 { font-size: 1.45rem; line-height: 1.2; margin: 4px 4px 6px; }
.intro { color: var(--grau); margin: 0 4px 16px; }

.karte {
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: var(--radius);
  padding: 18px 16px 6px;
  margin: 0 0 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}
h2 { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; line-height: 1.3; margin: 0 0 16px; }
.nr {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--akzent); color: #fff; font-size: .85rem; font-weight: 700;
}
.satz { font-weight: 700; margin: 0 0 14px; }

.feld { margin: 0 0 16px; min-width: 0; }
label, .label { display: block; font-size: .92rem; font-weight: 600; margin: 0 0 6px; }
.opt { font-weight: 400; color: var(--grau); font-size: .85rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea {
  display: block; width: 100%; min-height: 50px;
  font: inherit; font-size: 16px; /* 16px verhindert Zoom auf dem iPhone */
  padding: 12px 14px; color: inherit; background: #fff;
  border: 1.5px solid var(--rand); border-radius: 10px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type=date] { line-height: 1.2; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-weich); }
[aria-invalid=true] { border-color: var(--fehler) !important; }
.fehler { color: var(--fehler); font-size: .86rem; margin: 6px 0 0; }
.fehler:empty { display: none; }

.reihe { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
.reihe-plz { grid-template-columns: 8em 1fr; }
@media (min-width: 520px) {
  .reihe-2 { grid-template-columns: 1fr 1fr; }
  main { padding: 12px 8px 20px; }
  .karte { padding: 22px 22px 8px; }
}

/* Widerrufsbelehrung */
.rechtstext { background: #f5f6f8; border-radius: 10px; padding: 14px 14px 4px; margin: 0 0 18px; font-size: .9rem; line-height: 1.55; color: #30343c; }
.rechtstext p { margin: 0 0 10px; }
.rechtstext h3 { font-size: .95rem; margin: 14px 0 6px; color: var(--text); }
.rechtstext a, .check a, .klein a { color: var(--akzent); }

.check-feld { margin: 0 0 14px; }
.check-titel { font-size: .92rem; font-weight: 600; margin: 0 0 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .93rem; line-height: 1.45; margin: 0; padding: 6px 0; cursor: pointer; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--akzent); }
.check-feld .fehler { margin: 2px 0 0 36px; }

/* Unterschrift */
.label-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.label-zeile .label { margin: 0; }
.sig-aktionen { display: flex; gap: 18px; }
.btn-text {
  background: none; border: 0; padding: 8px 4px; margin: -8px -4px;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--akzent); cursor: pointer;
}
.btn-text:disabled { color: #a9afb8; cursor: default; }
.sig {
  position: relative; width: 100%; aspect-ratio: 2 / 1;
  border: 1.5px dashed var(--rand); border-radius: 12px; background: #fff;
  overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none;
}
.sig.fokus { border-color: var(--akzent); border-style: solid; }
.sig[aria-invalid=true] { border-style: solid; }
.sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig::after { content: ""; position: absolute; left: 7%; right: 7%; bottom: 24%; border-bottom: 1.5px solid #d3d8de; pointer-events: none; }
.sig-x { position: absolute; left: 7%; bottom: calc(24% + 6px); color: #b3b9c2; font-size: 1.05rem; pointer-events: none; }
.sig-hinweis { position: absolute; left: 0; right: 0; top: 30%; text-align: center; color: #9aa1ab; font-size: .95rem; pointer-events: none; padding: 0 12px; }
.sig.hat .sig-hinweis { display: none; }
.tipp { color: var(--grau); font-size: .82rem; margin: 6px 0 0; }
@media (min-width: 700px) { .tipp { display: none; } }

.btn-senden {
  display: block; width: 100%; min-height: 54px; margin: 6px 0 10px;
  font: inherit; font-size: 1.05rem; font-weight: 700; color: #fff;
  background: var(--akzent); border: 0; border-radius: 12px; cursor: pointer;
  box-shadow: 0 2px 6px var(--akzent-weich);
}
.btn-senden:focus-visible { outline: 3px solid var(--akzent-weich); outline-offset: 2px; }
.btn-senden[disabled] { opacity: .75; cursor: progress; }
.btn-senden .spinner { display: none; width: 20px; height: 20px; margin-right: 10px; vertical-align: -4px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: dreh .8s linear infinite; }
.btn-senden.laedt .spinner { display: inline-block; }
@keyframes dreh { to { transform: rotate(360deg); } }
.klein { color: var(--grau); font-size: .82rem; margin: 0 0 14px; }
.meldung { background: #fdecec; color: #8e1c1c; border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; font-size: .95rem; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Danke */
.danke { text-align: center; padding: 28px 20px 22px; }
.danke .ok { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--akzent-weich); display: grid; place-items: center; }
.danke h2 { justify-content: center; font-size: 1.3rem; margin-bottom: 8px; }
.danke p { margin: 0 0 14px; color: var(--grau); }
.danke .nummer { font-weight: 700; color: var(--text); }
.btn-zweit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  font: inherit; font-weight: 700; color: var(--akzent); text-decoration: none;
  border: 1.5px solid var(--akzent); border-radius: 12px; background: #fff;
}

.feld-hinweis { color: var(--grau); font-size: .84rem; margin: 6px 0 0; }
.sig-hinweis-text { color: var(--grau); font-size: .84rem; margin: 8px 0 0; }
.turnstile-feld { min-height: 65px; }
.turnstile-feld .fehler { margin-top: 4px; }
