/* BauPragma Webseite 3.0 - Anpassungen fuer WordPress, Elementor und WPForms.
   Nur wirksam, wenn <body class="w3-wp"> (setzt das Plugin auf Seiten der Webseite 3.0). Alle Werte aus den Tokens von w3.css. */

/* Elementor: Shortcode- und HTML-Widgets ohne eigene Abstaende, die Bausteine bringen ihre Abstaende mit.
   Zusaetzlich in Elementor: Website-Einstellungen > Layout > Widget-Abstand 0, Container ohne Innenabstand, Inhaltsbreite "volle Breite". */
body.w3-wp .elementor-widget.elementor-widget-shortcode,
body.w3-wp .elementor-widget.elementor-widget-html { margin-block-end: 0; }
body.w3-wp .elementor-widget-shortcode > .elementor-widget-container,
body.w3-wp .elementor-widget-html > .elementor-widget-container { margin: 0; padding: 0; }
body.w3-wp .elementor-widget-shortcode .elementor-shortcode { display: block; }

/* Angemeldete Redakteure: die feste Kopfleiste sitzt unter der WordPress-Adminleiste */
body.admin-bar.w3-wp .w3-kopf { top: 32px; }
@media (max-width: 782px) { body.admin-bar.w3-wp .w3-kopf { top: 46px; } }

