/* =========================================================
   Umfrage / Webform-Wizard Fixes (Leserbefragung)
   ========================================================= */

/* --- 1. Fortschrittsleiste: aktueller Schritt in Oblaten-Rot --- */
.webform-submission-form .webform-progress-tracker .progress-step.is-active .progress-marker::before,
.webform-submission-form .webform-progress-tracker .progress-step.is-active:hover .progress-marker::before {
  background-color: #bb0000;
}
.webform-submission-form .webform-progress-tracker .progress-title[role="link"] {
  color: #bb0000;
}
.webform-submission-form .webform-progress-tracker .progress-title[role="link"]:hover,
.webform-submission-form .webform-progress-tracker .progress-title[role="link"]:focus {
  color: #8f0000;
}
.webform-submission-form .webform-progress-tracker .progress-step.is-complete:hover .progress-marker[role="link"]:before {
  background-color: #8f0000;
}

/* --- 2. Fortschritts-Kreise nicht mehr über dem Header beim Scrollen --- */
.webform-submission-form .webform-progress {
  position: relative;
  z-index: 0;
}

/* --- 3. Likert-Tabelle: einheitliche Schrift, Felder mittig --- */
.webform-submission-form .webform-likert-table th,
.webform-submission-form .webform-likert-table td:first-child label {
  font-size: 0.875rem;
  font-weight: 600;
  word-break: normal;
  overflow-wrap: normal;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.webform-submission-form .webform-likert-table th,
.webform-submission-form .webform-likert-table td {
  vertical-align: middle;
}
@media (min-width: 769px) {
  .webform-submission-form .webform-likert-table td .form-check {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
  }
  .webform-submission-form .webform-likert-table td .form-check .form-check-input {
    margin: 0;
  }
}

/* --- 4. Likert auf Mobil sichtbar machen (Webform blendet die
       Tabelle mit .sticky-header unter 768px komplett aus) --- */
@media (max-width: 768px) {
  .webform-submission-form .form-type-webform-likert table.webform-likert-table.sticky-header {
    display: table;
  }
  .webform-submission-form .form-type-webform-likert td .form-check {
    margin-bottom: 0.25rem;
  }
  .webform-submission-form .form-type-webform-likert td:first-child label {
    margin-top: 0.75rem;
  }
}

/* --- 5. Radios: .form-switch-Optik entfernen – runde Radio-Buttons,
       Oblaten-Rot wenn ausgewählt --- */
.webform-submission-form .js-form-type-radio.form-check.form-switch {
  align-items: center;
  padding-left: 0;
}
.webform-submission-form .js-form-type-radio.form-check.form-switch .form-check-input[type="radio"] {
  flex-shrink: 0;
  float: none;
  width: 1.25em;
  height: 1.25em;
  margin: 0 0.5em 0 0;
  padding: 0;
  border: var(--bs-border-width, 1px) solid #adb5bd;
  background-color: #fff;
  border-radius: 50%;
  background-image: none;
  background-position: center;
  vertical-align: -0.2em;
  appearance: none;
}
.webform-submission-form .js-form-type-radio.form-check.form-switch .form-check-input[type="radio"]:checked {
  background-color: #bb0000;
  border-color: #bb0000;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}
.webform-submission-form .form-check-input[type="radio"]:focus {
  border-color: #bb0000;
  box-shadow: 0 0 0 0.25rem rgba(187, 0, 0, 0.25);
}

/* --- 6. Checkboxen (z. B. Werte-Auswahl): sauberer Schalter,
       Oblaten-Rot wenn aktiv --- */
.webform-submission-form .form-check.form-switch .form-check-input[type="checkbox"] {
  flex-shrink: 0;
  float: none;
  width: 2rem;
  height: 1rem;
  min-width: 2rem;
  margin: 0 0.5em 0 0;
  padding: 0;
  border: var(--bs-border-width, 1px) solid #adb5bd;
  background-color: #fff;
  border-radius: 2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23adb5bd'/%3e%3c/svg%3e");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
  transition: background-position 0.15s ease-in-out;
  vertical-align: -0.15em;
  appearance: none;
}
.webform-submission-form .form-check.form-switch .form-check-input[type="checkbox"]:checked {
  background-color: #bb0000;
  border-color: #bb0000;
  background-position: right center;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
.webform-submission-form .form-check.form-switch .form-check-input[type="checkbox"]:focus {
  border-color: #bb0000;
  box-shadow: 0 0 0 0.25rem rgba(187, 0, 0, 0.25);
}

/* --- 7. Zurück / Nächstes nebeneinander --- */
.webform-submission-form .form-actions {
  display: flex;
  gap: 1rem;
}
.webform-submission-form .form-actions .webform-button--previous,
.webform-submission-form .form-actions .webform-button--next,
.webform-submission-form .form-actions .webform-button--submit {
  width: auto;
  flex: 1 1 50%;
  margin: 0;
}
