/* =========================
   FORM-SEITEN-OVERRIDES (neutralisiert Theme-Offsets, bündige Progressbar)
   ========================= */

/* Container-Offsets neutralisieren (kein globales Seitenpadding, Progress bündig) */
.content > .container{
  padding-left:0 !important;
  padding-right:0 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
}

/* ===== Layout: Sidebar + Stage + Typo ===== */
.mj3-form{display:flex;min-height:100vh;background:#EEEEEE}
.mj3-sidebar{
  background:#31827e;color:#fff;flex:0 0 440px;max-width:440px;
  position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:10;
  overflow-x:hidden;overflow-y:auto;
  padding:0 1.25em 1.25em;
}
.mj3-side-title{padding:50px .75em !important;font-weight:normal;font-size:22px;color:#ffffff !important}
.mj3-steps-nav{list-style:none;margin:0;flex:1 1 auto;min-height:0;overflow-y:auto}
.mj3-steps-nav li{margin-bottom:2rem;display:flex;align-items:center;position:relative;color:#fff;font-weight:bold;cursor:default}
.mj3-steps-nav li .dot{background:#fff;width:1.4em;height:1.4em;border-radius:.7em;margin-right:1em;flex:0 0 auto;position:relative}
.mj3-steps-nav li.active .dot:after{content:"";position:absolute;left:50%;top:50%;width:.8em;height:.8em;margin:-.4em 0 0 -.4em;background:#31827e;border-radius:.4em}
.mj3-steps-nav li.done{opacity:.9}
.mj3-steps-nav li.clickable{cursor:pointer}
/* Aktiv-Streifen bleibt in Sidebar */
.mj3-steps-nav li::after{position:absolute;bottom:-.75em;top:-.75em;left:0;right:0;background:#fff;content:"";z-index:-1;opacity:0}
.mj3-steps-nav li.active::after{opacity:0}

/* Status-Icons links: ✓ fertig, ✕ fehlt (nur für besuchte Steps) */
.mj3-steps-nav li.ok .dot{background:#2ab225;color:#fff}
.mj3-steps-nav li.ok .dot::before{content:"✓";position:absolute;left:50%;top:50%;transform:translate(-50%,-56%);font-weight:800;font-size:.9em;color:#fff}
.mj3-steps-nav li.err .dot{background:#e74c3c;color:#fff}
.mj3-steps-nav li.err .dot::before{content:"✕";position:absolute;left:50%;top:50%;transform:translate(-50%,-56%);font-weight:800;font-size:.9em;color:#fff}

.mj3-stage{flex:1 1 auto;display:flex;flex-direction:column;position:relative;z-index:1}
.mj3-page-title{color:#31827e;margin-bottom:3rem;font-size:28px}

/* ===== Progressbar nur unten im Footer ===== */
.mj-progress-track{display:none !important}           /* evtl. vorhandene Top-Bar sicher ausblenden */
.mj3-stage .navigation, .mj3-stage progress{display:none !important} /* Theme-Progress in Stage aus */
.mj3-footer{
  position:sticky;bottom:0;left:0;right:0;z-index:5;
  background:#fff;border-top:1px solid #eee;padding:1em;
  display:flex;align-items:center;justify-content:space-between
}
.mj3-footer .mj-progress-inline{
  position:absolute;left:0;right:0;bottom:0;height:.3rem;background:#fff
}
.mj3-footer .mj-progress-inline .mj-progress{
  height:.3rem;background:#31827e;width:0;transition:width .3s
}

/* ===== Steps: keine Seiten-Polster; Footer immer unten ===== */
.mj3-stage{min-height:100vh}
.mj-step{display:none;padding:24px 0 0px;min-height:100vh;display:flex;flex-direction:column}
@media (max-width:560px){.mj-step{padding:16px 0 88px}}
.mj-step.current{display:flex}
.mj3-footer{margin-top:auto}

/* Inhalt bekommt eigene horizontale Luft */
.mj-step > .mj3-page-title,
.mj-step > h3, .mj-step > h4,
.mj-step > .mj3-row,
.mj-step > .mj3-group,
.mj-step > label,
.mj-step > p{padding-left:24px;padding-right:24px}
@media (max-width:560px){
  .mj-step > .mj3-page-title,
  .mj-step > h3, .mj-step > h4,
  .mj-step > .mj3-row,
  .mj-step > .mj3-group,
  .mj-step > label,
  .mj-step > p{padding-left:16px;padding-right:16px}
}

/* ===== Grid mit gap (saubere Abstände) ===== */
:root{ --mj3-gap: 16px }
@media (min-width:990px){ :root{ --mj3-gap: 24px } }

.mj3-row{margin-left:0 !important;margin-right:0 !important}
.mj3-row > *, .mj3-row > [class*="span"], .mj3-row > [class*="mj3-col"]{padding:0 !important;margin:0 !important;min-width:0}
.mj3-form .mj3-row{
  display:grid !important;
  grid-template-columns:1fr;
  gap:var(--mj3-gap);
  margin:0 0 var(--mj3-gap) 0
}
.mj3-form .mj3-row.mj3-2{grid-template-columns:repeat(2, minmax(0,1fr))}
.mj3-form .mj3-row.mj3-3{grid-template-columns:repeat(3, minmax(0,1fr))}
.mj3-form .mj3-row.mj3-4{grid-template-columns:repeat(4, minmax(0,1fr))}
@media (max-width:759.98px){
  .mj3-form .mj3-row.mj3-2,
  .mj3-form .mj3-row.mj3-3,
  .mj3-form .mj3-row.mj3-4{grid-template-columns:1fr}
}

/* ===== Labels/Inputs/Buttons ===== */
.mj3-stage label{font-weight:bold;display:block;margin-bottom:.8rem;color:#707070;position:relative} /* relative: Bubble-Verankerung */
.mj3-input,.mj3-textarea{
  background:#fff;border-radius:.2rem;border:1px solid #DDDDDD;color:#707070;font-size:1rem;
  outline:none;font-family:'Arial',sans-serif;min-height:2.75rem;width:100%;padding:.5rem
}
.mj3-textarea{min-height:5rem}
.mj3-input:focus,.mj3-textarea:focus{border-color:#31827e}
.mj3-btn{
  background:#31827e !important;border:2px solid #31827e !important;color:#fff !important;
  border-radius:1.75rem !important;height:2.5rem !important;padding:0 2rem !important;
  font-weight:bold !important;box-shadow:none !important
}
.mj3-btn[disabled]{background:#FFFFFF !important;border-color:#DDDDDD !important;color:#707070 !important}
.mj3-cta{background:#31827e;border-color:#31827e;color:#fff}
.mj3-counter{font-size:1rem;color:#707070}

/* ===== Radios/Checkboxes (stabil, nativ, sauber ausgerichtet) ===== */
.mj3-form .mj3-group input[type="radio"],
.mj3-form .mj3-group input[type="checkbox"]{
  appearance:auto !important;-webkit-appearance:auto !important;-moz-appearance:auto !important;
  accent-color:#31827e;width:1.15em;height:1.15em;margin:0 .5em 0 0;vertical-align:middle;
  background:initial !important;border:none !important
}
.mj3-form .mj3-group.mj3-inline{align-self:center;margin-bottom:0}
.mj3-form .mj3-group.mj3-inline label{display:inline-flex;align-items:center;gap:.5rem;margin:0}
.mj3-form .mj3-group .option{display:inline-flex;align-items:center;margin:0 1.25rem .6rem 0;cursor:pointer}
.mj3-form .mj3-group .option label{margin:0}

/* ===== Datei-Inputs ===== */
.mj3-file{display:block;margin:.4em 0}
.file-drop,.file-control{border:1px dashed #707070;border-radius:.5rem;padding:2rem;text-align:center;margin-bottom:.4em}



/* ===== Mobile Sidebar Toggle ===== */
@media (max-width:989.98px){
  .mj3-sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-100%);transition:transform .3s ease;max-width:83vw}
  .mj3-form.menu-open .mj3-sidebar{transform:translateX(0)}
  .mj3-stage{padding-top:0}
}

/* ===== Harte Overrides gegen Theme-Form-Styles ===== */
.mj3-form input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="button"]):not([type="submit"]),
.mj3-form select,
.mj3-form textarea{
  background:#FFFFFF !important;border:1px solid #DDDDDD !important;border-radius:.2rem !important;color:#707070 !important;
  font:inherit !important;min-height:2.75rem !important;padding:.5rem !important;outline:none !important;width:100% !important;box-shadow:none !important
}
.mj3-form input.mj3-input,.mj3-form select.mj3-input,.mj3-form textarea.mj3-textarea{
  background:#FFFFFF !important;border:1px solid #DDDDDD !important;border-radius:.2rem !important;color:#707070 !important;
  min-height:2.75rem !important;padding:.5rem !important;width:100% !important
}
.mj3-form input:focus,.mj3-form select:focus,.mj3-form textarea:focus{border-color:#31827e !important;outline:none !important;box-shadow:none !important}
.mj3-form input[type="file"].mj3-file{border:1px dashed #707070 !important;background:#fff !important;padding:1rem !important;border-radius:.5rem !important;width:100% !important}
.mj3-steps-nav li.active.ok .dot,
.mj3-steps-nav li.active.err .dot{ background:#fff !important; }
.mj3-steps-nav li.active.ok .dot::before,
.mj3-steps-nav li.active.err .dot::before{ display:none !important; }

.mj-step{ min-height:100vh !important; display:flex !important; flex-direction:column !important; }
.mj-step .mj3-footer{ margin-top:auto !important; position:sticky; bottom:0; }

/* PATCH: nur aktueller Step sichtbar – hart übersteuern, falls Theme eingreift */
.mj-step:not(.current){ display:none !important; }
.mj-step.current{ display:flex !important; }

.mj3-conditional{
  padding:16px 16px 12px;
  margin:16px 24px 24px;
  border-left:4px solid #31827e;
  background:#f7fbfb;
  border-radius:6px;
}

/* robuster Hide-Fix */
.mj3-conditional[hidden],
.mj3-conditional[style*="display: none"]{
  display:none !important;
}

/* Hinweistext im Conditional */
.mj3-conditional .additional-information{
  margin:0 0 12px 0;
  font-size:.95rem;
  color:#4d6a69;
  background:#fff;
  border:1px solid #e3eeee;
  border-radius:6px;
  padding:10px 12px;
}

/* Label-Abstände im Conditional */
.mj3-conditional > label{
  display:block;
  margin:0 0 12px 0;
}

/* Grid für Kinder-Daten */
.mj3-conditional .child-row{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin:8px 0 12px;
}
@media (max-width:900px){
  .mj3-conditional .child-row{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px){
  .mj3-conditional .child-row{ grid-template-columns:1fr; }
}

.mj3-form a:not(.mj3-add)::before,
.mj3-form a:not(.mj3-add)::after{
  content:none !important;
  background:none !important;
  position:static !important;
  box-shadow:none !important;
}

/* 3) .mj3-add selbst: sicher inline-flex + mittig */
.mj3-add{
  display:inline-flex !important;
  align-items:center !important;
  gap:.5rem !important;
  line-height:1 !important;
  vertical-align:middle !important;

  /* Deko aus, falls Theme noch was setzt */
  text-decoration:none !important;
  box-shadow:none !important;
  background-image:none !important;
  border:1px solid transparent;         /* für hübsches Hover */
  padding:.25rem .4rem;
  border-radius:.5rem;
  color:#31827e;
}
.mj3-add:hover{
  background:#f0fbfa;
  border-color:#a8cfcc;
}

/* 4) Plus-Kreis robust zentrieren – alles vom Theme zurücksetzen und neu aufbauen */
.mj3-add::before{
  all: initial;                          /* killt Theme-Einfluss (Positionierung/Offsets etc.) */
  content:"+";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.25rem;
  height:1.25rem;
  border-radius:50%;
  background:#31827e;
  color:#fff;
  font-weight:700;
  font-size:1rem;
  line-height:1;
  /* Feintuning falls optisch 1px versetzt wirkt: */
  /* transform:translateY(.5px); */
}

/* 5) Falls das Theme auf allen Links noch ein ::after setzt – hier explizit weg bei .mj3-add */
.mj3-add::after{
  content:none !important;
  background:none !important;
  box-shadow:none !important;
  position:static !important;
}
.mj3-add.disabled{
  opacity:.5;
  cursor:not-allowed;
}

/* Inputs im Conditional (leicht kompakter) */
.mj3-conditional .mj3-input{ min-height:2.5rem; }

/* ========== „fehlt“-Bubble sichtbar machen ========== */

/* Labels/Gruppen als Positionierungsbasis und ohne Clipping */
.mj3-stage label{ position:relative; overflow:visible; }
.mj3-group{ position:relative; }

.mj3-bubble{
  position:absolute !important;
  top:auto !important;
  bottom:calc(80%) !important;  /* oberhalb des Feldes */
  left:50% !important;
  transform:none !important;

  display:inline-flex !important;      /* nur so breit wie Inhalt */
  align-items:center;
  gap:.35rem;
  background:#e74c3c;
  color:#fff;
  font-size:.85rem;
  line-height:1;
  padding:.35rem .5rem;
  border-radius:.4rem;
  pointer-events:none;
  white-space:nowrap;
  z-index:999;
}

/* … aber der Pfeil sitzt UNTER der Bubble und zeigt nach unten */
.mj3-bubble::after{
  content:'';
  position:absolute;
  top:100%;                            /* unter der Bubble */
  left:50%;                            /* mittig unter der Bubble */
  transform:translateX(-50%);
  width:0;height:0;
  border-style:solid;
  border-width:8px;
  border-color:#e74c3c transparent transparent transparent; /* Pfeil nach unten */
}

.additional-information{
  display:block;                           /* Span wird Block */
  margin:8px 24px 12px;                    /* bündig zu Step-Inhalt */
  padding:10px 12px;
  background:#f7fbfb;
  border:1px solid #e3eeee;
  border-radius:6px;
  color:#4d6a69;
}
.additional-information h4{
  margin:0;
  font-size:1rem;
  font-weight:700;
  color:#31827e;
  letter-spacing:.01em;
}

/* ===== Radio-Gruppe „Befristung“: Box + sauberes Wrapping lang(er) Texte ===== */
.mj3-stage .mj3-group{
  margin:12px 24px 20px;
  padding:12px 16px;
  border-radius:6px;
}
.mj3-stage .mj3-group .mj3-lab{
  display:block;
  margin:0 0 10px;
  color:#404040;
  font-weight:700;
  line-height:1.2;
}

/* Jede Option als eigene Zeile, Radios oben links ausgerichtet, Text wrappt sauber */
.mj3-stage .mj3-group .option{
  display:flex;
  align-items:flex-start;                  /* Radio oben an langen Text ausrichten */
  gap:.5rem;
  margin:0 0 .5rem 0;
  color:#707070;
  line-height:1.35;
  word-break:break-word;
  hyphens:auto;
}
.mj3-stage .mj3-group .option:last-child{ margin-bottom:0; }
.mj3-stage .mj3-group .option input[type="radio"]{
  flex:0 0 auto;
  margin-top:.15em;                        /* optische Feinjustierung */
}

/* Mobile Abstände etwas kompakter */
@media (max-width:560px){
  .additional-information{ margin:8px 16px 12px; }
  .mj3-stage .mj3-group{ margin:12px 16px 20px; padding:12px; }
}

.mj3-form a,
.mj3-form a:hover,
.mj3-form a:focus,
.mj3-form a:visited{
  text-decoration:none !important;
  box-shadow:none !important;   
}
.mj3-files{
  margin:12px 24px;
  padding:12px;
  background:#fff;
  border:1px solid #e8e8e8;
  border-radius:8px;
}
.mj3-files .file-row{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:8px 0;
  border-bottom:1px dashed #e6e6e6;
}
.mj3-files .file-row:last-child{ border-bottom:none; }

/* Mach die nativen File-Inputs kompakt (übersteuert dein globales .mj3-file) */
.mj3-files .mj3-file{
  border:none !important;
  background:transparent !important;
  padding:0 !important;
  width:auto !important;
  min-height:2rem !important;
}

.mj3-form .file-remove{
  all: unset;
  display:inline-grid;
  place-items:center;
  width:28px; height:28px;
  box-sizing:border-box;
  background:#fafafa;
  border:1px solid #d7d7d7;
  border-radius:50%;
  color:#707070;
  cursor:pointer;
  padding:0 !important;
  position:relative;
  font-size:0;                  /* Text „×“ ausblenden (Aria-Label bleibt) */
}

.mj3-form .file-remove::before,
.mj3-form .file-remove::after{
  content:"";
  position:absolute;
  left:50%; top:50%;
  width:12px; height:2px;       /* Strichstärke */
  background:currentColor;
  transform-origin:center;
}
.mj3-form .file-remove::before{ transform:translate(-50%,-50%) rotate(45deg); }
.mj3-form .file-remove::after { transform:translate(-50%,-50%) rotate(-45deg); }
/* Aktionen (Plus-Link) bündig wie Inhalt */
.files-actions{
  padding:0 24px 8px;
}
@media (max-width:560px){
  .mj3-files{ margin:12px 16px; padding:10px; }
  .files-actions{ padding:0 16px 8px; }
}

.mj3-form :is(h1,h2,h3,h4,h5,h6){
  all: unset;                 /* killt praktisch alle Theme-Zuweisungen */
  display:block;              /* nach unset sicherstellen */
  box-sizing:border-box;
  margin:0 !important;
  padding:0 !important;
  background:none !important;
  border:0 !important;
  text-shadow:none !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  color:inherit;              /* Basis erbt erstmal vom Container */
  line-height:1.25;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
/* falls Themes Pseudo-Elemente an Headings hängen */
.mj3-form :is(h1,h2,h3,h4,h5,h6)::before,
.mj3-form :is(h1,h2,h3,h4,h5,h6)::after{
  content:none !important;
}

/* 2) Deine eigenen Heading-Styles (nur im Formular) */
.mj3-form h1,
.mj3-form h2,
.mj3-form h3,
.mj3-form h4,
.mj3-form h5,
.mj3-form h6{
  font-family:'Arial', sans-serif !important;
  color:#303030;          /* Grundfarbe für H2–H6; H1 bekommt unten seine eigene */
}

/* H1 wie von dir gewünscht */
.mj3-form h1{
  font-weight:400 !important;                  /* „normal“ */
  color:#31827e !important;
  margin-bottom:3rem !important;
  width:100%;
  /* responsive Größe wie in deinem Code */
  font-size:clamp(24px, calc(24px + 10 * (100vw - 300px) / 1200), 34px) !important;
}

/* H2–H4 wie in deinem Code */
.mj3-form h2{
  font-weight:400 !important;
  font-size:140% !important;
  margin:2rem 0 1rem !important;
}
.mj3-form h3{
  font-size:120% !important;
  margin:2rem 0 1rem !important;
  width:100%;
}
.mj3-form h4{
  font-size:110% !important;
  margin:1.5rem 0 1.5rem !important;
  width:100%;
}

/* 3) Links IN Headings sollen deine Farben erben und nicht unterstrichen werden */
.mj3-form :is(h1,h2,h3,h4,h5,h6) a{
  color:inherit !important;
  text-decoration:none !important;
  box-shadow:none !important;
  background-image:none !important;
  border:0 !important;
}

/* 4) Optional: den Formular-Container selbst definieren, damit color erbt */
.mj3-form{
  color:#303030;
}

.mj3-form .mj-step{ --gutter:24px; }
@media (max-width:560px){
  .mj3-form .mj-step{ --gutter:16px; }
}

/* 2) Seitliches Padding für „freie“ Inhalte direkt auf Step-Ebene
      (Headings, Fließtext, Labels, Zusatzboxen) */
.mj3-form .mj-step > :where(.mj3-page-title,h1,h2,h3,h4,h5,h6,label,p,.additional-information){
  padding-left:var(--gutter) !important;
  padding-right:var(--gutter) !important;
}

/* 3) Rows (Grid-Zeilen) bekommen ebenfalls Gutter 
.mj3-form .mj3-row{
  padding-left:var(--gutter) !important;
  padding-right:var(--gutter) !important;
}
*/
/* 4) Gruppenboxen (mit Border) richten wir über Außenabstand aus,
      damit die Boxkante bündig mit dem Rest steht
      (keine zusätzliche Innen-„Gutter“-Doppelung) */
.mj3-form .mj3-stage .mj3-group{
  margin-left:var(--gutter) !important;
  margin-right:var(--gutter) !important;
  /* deine Innen-Polster bleiben wie gehabt: */
  /* padding:12px 16px; kommt ja schon aus deiner CSS */
}

/* 5) Überschreibe deinen Headings-Reset gezielt:
      Erlaube wieder Padding auf Headings (dein Reset hatte padding:0 !important) */
.mj3-form :is(h1,h2,h3,h4,h5,h6){
  /* kein explizites padding:0 !important hier – wir wollen Gutter zulassen */
  padding: initial !important;  /* neutralisiert das !important=0 aus dem Reset */
}

/* 1) Standard-Listen im Formular neu definieren */
.mj3-form ul,
.mj3-form ol{
  /* statt 50px nur moderat einrücken */
  padding-left: 0rem !important;      /* oder 0, wenn du gar keinen Einzug willst */
  padding-inline-start: 0rem !important; /* RTL-sicher */
  margin-left: 0 !important;
  list-style-position: outside;           /* normale Bullets */
}

/* 2) Verschachtelte Listen bekommen erneut einen moderaten Einzug */
.mj3-form ul ul,
.mj3-form ol ol{
  padding-left: 1.25rem !important;
  padding-inline-start: 1.25rem !important;
  margin: .25rem 0 0;
}
.mj3-form.is-switching .mj3-footer .mj-progress-inline .mj-progress{
  transition: none !important;
}