/* Hinweis fuer Administratoren, wenn ein Baustein fehlt (andere sehen nichts) */
.w3-wp-fehler { margin: 16px; padding: 12px 16px; border-radius: var(--w3-r-feld, 14px); background: rgba(179, 38, 30, .08); color: var(--w3-fehler, #B3261E); font: 500 14px/1.4 var(--w3-font, system-ui, sans-serif); }

/* WPForms im Stil der Vorschau (Felder wie .w3-feld__eingabe). Klassen laut WPForms-Standardausgabe; nach dem ersten Test im Browser pruefen. */
.w3-formular--wp { max-width: 640px; }
.w3-formular--wp .wpforms-container { margin: 0; }
.w3-formular--wp .wpforms-form .wpforms-field-container { display: grid; gap: 20px; }
.w3-formular--wp .wpforms-field { padding: 0; margin: 0; }
.w3-formular--wp .wpforms-field-label { display: block; margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--w3-text, #1D1D1F); }
.w3-formular--wp .wpforms-field-sublabel { font-size: 14px; color: var(--w3-text-2, #515154); }
.w3-formular--wp .wpforms-required-label { color: var(--w3-text-2, #515154); font-weight: 400; }
.w3-formular--wp .wpforms-field input[type="text"],
.w3-formular--wp .wpforms-field input[type="email"],
.w3-formular--wp .wpforms-field input[type="tel"],
.w3-formular--wp .wpforms-field textarea {
  width: 100%; max-width: 100%; min-height: 52px; padding: 14px 16px; box-sizing: border-box;
  border: 1px solid var(--w3-linie, #D2D2D7); border-radius: var(--w3-r-feld, 14px); background: #fff;
  font: 400 17px/1.3 var(--w3-font, system-ui, sans-serif); color: var(--w3-text, #1D1D1F);
  box-shadow: none; appearance: none; -webkit-appearance: none;
}
.w3-formular--wp .wpforms-field textarea { min-height: 148px; resize: vertical; }
.w3-formular--wp .wpforms-field input:hover,
.w3-formular--wp .wpforms-field textarea:hover { border-color: #AEAEB2; }
.w3-formular--wp .wpforms-field input:focus,
.w3-formular--wp .wpforms-field textarea:focus { outline: none; border-color: var(--w3-blau, #0D5DB8); box-shadow: 0 0 0 4px rgba(13, 93, 184, .18); }
.w3-formular--wp .wpforms-field .wpforms-error,
.w3-formular--wp label.wpforms-error { display: block; margin-top: 6px; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--w3-fehler, #B3261E); }
.w3-formular--wp input.wpforms-error,
.w3-formular--wp textarea.wpforms-error { border-color: var(--w3-fehler, #B3261E); }
.w3-formular--wp .wpforms-submit-container { margin: 20px 0 0; padding: 0; }
.w3-formular--wp button.wpforms-submit {
  min-height: 52px; padding: 0 32px; border: 0; border-radius: var(--w3-r-pille, 980px);
  background: var(--w3-blau, #0D5DB8); color: #fff; font: 600 17px/1 var(--w3-font, system-ui, sans-serif); cursor: pointer;
}
.w3-formular--wp button.wpforms-submit:hover { background: var(--w3-blau-dunkel, #0A4A94); }
.w3-formular--wp button.wpforms-submit:focus-visible { outline: 3px solid var(--w3-blau, #0D5DB8); outline-offset: 3px; }
.w3-formular--wp .wpforms-confirmation-container-full { padding: 16px 20px; border: 0; border-radius: var(--w3-r-feld, 14px); background: rgba(27, 127, 59, .1); color: #145C2B; font-size: 16px; font-weight: 500; }
/* Honeypot-Feld von WPForms bleibt unsichtbar (WPForms setzt es selbst, hier nur zur Sicherheit) */
.w3-formular--wp .wpforms-field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Hinweis unter dem Absenden-Knopf (Feld "Inhalt/HTML" im Formular, Klasse w3-feld__hinweis) */
.w3-formular--wp .w3-feld__hinweis { margin-top: 12px; font-size: 14px; line-height: 1.4; color: var(--w3-text-2, #515154); }
.w3-formular--wp .w3-feld__hinweis a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .w3-formular--wp button.wpforms-submit { width: 100%; } }

/* Header in WordPress: gezielte Absicherung gegen Theme-/Elementor-Regeln.
   important nur fuer Bildmasse und Linkfarben, die CMS-Styles ueberschreiben. */
html body header.w3-kopf {
  font-family: var(--w3-font, Inter, sans-serif);
  line-height: 1.5;
}
html body header.w3-kopf a.w3-kopf__logo img.w3-logo {
  height: 26px !important;
  width: auto !important;
  max-width: none;
  max-height: 26px;
  display: block;
}
html body header.w3-kopf ul.w3-nav__liste {
  list-style: none;
  margin: 0;
  padding: 0;
}
html body header.w3-kopf .w3-nav__liste > li { margin: 0; padding: 0; }
html body header.w3-kopf a.w3-nav__link {
  color: inherit !important;
  text-decoration: none;
  font-family: inherit;
}
html body header.w3-kopf a.w3-knopf {
  color: #fff !important;
  text-decoration: none;
  font-family: inherit;
}
html[data-w3-kopfthema="dunkel"] body header.w3-kopf:not([data-w3-kopf-thema="hell"]) a.w3-knopf,
html body header.w3-kopf[data-w3-kopf-thema="dunkel"] a.w3-knopf {
  background: #fff;
  color: var(--w3-navy, #0B1E33) !important;
}
html body header.w3-kopf[data-w3-kopf-thema="dunkel"] {
  background: #0B1E33;
  color: #fff;
  box-shadow: none;
}
html body header.w3-kopf[data-w3-kopf-thema="dunkel"] img.w3-logo {
  filter: brightness(0) invert(1);
}
html body header.w3-kopf[data-w3-kopf-thema="hell"] {
  background: #fff;
  color: #1D1D1F;
}
html body header.w3-kopf[data-w3-kopf-thema="hell"] img.w3-logo { filter: none; }
html body header.w3-kopf[data-w3-kopf-thema="hell"] a.w3-knopf { background: #0D5DB8; }
html body header.w3-kopf[data-w3-kopf-thema="dunkel"] a.w3-knopf:hover { background: #E8F1FB; }
/* Ohne JS: gleiche kompakte Desktop-Geometrie, Navigation bleibt erreichbar. */
@media (min-width: 861px) {
  html:not(.w3-js) body header.w3-kopf {
    height: 52px;
    padding-block: 0;
  }
  html:not(.w3-js) body header.w3-kopf .w3-kopf__innen { height: 100%; flex-wrap: nowrap; }
  html:not(.w3-js) body header.w3-kopf ul.w3-nav__liste { gap: clamp(18px, 2.6vw, 36px); }
  html:not(.w3-js) body header.w3-kopf a.w3-nav__link { height: 52px; }
}
@media (max-width: 860px) {
  html.w3-js body header.w3-kopf[data-w3-kopf-thema="dunkel"] .w3-nav { background: #0B1E33; }
}
/* Mobile Rohbau-Beschriftungen: keine ueberbreiten Einzeiler am rechten Rand. */
@media (max-width: 600px) {
  .w3-rohbau__etiketten .w3-rohbau__etikett,
  .w3-rohbau__statisch .w3-rohbau__etikett {
    box-sizing: border-box;
    max-width: min(168px, calc(100% - 16px));
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.3;
    padding: 4px 7px;
  }
}