/* Spendenformulare */

.edz-form {
  --f-berry: var(--berry, #b1184e);
  --f-orange: var(--orange, #ea6a27);
  --f-ink: var(--ink, #33292a);
  --f-muted: var(--muted, #6b5f5c);
  --f-line: var(--line, #ecdccd);
  --f-control-line: var(--control-line, #9c8074);
  --f-focus: var(--focus-color, #33292a);
  --f-cream: var(--cream, #f5dcc2);
  --f-cream-light: var(--cream-light, #fcf3ea);
  --f-radius: var(--radius, 18px);
  margin-top: 2rem;
  clear: both;
}
.prose > .edz-form:first-child { margin-top: 0; }
.edz-form > * + * { margin-top: 0; }
.edz-form p { margin: 0; }
.edz-form ul { margin: 0; }
.edz-form li + li { margin-top: 0; }
.edz-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Fortschritt */
.edz-form .steps { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 0 0 2rem; counter-reset: step; flex-wrap: wrap; }
.edz-form .steps li { counter-increment: step; display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--grey, #5f6c6c); font-size: .95rem; margin: 0; }
.edz-form .steps li::marker { content: none; }
.edz-form .steps li::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--f-line); background: #fff; flex: none; }
.edz-form .steps li:not(:last-child)::after { content: ""; width: 28px; height: 2px; background: var(--f-line); margin-left: .25rem; }
.edz-form .steps li.done, .edz-form .steps li.active { color: var(--f-ink); }
.edz-form .steps li.done::before { content: "✓"; background: var(--f-cream); border-color: var(--f-cream); color: var(--f-berry); }
.edz-form .steps li.active::before { background: var(--f-berry); border-color: var(--f-berry); color: #fff; }

/* Karten */
.edz-form .form-card { background: #fff; border: 1px solid var(--f-line); border-radius: calc(var(--f-radius) + 6px); padding: clamp(1.25rem, 4vw, 2.25rem); }
.edz-form .form-card + .form-card { margin-top: 1.25rem; }
.edz-form .form-card h2 { font-size: 1.3rem; margin: 0 0 1.1rem; }
.edz-form .form-card > .form-note { margin: -.5rem 0 1rem; }
.edz-form h2:focus { outline: none; }

/* Felder */
.edz-form .form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.edz-form .field { grid-column: span 6; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.edz-form .field.half { grid-column: span 3; }
.edz-form .field.third { grid-column: span 2; }
.edz-form .field.two-thirds { grid-column: span 4; }
.edz-form .field label, .edz-form legend { font-weight: 800; font-size: .95rem; }
.edz-form legend { margin-bottom: .6rem; padding: 0; }
.edz-form .req { color: var(--f-berry); }
.edz-form .optional { font-weight: 600; color: var(--f-muted); }
.edz-form input[type="text"], .edz-form input[type="email"], .edz-form input[type="tel"] {
  font: 600 1.05rem var(--font-sans, sans-serif); color: var(--f-ink); padding: .8rem 1rem; border: 2px solid var(--f-control-line); border-radius: 12px; background: #fff; width: 100%; min-width: 0; box-sizing: border-box;
}
.edz-form input[type="text"]:focus, .edz-form input[type="email"]:focus, .edz-form input[type="tel"]:focus { outline: none; border-color: var(--f-orange); box-shadow: 0 0 0 4px rgb(234 106 39 / .2); }
.edz-form input.iban { letter-spacing: .06em; text-transform: uppercase; }
.edz-form .hint { font-size: .86rem; color: var(--f-muted); }
.edz-form .error input[type="text"], .edz-form .error input[type="email"], .edz-form .error input[type="tel"] { border-color: var(--f-berry); background: #fdf3f6; }
.edz-form .err { display: block; font-size: .9rem; color: var(--f-berry); font-weight: 700; }
.edz-form .err::before { content: "! "; }

/* Betrag */
.edz-form .amounts { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.edz-form .amounts > label { cursor: pointer; position: relative; }
.edz-form .amounts input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.edz-form .amounts > label span { display: inline-block; padding: .75rem 1.15rem; border-radius: 999px; border: 2px solid var(--f-control-line); font-weight: 800; background: #fff; transition: border-color .15s ease, background-color .15s ease; }
.edz-form .amounts > label:hover span { border-color: var(--f-berry); background: #fdf6f8; }
.edz-form .amounts input:checked + span { background: var(--f-berry); border-color: var(--f-berry); color: #fff; }
.edz-form .amounts input:focus-visible + span { outline: 3px solid var(--f-focus); outline-offset: 3px; }
.edz-form .amount-free { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.edz-form .amount-free input[type="text"] { width: 8.5rem; text-align: right; }
.edz-form .amount-set.error .amount-free input { border-color: var(--f-berry); background: #fdf3f6; }
.edz-form .amount-set .err { margin-top: .6rem; }
.edz-form .amount-set .form-note { margin-top: .75rem; }

/* Checkboxen (Mandat, Datenschutz) */
.edz-form .check-wrap { margin-top: 1.1rem; }
.edz-form .form-card > .check-wrap:first-child { margin-top: 0; }
.edz-form .check { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: .75rem; align-items: start; padding: 1rem 1.1rem; background: var(--f-cream-light); border-radius: 14px; border: 1px solid var(--f-line); cursor: pointer; }
.edz-form .check-wrap.error .check { border: 2px solid var(--f-berry); }
.edz-form .check-wrap .err { margin-top: .4rem; }
.edz-form .check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--f-berry); }
.edz-form .check small { display: block; color: var(--f-muted); margin-top: .35rem; line-height: 1.5; font-size: .9rem; }
.edz-form .check a { font-weight: 800; }

/* Zahlungsempfänger */
.edz-form .creditor { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem 1.25rem; font-size: .95rem; padding: 1rem 1.2rem; background: var(--f-cream-light); border-radius: 14px; margin: 1.1rem 0 0; }
.edz-form .creditor dt { color: var(--f-muted); font-weight: 700; }
.edz-form .creditor dd { margin: 0; font-weight: 700; }
.edz-form .form-card > .mandate-text { margin: 1rem 0 0; font-size: .9rem; color: var(--f-muted); }

/* Aktionen */
.edz-form .form-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; margin-top: 1.5rem; }
.edz-form .form-note { font-size: .9rem; color: var(--f-muted); }
.edz-form button.btn { cursor: pointer; font-family: inherit; }
.edz-form button.btn[aria-disabled="true"] { opacity: .6; cursor: progress; }

.edz-form .honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fehlerzusammenfassung */
.edz-form .error-summary { border: 3px solid var(--f-berry); border-radius: var(--f-radius); padding: 1.1rem 1.4rem; margin-bottom: 1.5rem; background: #fdf3f6; }
.edz-form .error-summary:focus { outline: 3px solid var(--f-focus); outline-offset: 3px; }
.edz-form .error-summary h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.edz-form .error-summary ul { padding-left: 1.1rem; display: grid; gap: .25rem; }
.edz-form .error-summary a { color: var(--f-berry); font-weight: 700; }

/* Prüfseite */
.edz-form .review { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: .55rem 1.25rem; margin: 0; }
.edz-form .review dt { color: var(--f-muted); font-weight: 700; }
.edz-form .review dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* Danke */
.edz-form .success { text-align: center; padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 4vw, 2.5rem); }
.edz-form .success .icon { width: 84px; height: 84px; border-radius: 50%; background: var(--f-berry); color: #fff; display: grid; place-items: center; margin: 0 auto 1.25rem; font-size: 2.4rem; }
.edz-form .success h2 { font-size: 1.8rem; }
.edz-form .success p { max-width: 34em; margin: .75rem auto 0; color: var(--f-muted); }
.edz-form .success-actions { margin-top: 1.75rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.edz-form [hidden] { display: none !important; }

@media (max-width: 560px) {
  .edz-form .steps { gap: .35rem; flex-wrap: nowrap; }
  .edz-form .steps li { font-size: .88rem; gap: .35rem; }
  .edz-form .steps li::before { width: 30px; height: 30px; }
  .edz-form .steps li:not(:last-child)::after { width: 12px; margin-left: .1rem; }
  .edz-form .field.half, .edz-form .field.third, .edz-form .field.two-thirds { grid-column: span 6; }
  .edz-form .review { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .edz-form .review dd { margin-bottom: .6rem; }
  .edz-form .creditor { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .edz-form .creditor dd { margin-bottom: .5rem; }
  .edz-form .form-actions .btn { flex: 1 1 100%; text-align: center; }
}
@media (max-width: 400px) {
  .edz-form .steps li:not(:last-child)::after { display: none; }
}
