/* ============================================================
   OEM-ANFRAGEFORMULAR (Fluent Forms)

   Punkt 7 und 8 des OEM-Vorschlags vom 24.11.2026, freigegeben am
   25.11.2026. Eine Maske für zwei Anliegen: die erste Frage entscheidet,
   ob die technischen Felder eines OEM-Projekts erscheinen oder die
   Angaben eines Händlers. Die Umschaltung macht Fluent Forms selbst
   über seine bedingte Logik, hier steht nur das Aussehen.

   Alles ist auf .berg-oem-formular beschränkt. Diese Klasse setzt
   inc/oem-formular.php über den Filter fluentform/form_wrapper_classes
   an die Hülle der fünf OEM-Formulare. Die Gestaltung hängt damit nicht
   an einer Formular-ID, die lokal und live auseinanderläuft.

   Felder, Ankreuzfelder, Schaltfläche und Meldungen sind aus
   anfrage-formular.css übernommen, damit beide Formulare auf der Seite
   gleich aussehen. Eigen sind nur die Karte, die Abschnittsmarken und
   die Auswahlkacheln.
   ============================================================ */

/* ---------- Karte ---------- */

.berg-oem-anfrage {
  container-type: inline-size;
}

.berg-oem-formular {
  /* Fluent Forms setzt sein Fehlerrot auf :root. #f56c6c schafft auf
     Weiß keine 4,5:1, deshalb hier ein dunkleres Rot für dieses Formular. */
  --fluentform-danger: #B3261E;

  max-width: 760px;
  margin-inline: auto;
  padding: 40px 44px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ---------- Abschnittsmarken ---------- */

.berg-oem-formular .berg-oem-schritt {
  margin: 36px 0 20px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

/* Die erste Marke steht am Kartenanfang und braucht keine Trennlinie.
   :first-child reicht hier nicht: Fluent Forms setzt vor der ersten Gruppe
   seine versteckten Felder, und die zaehlen mit. */
.berg-oem-formular .berg-oem-schritt.is-erste {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.berg-oem-formular .berg-oem-schritt span {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--berg-blue);
}

/* ---------- Einwilligungshaken ---------- */

.berg-oem-formular .berg-oem-consent .ff-el-form-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--gray-700);
  cursor: pointer;
}

.berg-oem-formular .berg-oem-consent .ff-el-form-check-input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--berg-blue);
}

/* ---------- Auswahl als Kacheln (Anliegen und Branding) ---------- */

.berg-oem-formular .ff-el-form-check:has(input[type="radio"]) {
  margin: 0;
}

.berg-oem-formular .ff-el-input--content:has(input[type="radio"]) {
  display: grid;
  gap: 10px;
}

.berg-oem-formular .ff-el-form-check:has(input[type="radio"]) .ff-el-form-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--gray-700);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.berg-oem-formular .ff-el-form-check:has(input[type="radio"]) .ff-el-form-check-label:hover {
  border-color: var(--berg-blue);
}

.berg-oem-formular .ff-el-form-check:has(input[type="radio"]:checked) .ff-el-form-check-label {
  border-color: var(--berg-blue);
  box-shadow: inset 0 0 0 1px var(--berg-blue);
  background: rgba(20, 103, 183, 0.04);
  color: var(--gray-900);
}

.berg-oem-formular .ff-el-form-check:has(input[type="radio"]:focus-visible) .ff-el-form-check-label {
  outline: 2px solid var(--berg-blue);
  outline-offset: 2px;
}

.berg-oem-formular .ff-el-form-check input[type="radio"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--berg-blue);
}

/* ---------- Felder allgemein ---------- */

.berg-oem-formular .ff-el-group {
  margin-bottom: 22px;
}

.berg-oem-formular .ff-el-group:last-child {
  margin-bottom: 0;
}

.berg-oem-formular .ff-el-input--label label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--gray-900);
}

.berg-oem-formular .ff-el-input--label {
  margin-bottom: 8px;
}

.berg-oem-formular .ff-el-tooltip svg {
  fill: var(--gray-500);
}

.berg-oem-formular .ff-el-form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-900);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.berg-oem-formular select.ff-el-form-control {
  cursor: pointer;
}

.berg-oem-formular .ff-el-form-control:hover:not(:disabled) {
  border-color: var(--gray-500);
}

.berg-oem-formular .ff-el-form-control:focus {
  border-color: var(--berg-blue);
  box-shadow: 0 0 0 3px rgba(30, 110, 187, 0.18);
  outline: none;
}

/* Deaktiviert heißt nicht unlesbar: In der Anwendungsliste steht hier der
   Hinweis, dass zuerst ein Gas dran ist. */
.berg-oem-formular .ff-el-form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: not-allowed;
}

.berg-oem-formular .ff-el-form-control::placeholder {
  color: var(--gray-500);
  opacity: 1;
}

.berg-oem-formular textarea.ff-el-form-control {
  min-height: 120px;
  resize: vertical;
}

/* Einheiten-Anhang (%, Nm³/h, bar) umbruchfest an das Feld anschließen. */
.berg-oem-formular .ff_input-group {
  display: flex;
  align-items: stretch;
}

.berg-oem-formular .ff_input-group .ff-el-form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.berg-oem-formular .ff_input-group:has(.ff-el-form-control:focus) {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(30, 110, 187, 0.18);
}

.berg-oem-formular .ff_input-group:has(.ff-el-form-control:focus) .ff-el-form-control {
  box-shadow: none;
}

.berg-oem-formular .ff_input-group:has(.ff-el-form-control:focus) .ff_input-group-text {
  border-color: var(--berg-blue);
}

.berg-oem-formular .ff_input-group-text {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-700);
  white-space: nowrap;
}

/* Absenden sieht aus wie .berg-btn--primary auf der restlichen Seite.
   Die Klasse selbst lässt sich nicht anhängen, weil Fluent Forms das
   Markup erzeugt, also hier dieselben Werte. */
.berg-oem-formular .ff-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  background: var(--berg-blue);
  color: var(--white);
  border: 2px solid transparent;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}

.berg-oem-formular form.frm-fluent-form .ff-btn-submit:hover {
  background: var(--berg-blue-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 110, 187, 0.35);
}

.berg-oem-formular .ff-btn-submit:focus-visible {
  outline: 2px solid var(--berg-blue-darker);
  outline-offset: 2px;
}

/* ---------- Meldungen ---------- */

.berg-oem-formular .error.text-danger,
.berg-oem-formular .ff-el-is-error .text-danger {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 600;
}

.berg-oem-formular .ff-el-is-error .ff-el-form-check-label {
  color: var(--gray-700);
}

.berg-oem-formular .ff-message-success {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--berg-blue-pale);
  border-left: 4px solid var(--berg-blue);
  border-radius: 6px;
  color: var(--gray-900);
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 600px) {
  .berg-oem-formular {
    padding: 24px 20px;
    border-radius: 10px;
  }

  .berg-oem-formular .ff-btn-submit {
    width: 100%;
    white-space: normal;
  }

}

@media (prefers-reduced-motion: reduce) {
  .berg-oem-formular .ff-el-form-control,
  .berg-oem-formular .ff-btn-submit,
  .berg-oem-formular .ff-el-form-check-label {
    transition: none;
  }

}


