/* IBMH WPForms-Styling — gescoped auf WPForms-Container innerhalb der Content-Bereiche
 * (lädt nur auf Seiten mit [wpforms]-Shortcode). Bricht keine globalen WPForms-Styles. */

.entry-content .wpforms-container,
.wp-block-post-content .wpforms-container {
  --ibmh-blue-700: #1848a0;
  --ibmh-blue-600: #1f63c4;
  --ibmh-blue-500: #1e9fe9;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(24, 72, 160, 0.10);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(13, 43, 99, 0.08);
  padding: clamp(1.6rem, 3.5vw, 3rem);
  margin: 1.75rem 0;
  box-sizing: border-box;
}
/* Falls das Formular doch in einer .dg-card steckt: keine doppelte Box */
.entry-content .dg-card .wpforms-container,
.wp-block-post-content .dg-card .wpforms-container {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

/* Formular-Titel/Beschreibung bleiben aus (title="false"), Sicherheitsnetz: */
.entry-content .wpforms-container .wpforms-title,
.entry-content .wpforms-container .wpforms-description { display: none; }

.entry-content .wpforms-container .wpforms-field { padding: 0.55rem 0; }
.entry-content .wpforms-container .wpforms-field-label {
  font-weight: 600;
  color: #14233d;
  margin-bottom: 0.35rem;
}
.entry-content .wpforms-container .wpforms-field-sublabel { color: #67718a; }

.entry-content .wpforms-container input[type="text"],
.entry-content .wpforms-container input[type="email"],
.entry-content .wpforms-container input[type="tel"],
.entry-content .wpforms-container input[type="number"],
.entry-content .wpforms-container select,
.entry-content .wpforms-container textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(24, 72, 160, 0.18);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.7rem 0.95rem;
  font-size: 1rem;
  line-height: 1.4;
  color: #14233d;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.entry-content .wpforms-container textarea { min-height: 9rem; }
/* Maus-/Touch-Fokus: ruhige Hervorhebung (unveraendert). */
.entry-content .wpforms-container input:focus,
.entry-content .wpforms-container select:focus,
.entry-content .wpforms-container textarea:focus {
  outline: none;
  border-color: var(--ibmh-blue-700);
  box-shadow: 0 0 0 3px rgba(30, 159, 233, 0.20);
}

/* Tastaturfokus (2026-07-27): Der obige Zustand allein erfuellte WCAG 2.4.11 nicht —
 * rgba(30,159,233,0.20) auf Weiss ergibt ~1,2:1 Kontrast, also praktisch unsichtbar.
 * Deshalb ein durchgezogener Ring in IBMH-Blau 700 (#1848a0, ~9:1 gegen Weiss).
 * Bewusst :focus-visible: Hover-, Maus- und Fehlerzustaende bleiben unangetastet.
 * outline (nicht box-shadow) folgt dem border-radius und ueberlebt den Kontrastmodus.
 *
 * !important nur auf outline-*: WPForms setzt den Fokus-Outline in eigenen Regeln der
 * Form `div.wpforms-container-full input[type="email"]:focus` (Spezifitaet 0,3,2) zurueck
 * und laedt nach diesem Stylesheet. Ohne !important greift der Ring auf allen
 * getypten input-Feldern und select nicht (verifiziert 2026-07-27, Chromium + WebKit).
 * Ein Spezifitaetswettlauf ueber alle input[type=…] waere bruechiger als diese Zeile. */
.entry-content .wpforms-container input:focus-visible,
.entry-content .wpforms-container select:focus-visible,
.entry-content .wpforms-container textarea:focus-visible,
.entry-content .wpforms-container a:focus-visible,
/* u. a. der Laendervorwahl-Umschalter des Telefonfelds (intl-tel-input) */
.entry-content .wpforms-container button:focus-visible {
  outline: 3px solid var(--ibmh-blue-700) !important;
  outline-offset: 2px !important;
  border-color: var(--ibmh-blue-700);
}

/* Checkboxen/Radios sind klein — zusaetzlicher heller Aussenring, damit der Fokus
 * auch auf getoentem Untergrund als zusammenhaengende Flaeche erkennbar bleibt. */
.entry-content .wpforms-container input[type="checkbox"]:focus-visible,
.entry-content .wpforms-container input[type="radio"]:focus-visible {
  outline: 3px solid var(--ibmh-blue-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.95);
}

/* Der Submit-Button ist selbst IBMH-Blau — ein blauer Ring waere dort unsichtbar.
 * Weisser Innenring + blauer Aussenring traegt auf hellem wie blauem Untergrund. */
.entry-content .wpforms-container .wpforms-submit:focus-visible,
.entry-content .wpforms-container button[type="submit"]:focus-visible {
  outline: 3px solid var(--ibmh-blue-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #ffffff !important;
}

.entry-content .wpforms-container .wpforms-submit,
.entry-content .wpforms-container button[type="submit"] {
  background: var(--ibmh-blue-700) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem !important;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.entry-content .wpforms-container .wpforms-submit:hover,
.entry-content .wpforms-container button[type="submit"]:hover {
  background: var(--ibmh-blue-600) !important;
  transform: translateY(-2px);
}

/* Fehler-/Bestätigungszustände */
.entry-content .wpforms-container label.wpforms-error {
  color: #b3261e;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.entry-content .wpforms-container input.wpforms-error,
.entry-content .wpforms-container select.wpforms-error,
.entry-content .wpforms-container textarea.wpforms-error { border-color: #b3261e; }
.entry-content .wpforms-confirmation-container-full,
.wp-block-post-content .wpforms-confirmation-container-full {
  background: #e7f3fc;
  border: 1px solid rgba(24, 72, 160, 0.25);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  color: #14233d;
}

@media (max-width: 700px) {
  .entry-content .wpforms-container { padding: 1.2rem; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .entry-content .wpforms-container input,
  .entry-content .wpforms-container select,
  .entry-content .wpforms-container textarea,
  .entry-content .wpforms-container .wpforms-submit { transition: none; }
}

/* Name-Kombifeld (Vorname/Nachname) bündig zur linken Feldkante und volle Zeilenbreite.
 * WPForms-Core (wpforms-full.min.css, lädt NACH dieser Datei) setzt auf der Zeile
 * `.wpforms-container .wpforms-field .wpforms-field-row { justify-content: space-between }`
 * (gleiche Spezifität wie ein reines .wpforms-field-row-Ziel, gewinnt per Ladereihenfolge)
 * sowie `max-width: 60%` via Feldgröße "medium" (.wpforms-field-medium). Ergebnis: der erste
 * Teilblock rückt ~0.8rem ein und die Zeile ist schmaler als die Vollbreite-Felder. Deshalb
 * hier BEWUSST das zusätzliche `.wpforms-field` im Selektor: hebt die Spezifität über den
 * Core-Selektor (0,4,0 > 0,3,0), sodass justify-content/max-width/width sauber gewinnen —
 * ohne pauschales !important. Die Teilblöcke füllen die Zeile per flex gleichmäßig. */
.entry-content .wpforms-container .wpforms-field .wpforms-field-row,
.wp-block-post-content .wpforms-container .wpforms-field .wpforms-field-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.8rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.entry-content .wpforms-container .wpforms-field .wpforms-field-row > .wpforms-field-row-block,
.wp-block-post-content .wpforms-container .wpforms-field .wpforms-field-row > .wpforms-field-row-block {
  float: none;
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
/* WPForms-Core fügt an der Zeile Clearfix-Pseudos (content:""; display:table) fürs alte
 * Float-Layout ein. Im Flex-Kontext werden diese zu 0-Breite-Phantom-Flex-Items, wodurch der
 * gap VOR dem ersten Block (Einrückung) und HINTER dem letzten entsteht — die eigentliche
 * Ursache des Vorname-Versatzes. Im Flex-Layout nicht mehr benötigt, daher deaktivieren. */
.entry-content .wpforms-container .wpforms-field .wpforms-field-row::before,
.entry-content .wpforms-container .wpforms-field .wpforms-field-row::after,
.wp-block-post-content .wpforms-container .wpforms-field .wpforms-field-row::before,
.wp-block-post-content .wpforms-container .wpforms-field .wpforms-field-row::after {
  display: none;
}
@media (max-width: 600px) {
  /* align-items:stretch überschreibt WPForms-Core (align-items:start), sonst schrumpfen die
   * gestapelten Teilblöcke auf Content-Breite statt volle Zeilenbreite zu füllen. */
  .entry-content .wpforms-container .wpforms-field .wpforms-field-row,
  .wp-block-post-content .wpforms-container .wpforms-field .wpforms-field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
}
/* Anti-Spam-Honeypot darf nie sichtbar werden (Sicherheitsnetz gegen CSS-/Minify-Ausfälle) */
.wpforms-container .wpforms-field-hp { display: none !important; }

/* Datei-Upload-Dropzone: WPForms liefert die Hinweistexte in #777 bzw. #949494 auf Weiss.
 * Gemessen 4,47:1 und 3,03:1 — beides unter den 4,5:1 fuer Fliesstext (WCAG 1.4.3),
 * von Lighthouse auf /karriere/ als einziger A11y-Fehler gemeldet (2026-07-27).
 * Auf die vorhandenen IBMH-Textfarben angehoben; reine Farbkorrektur, keine Layoutwirkung.
 * !important, weil WPForms die Farben spezifischer setzt
 * (div.wpforms-container-full .wpforms-field-file-upload .wpforms-uploader .modern-title). */
.entry-content .wpforms-container .wpforms-uploader .dz-message .modern-title,
.entry-content .wpforms-container .wpforms-uploader .dz-message .modern-title span {
  color: #14233d !important;
}
.entry-content .wpforms-container .wpforms-uploader .dz-message .modern-hint,
.entry-content .wpforms-container .wpforms-uploader .dz-message .modern-hint span {
  color: #51607a !important;
}
