/* Kontaktformular der statischen Ersatzseite (Testmodus) sowie Danke- und Fehlerseite.
   Wird NACH ersatz.css geladen. Das Original-CSS des Baukastens (kontakt.css) bleibt unverändert;
   hier steht nur das Neue: echte Eingabefelder in der Original-Optik, Schritte, Fehlerzustände.
   Farben wie im Original: Grün #5BBF46, Dunkel #06241F, Hell #E2E9E2, Schriften Rubik und Roboto über fonts.css. */

.fp-form{
  --fp-dark:#06241F;
  --fp-key2:#17463E;
  --fp-green:#5BBF46;
  --fp-light:#E2E9E2;
  --fp-error:#A01E0A;
  --fp-line:#6B7D7A;
  position:relative;width:100%;max-width:550px;margin:0 auto;text-align:left;
  font-family:var(--font-kit-text-font,'Roboto',sans-serif);font-size:16px;line-height:1.5;color:var(--fp-dark);
  scroll-margin-top:16px;
}
/* Das Original-CSS setzt bei einigen Bausteinen display; das hidden-Attribut muss trotzdem gelten. */
.fp-form [hidden]{display:none!important}
.fp-form>*{min-width:0}
.fp-form *,.fp-form *::before,.fp-form *::after{box-sizing:border-box}

