/* ================================
   LGA – WPForms Theme Bridge (clean)
   ================================ */

.wpforms-container{
  --fld-bg: var(--card);
  --fld-text: var(--text);
  --fld-muted: var(--muted);
  --fld-border: var(--border);
  --fld-focus: var(--fdp-cyan);
  --fld-radius: 12px;
  --fld-pad: 12px 14px;
  --fld-gap: 20px;
}

/* Grundlayout / Labels */
.wpforms-container .wpforms-form{ color:var(--fld-text); }
.wpforms-container .wpforms-field{ margin:0 0 18px; }
.wpforms-container .wpforms-field-label{ display:block; font-weight:600; margin:0 0 8px; color:var(--fld-text); }
.wpforms-container .wpforms-field-sublabel,
.wpforms-container .wpforms-field-description,
.wpforms-container .wpforms-required-label{ color:var(--fld-muted); font-size:.9rem; }

/* ---------- 2-Spalten-Layout (eine Quelle der Wahrheit) ---------- */
.wpforms-container .wpforms-field-row{
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: var(--fld-gap);
  row-gap: 14px;
  align-items:start;
}
.wpforms-container .wpforms-field-row > .wpforms-field-row-block{
  float:none !important; clear:none !important;
  width:auto !important; max-width:none !important; min-width:0 !important;
  margin:0 !important; padding:0 !important; box-sizing:border-box !important;
  display:flex !important; flex-direction:column; gap:8px;
  grid-column: auto / span 1 !important;
}
/* Utility-Breiten des Plugins neutralisieren */
.wpforms-container .wpforms-field-row .wpforms-one-half,
.wpforms-container .wpforms-field-row .wpforms-one-third,
.wpforms-container .wpforms-field-row .wpforms-two-thirds,
.wpforms-container .wpforms-field-row .wpforms-first,
.wpforms-container .wpforms-field-row .wpforms-last{
  float:none !important; width:auto !important; max-width:none !important; margin:0 !important;
}

/* Mobile: 1 Spalte */
@media (max-width:720px){
  .wpforms-container .wpforms-field-row{ grid-template-columns:1fr !important; column-gap:0; }
}

/* ---------- Inputs / Textareas / Selects ---------- */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="url"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="number"],
.wpforms-container input[type="date"],
.wpforms-container input[type="password"],
.wpforms-container input[type="search"],
.wpforms-container textarea,
.wpforms-container select{
  width:100%;
  min-height:46px;
  background-color: var(--fld-bg) !important; /* dunkel – auch wenn leer */
  color:var(--fld-text) !important;
  border:1px solid var(--fld-border) !important;
  border-radius:var(--fld-radius) !important;
  padding:var(--fld-pad) !important;
  line-height:1.35;
  outline:none !important; box-shadow:none !important;
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
/* in 2er-Zeilen: keine min-width-Zwänge */
.wpforms-container .wpforms-field-row input,
.wpforms-container .wpforms-field-row select,
.wpforms-container .wpforms-field-row textarea{
  min-width:0 !important;
}

.wpforms-container textarea{ min-height:140px; resize:vertical; }
.wpforms-container input::placeholder,
.wpforms-container textarea::placeholder{ color: color-mix(in srgb, var(--fld-muted) 80%, transparent); }

/* Fokus */
.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus{
  border-color: var(--fld-focus) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fld-focus) 30%, transparent) !important;
}

/* Browser-Autofill abdunkeln */
.wpforms-container input:-webkit-autofill,
.wpforms-container textarea:-webkit-autofill,
.wpforms-container select:-webkit-autofill{
  -webkit-text-fill-color: var(--fld-text) !important;
  box-shadow: 0 0 0 1000px var(--fld-bg) inset !important;
  transition: background-color 9999s ease-out, color 9999s ease-out !important;
}

/* Größenklassen (60%-Deckel) aufheben */
.wpforms-container input.wpforms-field-small,
.wpforms-container select.wpforms-field-small,
.wpforms-container textarea.wpforms-field-small,
.wpforms-container input.wpforms-field-medium,
.wpforms-container select.wpforms-field-medium,
.wpforms-container textarea.wpforms-field-medium,
.wpforms-container input.wpforms-field-large,
.wpforms-container select.wpforms-field-large,
.wpforms-container textarea.wpforms-field-large{
  max-width:100% !important;
}

