/* Kundenformular – Farben über diese Variablen an Ihr Template anpassen */
.kf {
  --kf-accent: #2e6f62;
  --kf-accent-ink: #ffffff;
  --kf-accent-soft: #e2eeeb;
  --kf-surface: #ffffff;
  --kf-ink: #1b2e3a;
  --kf-muted: #5a6b74;
  --kf-line: #c6d1d0;
  --kf-error: #a8261d;
  --kf-error-soft: #fbeae8;
  --kf-page-bg: #ffffff; /* Hintergrund der Seite hinter dem Formular (für die Stanzlöcher) */
  max-width: 40rem;
  margin: 1.5rem 0;
  color: var(--kf-ink);
  line-height: 1.55;
}
.kf *, .kf *::before, .kf *::after { box-sizing: border-box; }
.kf-sheet {
  background: var(--kf-surface);
  border: 1px solid var(--kf-line);
  border-radius: 6px;
  padding: 1.75rem;
}
.kf-h { font-size: 1.2rem; font-weight: 600; margin: 0 0 1.25rem; }
.kf-field { margin-bottom: 1.15rem; }
.kf label { display: block; font-weight: 500; margin-bottom: .35rem; }
.kf-req { color: var(--kf-muted); font-weight: 400; font-size: .9rem; }
.kf input[type=text], .kf input[type=email] {
  display: block; width: 100%; max-width: 100%;
  font: inherit; color: var(--kf-ink); background: var(--kf-surface);
  border: 1px solid var(--kf-line); border-radius: 4px; padding: .65rem .75rem;
  margin: 0; height: auto; box-shadow: none;
}
.kf input:focus-visible, .kf button:focus-visible { outline: 3px solid var(--kf-accent); outline-offset: 2px; }
.kf input[aria-invalid=true] { border-color: var(--kf-error); background: var(--kf-error-soft); }
.kf-hint { display: block; font-size: .875rem; color: var(--kf-muted); margin-top: .3rem; font-weight: 400; }
.kf-err { display: none; font-size: .875rem; color: var(--kf-error); margin-top: .3rem; }
.kf-err.is-visible { display: block; }
.kf-row { display: grid; grid-template-columns: 8rem 1fr; gap: .75rem; }
@media (max-width: 30rem) {
  .kf-row { grid-template-columns: 1fr; }
  .kf-sheet { padding: 1.25rem; }
}

/* Abtrennbarer SEPA-Abschnitt */
.kf-perforation {
  height: 0; border-top: 2px dashed var(--kf-line);
  margin: 2rem -1.75rem 1.75rem; position: relative;
}
.kf-perforation::before, .kf-perforation::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--kf-page-bg); border: 1px solid var(--kf-line);
}
.kf-perforation::before { left: -11px; clip-path: inset(0 0 0 50%); }
.kf-perforation::after { right: -11px; clip-path: inset(0 50% 0 0); }
@media (max-width: 30rem) { .kf-perforation { margin-left: -1.25rem; margin-right: -1.25rem; } }

.kf .kf-toggle { display: flex; gap: .85rem; align-items: flex-start; cursor: pointer; font-weight: 400; margin: 0; }
.kf-toggle input { width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; accent-color: var(--kf-accent); flex: none; }
.kf-toggle strong { display: block; font-weight: 600; }

.kf-sepa { margin-top: 1.5rem; }
.kf.has-js .kf-sepa { display: none; }
.kf.has-js .kf-sepa.is-open { display: block; animation: kf-unfold .25s ease-out; }
@keyframes kf-unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kf.has-js .kf-sepa.is-open { animation: none; } }

.kf-mandate {
  background: var(--kf-accent-soft); border-radius: 4px;
  padding: 1rem 1.1rem; font-size: .92rem; margin: 0 0 1.4rem;
}
.kf-mandate p { margin: 0 0 .6rem; }
.kf-mandate p:last-child { margin: 0; }
.kf-mandate dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; margin: 0 0 .8rem; }
.kf-mandate dt { color: var(--kf-muted); font-weight: 400; }
.kf-mandate dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.kf-consent { display: flex; gap: .75rem; align-items: flex-start; margin-top: .5rem; }
.kf-consent input { width: 1.15rem; height: 1.15rem; margin: .25rem 0 0; accent-color: var(--kf-accent); flex: none; }
.kf .kf-consent label { font-weight: 400; margin: 0; }
.kf-iban { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

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

.kf-submit {
  display: block; margin-top: 2rem; width: 100%;
  font: inherit; font-weight: 600; font-size: 1.05rem;
  background: var(--kf-accent); color: var(--kf-accent-ink);
  border: 0; border-radius: 4px; padding: .85rem 1rem; cursor: pointer;
}
.kf-submit:hover { filter: brightness(1.07); }