.fp-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* Honigtopf: nicht sichtbar, nicht per Tastatur erreichbar, aber ein echtes Textfeld (kein type=hidden, kein display:none) */
.fp-hp{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.fp-hp input{width:1px;height:1px}

/* Schritte: ohne JavaScript stehen alle vier untereinander, mit Klasse js nur der aktive */
.fp-step{display:block;min-width:0;margin:0 0 28px;padding:0;border:0}
.fp-step+.fp-step{padding-top:24px;border-top:1px solid rgba(6,36,31,.18)}
.js .fp-step{display:none;margin:0;padding:0;border:0}
.js .fp-step.is-active{display:block}
.js .fp-step+.fp-step{padding-top:0;border-top:0}
.js .fp-stepno{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.js .fp-nojs-only{display:none}

.fp-legend{
  display:block;width:100%;padding:0;margin:0 0 12px;text-align:center;
  font-family:var(--font-kit-header-font,'Rubik',sans-serif);font-weight:700;font-size:clamp(22px,4.6vw,32px);line-height:1.2;color:var(--fp-dark);
}
.fp-legend:focus{outline:none}
.fp-lead{margin:0 0 20px;text-align:center}
.fp-required-note{margin:0 0 12px;font-size:14px;text-align:center}
.fp-required-note span[aria-hidden]{font-weight:700}

/* Fortschritt: die Punkte-Komponente des Originals plus Text */
.fp-progress{display:flex;flex-direction:column;align-items:center;margin:0 0 16px}
.fp-progress .con-kit-component-step-progress{margin-bottom:4px}
.fp-progress__text{margin:0;font-size:14px;font-weight:600}
.fp-progress .con-kit-component-step-progress--type-dots .con-kit-component-step-progress__circle{opacity:.25}
.fp-progress .con-kit-component-step-progress--type-dots .con-kit-component-step-progress__circle--active{opacity:1}

/* Felder */
.fp-field{margin:0 0 20px}
.fp-label{display:block;margin:0 0 6px;font-weight:600}
.fp-flag{font-weight:400;font-size:14px}
.fp-flag--req{font-weight:700}
.fp-hint{margin:0 0 6px;font-size:14px;color:#2F4642}
.fp-input,.fp-textarea{
  display:block;width:100%;min-height:56px;padding:12px 16px;border:1px solid var(--fp-line);border-radius:4px;
  background:#fff;color:var(--fp-dark);font:inherit;line-height:1.5;
}
.fp-textarea{min-height:168px;resize:vertical}
.fp-input::placeholder,.fp-textarea::placeholder{color:#5A6B68}
.fp-input:hover,.fp-textarea:hover{border-color:var(--fp-dark)}
.fp-input:focus,.fp-textarea:focus{outline:3px solid var(--fp-dark);outline-offset:2px;border-color:var(--fp-dark)}
.fp-input[aria-invalid="true"],.fp-textarea[aria-invalid="true"]{border:2px solid var(--fp-error);padding:11px 15px}
.fp-row{display:grid;gap:0 16px}
.fp-row--plz{grid-template-columns:minmax(0,132px) minmax(0,1fr)}
.fp-row--dates{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
@media (max-width:360px){
  .fp-row--plz{grid-template-columns:minmax(0,1fr)}
}
.fp-counter{margin:6px 0 0;font-size:14px;text-align:right}
.fp-counter.is-over{color:var(--fp-error);font-weight:600}

/* Fehlermeldung am Feld: Text plus Symbol, nicht nur Farbe */
.fp-error{display:flex;align-items:flex-start;gap:8px;margin:6px 0 0;color:var(--fp-error);font-size:15px;font-weight:600;line-height:1.35}
.fp-error::before{content:"!";flex:0 0 auto;width:20px;height:20px;border-radius:50%;background:var(--fp-error);color:#fff;font-size:13px;font-weight:700;line-height:20px;text-align:center}
.fp-alert{margin:0 0 16px;padding:12px 16px;border:2px solid var(--fp-error);border-radius:6px;background:#fff;color:var(--fp-error);font-weight:600}

/* Gruppen (Auswahlfelder) */
.fp-group{min-width:0;margin:0 0 20px;padding:0;border:0}
.fp-sublegend{display:block;width:100%;padding:0;margin:0 0 6px;font-weight:600}
.fp-group>.fp-group{margin-top:8px}
.fp-choices{display:grid;gap:4px;width:100%;margin:0 0 8px}
.fp-choices--2{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Auswahl-Kachel: echtes Eingabefeld deckt die Zeile ab (unsichtbar, aber bedienbar), Optik über :checked */
.fp-form .fp-choice.con-kit-component-select-item{display:block;position:relative;width:100%;margin:0;padding:0;border:0;background:none;overflow:visible;border-radius:6px;cursor:pointer}
.fp-choice__input{position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
/* Die Original-CSS (kontakt.css) setzt für .con-kit-component-select input und label pointer-events:none, weil der Baukasten Klicks per Skript auf dem Kachel-Element abgefangen hat.
   Hier laufen Klicks nativ über das durchsichtige Eingabefeld und das Label: pointer-events wieder freigeben. Die Original-Regel steht mit !important, deshalb braucht auch diese Regel !important und eine höhere Spezifität. */
.fp-form .fp-choice__input,.fp-form .fp-choice__label{pointer-events:auto!important}
.fp-choice__label{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px 12px;border:1px solid transparent;border-radius:6px;color:var(--fp-dark);cursor:pointer;-webkit-user-select:none;user-select:none}
.fp-choice__text{display:block;width:auto;flex:1 1 auto;min-width:0;text-align:left;line-height:1.35;overflow-wrap:anywhere}
.fp-choice__box{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:2px solid var(--fp-key2);border-radius:4px;background:#fff;transition:background-color .15s ease}
.fp-choice--radio .fp-choice__box{border-radius:50%}
.fp-choice--radio .fp-choice__box::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--fp-dark);visibility:hidden}
.fp-choice__box svg{visibility:hidden;width:12px;height:10px}
.fp-choice__box svg path{fill:var(--fp-dark)}
.fp-choice:hover .fp-choice__label{background:rgba(6,36,31,.06)}
.fp-choice__input:checked+.fp-choice__label{background:rgba(91,191,70,.2);border-color:var(--fp-green)}
.fp-choice__input:checked+.fp-choice__label .fp-choice__box{background:var(--fp-green)}
.fp-choice__input:checked+.fp-choice__label .fp-choice__box svg,
.fp-choice__input:checked+.fp-choice__label .fp-choice__box::after{visibility:visible}
.fp-choice__input:focus-visible+.fp-choice__label{outline:3px solid var(--fp-dark);outline-offset:2px}

/* Notfall-Kasten unter "Sturmschäden": per Klasse (Skript) oder rein per CSS, sobald die Kachel angehakt ist */
.fp-notfall{display:none;margin:4px 0 12px;padding:16px;border:3px solid var(--fp-error);border-radius:6px;background:#fff;color:var(--fp-dark)}
.fp-notfall.is-on{display:block}
/* eigene Regel: ein Browser ohne :has() verwirft sonst die ganze Liste, auch die Regel oben */
.fp-choice--sturm:has(.fp-choice__input:checked)+.fp-notfall{display:block}
.fp-notfall__title{margin:0 0 6px;font-family:var(--font-kit-header-font,'Rubik',sans-serif);font-size:20px;font-weight:700;line-height:1.25;color:var(--fp-error)}
.fp-notfall__text{margin:0 0 8px}
.fp-notfall__links{margin:0}
.fp-callbtn{display:inline-flex;align-items:center;min-height:48px;margin:6px 8px 0 0;padding:8px 16px;border-radius:4px;background:var(--fp-dark);color:#fff;font-weight:600;text-decoration:none}
.fp-callbtn:hover{background:var(--fp-key2)}
.fp-callbtn:focus-visible{outline:3px solid var(--fp-dark);outline-offset:2px}

/* Kleine Textknöpfe (Ändern, Auswahl aufheben) mit mindestens 44 mal 44 Pixel Tippfläche */
.fp-linkbtn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 14px;border:2px solid var(--fp-dark);border-radius:4px;background:transparent;color:var(--fp-dark);font:inherit;font-weight:600;cursor:pointer}
.fp-linkbtn:hover{background:rgba(6,36,31,.08)}
.fp-linkbtn:focus-visible{outline:3px solid var(--fp-dark);outline-offset:2px}
.fp-reset{margin:0 0 8px}

/* Zusammenfassung in Schritt 4 (nur mit JavaScript) */
.fp-summary{margin:0 0 20px;padding:16px;border:1px solid rgba(6,36,31,.25);border-radius:6px;background:rgba(255,255,255,.75)}
.fp-summary__title{margin:0 0 8px;font-weight:700}
.fp-summary__list{margin:0;padding:0;list-style:none}
.fp-summary__item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;align-items:center;padding:8px 0;border-top:1px solid rgba(6,36,31,.15)}
.fp-summary__item:first-child{border-top:0}
.fp-summary__k{grid-column:1;font-size:14px;font-weight:600}
.fp-summary__v{grid-column:1;overflow-wrap:anywhere}
.fp-summary__item .fp-linkbtn{grid-column:2;grid-row:1 / span 2}

/* Vorschau-Hinweis (Testmodus) direkt über dem Absende-Knopf */
.fp-testnote{margin:0 0 16px;padding:14px 16px;border:2px dashed var(--fp-key2);border-radius:6px;background:rgba(255,255,255,.92);font-size:15px}
.fp-testnote p{margin:0 0 8px}
.fp-testnote p:last-child{margin-bottom:0}
.fp-testnote a{color:inherit;text-decoration:underline}
.fp-testnote a:focus-visible{outline:3px solid var(--fp-dark);outline-offset:2px}

/* Echtbetrieb: Turnstile-Container (Modus interaction-only: ohne Rückfrage bleibt er ohne Höhe), Statushinweis und Datenschutz-Hinweis.
   Der Container hat keine eigene Höhe und kein overflow, deckt also keine Bedienfläche ab; das Widget wird nur sichtbar, wenn Cloudflare eine Bestätigung verlangt. */
.fp-turnstile{display:flex;justify-content:center;margin:0}
.fp-turnstile:has(iframe){margin:0 0 12px}
.fp-spam-msg:not(:empty){margin:0 0 12px}
.fp-notice{margin:0 0 16px;padding:12px 16px;border:1px solid var(--fp-line);border-radius:6px;background:#fff;color:var(--fp-dark);font-size:15px}
.fp-privacy{margin:0 0 16px;font-size:14px;line-height:1.45;color:var(--fp-dark)}
.fp-privacy a{color:inherit;text-decoration:underline}
.fp-privacy a:focus-visible{outline:3px solid var(--fp-dark);outline-offset:2px}

/* Knöpfe: Original-Klassen (con-kit-component-button) plus Anpassung für button-Elemente */
.fp-nav{margin-top:8px}
.fp-nav__buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.fp-nav__buttons .fp-btn{flex:0 1 auto;min-width:44px}
.fp-btn{font-family:var(--font-kit-text-font,'Roboto',sans-serif);cursor:pointer}
.fp-btn:focus-visible{outline:3px solid var(--fp-dark);outline-offset:3px}
.fp-form .fp-btn:disabled,.fp-form .fp-btn[aria-disabled="true"]{opacity:.35;cursor:not-allowed}
@media (max-width:480px){
  .fp-nav__buttons .fp-btn--primary{flex:1 1 0}
  .fp-btn{--one-kit-padding-horizontal:20px!important}
}

/* Kartenrand auf kleinen Bildschirmen: mehr Platz für die Felder, kleinerer Eckenradius (Original: Radius 100 px) */
@media (max-width:768px){
  .con-kit-molecule-textBlock:has(.fp-form){--one-kit-radius:24px!important}
  .con-kit-molecule-textBlock:has(.fp-form) .con-kit-atom-quiz__container{padding-left:0;padding-right:0}
}
@media (max-width:420px){
  .con-kit-molecule-textBlock:has(.fp-form) [data-atom=quiz]{--one-kit-padding:16px!important}
}

/* Danke- und Fehlerseite */
.fp-message{padding:8px 4px 32px;text-align:center}
.fp-h1{margin:0 0 16px;font-family:var(--font-kit-header-font,'Rubik',sans-serif);font-weight:700;font-size:clamp(26px,5vw,36px);line-height:1.2;color:#06241F}
.fp-message__action{display:flex;justify-content:center;padding-top:8px}
.fp-message__action .fp-btn{flex:0 1 auto}
.fp-message .fp-btn{--one-kit-padding-horizontal:31px}
.fp-message .fp-btn:focus-visible{outline:3px solid #06241F;outline-offset:3px}

@media (forced-colors:active){
  .fp-choice__box{border-color:ButtonText}
  .fp-choice__input:checked+.fp-choice__label .fp-choice__box{background:Highlight}
}
@media (prefers-reduced-motion:reduce){
  .fp-choice__box{transition:none}
}