/* ---------- Radios / Checkboxes ---------- */
.wpforms-container .wpforms-field-checkbox li,
.wpforms-container .wpforms-field-radio li{
  display:flex; align-items:center; gap:10px; margin:6px 0; color:var(--fld-text);
}
.wpforms-container .wpforms-field-checkbox input[type="checkbox"],
.wpforms-container .wpforms-field-radio input[type="radio"]{ accent-color: var(--fld-focus); }

/* ---------- Image Choices (modern) dunkel ---------- */
.wpforms-container .wpforms-image-choices-modern .wpforms-image-choices-item,
.wpforms-container .wpforms-image-choices-modern .wpforms-image-choices-item label{
  background: var(--fld-bg) !important;
  color: var(--fld-text) !important;
  border: 1px solid var(--fld-border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.wpforms-container .wpforms-image-choices-modern .wpforms-image-choices-label{
  background: var(--fld-bg) !important; color: var(--fld-text) !important; box-shadow:none !important; border:0;
}
.wpforms-container .wpforms-image-choices-modern .wpforms-image-choices-item:hover label{
  transform: translateY(-1px); border-color: var(--fld-focus) !important;
}
.wpforms-container .wpforms-image-choices-modern .wpforms-image-choices-item input:checked + label{
  border-color: var(--fld-focus) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fld-focus) 30%, transparent) !important;
}

/* ---------- Fehlerzustände ---------- */
.wpforms-container .wpforms-error,
.wpforms-container .wpforms-field .wpforms-error{ color:#ff6b6b; }
.wpforms-container .wpforms-field input.wpforms-error,
.wpforms-container .wpforms-field textarea.wpforms-error,
.wpforms-container .wpforms-field select.wpforms-error{
  border-color:#ff6b6b !important;
  box-shadow:0 0 0 3px color-mix(in srgb, #ff6b6b 30%, transparent) !important;
}

/* ---------- Submit-Button: euer Verlauf ---------- */
.wpforms-container .wpforms-submit-container .wpforms-submit{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 18px; min-height:44px;
  border:1px solid transparent; border-radius:999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--fdp-yellow) 75%, var(--bg)) 0%,
    color-mix(in srgb, var(--fdp-cyan) 75%, var(--bg)) 50%,
    color-mix(in srgb, var(--fdp-magenta) 75%, var(--bg)) 100%);
  color: color-mix(in srgb, var(--bg) 92%, #000);
  font-weight:700; cursor:pointer;
  box-shadow: var(--shadow-strong, 0 6px 24px rgba(0,0,0,.25));
  transition: transform .1s ease, box-shadow .18s ease, filter .18s ease;
}

/* Cool Hover Effekt für den Submit-Button */
.wpforms-container .wpforms-submit-container .wpforms-submit {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform .15s ease, box-shadow .3s ease;
}

/* Leichtes „Anheben“ */
.wpforms-container .wpforms-submit-container .wpforms-submit:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

/* animierter Glanz-Effekt */
.wpforms-container .wpforms-submit-container .wpforms-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.35),
    transparent
  );
  transform: skewX(-20deg);
  transition: left .6s ease;
  z-index: -1;
}

.wpforms-container .wpforms-submit-container .wpforms-submit:hover::before {
  left: 100%;
}



/*==== FIX 1 === */

/* WPForms: Clearfix-Pseudo-Elemente in Grid-Reihen abschalten */
.wpforms-container .wpforms-field-row::before,
.wpforms-container .wpforms-field-row::after {
  content: none !important;
  display: none !important;
}

/* 2-Spalten-Grid ohne Reordering */
.wpforms-container .wpforms-field-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: var(--fld-gap);
  row-gap: 14px;
  align-items: start;
  grid-auto-flow: row !important; /* sicherstellen: kein 'dense' */
}

/* Kinder immer genau 1 Spalte belegen */
.wpforms-container .wpforms-field-row > .wpforms-field-row-block {
  grid-column: auto / span 1 !important;
  min-width: 0 !important;
}
