
#leadForm {
  position: relative;
}

/* Inaktive Schritte auf Hoehe 0 klemmen: sonst ragt ein hoeherer, unsichtbarer
   Schritt unter den Footer und erzeugt dort eine weisse Flaeche.
   Kein display:none, damit matchHeight und Fade-in weiter funktionieren. */
.lead-page {
  opacity: 0;
  transition: opacity 0s ease-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.lead-page.active {
  opacity: 1;
  transition: opacity 0.3s ease-in;
  position: relative;
  height: auto;
  overflow: visible;
  pointer-events: auto;
}

/*PDF-Reader*/
.pdf-preview-canvas{
    overflow:auto;
    touch-action:none;
}

/*Stoerer*/
.stoerer {
    width: clamp(100px, 18vw, 170px);
    aspect-ratio: 1 / 1;

    color: #fff;

    border-radius: 50%;

    /* !important: Stoerer soll auf keiner Bildschirmgroesse mehr ausgeblendet
       werden - schlaegt auch Bootstrap-Klassen wie d-none / d-md-flex */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;

    /* weniger Padding = mehr nutzbarer Raum */
    padding: 0.35em;

    /* etwas stärkere Skalierung */
    font-size: clamp(0.7rem, 1.4vw, 1.1rem);
}

/* Mobil groesser: 18vw bzw. 1.4vw laufen dort in das Minimum (100px / 0.7rem) */
@media (max-width: 767.98px) {
    .stoerer {
        width: clamp(130px, 36vw, 170px);
        font-size: clamp(0.85rem, 3.7vw, 1.1rem);
    }
}

/* Sehr kleine Screens: ab 130px Mindestbreite passt der Stoerer nicht mehr neben
   den Inhalt und bricht nach unten um - hier wieder proportional schrumpfen,
   aber nie kleiner als der alte Stand (100px / 0.7rem) */
@media (max-width: 400px) {
    .stoerer {
        width: clamp(100px, 30vw, 120px);
        font-size: clamp(0.7rem, 3.1vw, 0.8rem);
    }
}

/* kleiner Text oben */
.stoerer .small-text {
    font-size: 1em;
    line-height: 1.05;
}

/* Preis deutlich dominanter */
.stoerer .big {
    font-size: 3.2em;
    font-weight: 700;
    line-height: 0.95;
}

/* Im Flex-Stoerer erzeugt ein <br> hinter .big eine Leerzeile (Chrome, Safari) */
.stoerer .big + br {
    display: none !important;
}

/*Anrede-Buttons*/
.check-icon {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.btn-check:checked + .btn .check-icon {
    opacity: 1;
}

/*Info-Bubbles*/
.c2f-popover{
    position: absolute;
    z-index: 9999;
    display: none;
    width: 280px;
    max-width: calc(100vw - 30px);
    background: #fff;
    border-radius: 12px;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
}

.popover-header{
    font-weight: 700;
    margin-bottom: 10px;
}

.c2f-info-trigger{
    margin-top:-30px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

/*Feld-Abhaengigkeiten-Logik*/
.lead-page.dependency-hidden {
    display: none !important;
}

/*Checks bei C2F-Feldern*/
.c2f-option-wrapper {
    position: relative;
}

.c2f-selected-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
    z-index: 2;
}

/* Check-Icon anzeigen */
.c2f-option-wrapper input:checked + label .c2f-selected-icon {
    opacity: 1;
    visibility: visible;
}

/*Date-Picker*/
.datepicker {
  position: absolute;
  top:10px;
  left: 0;
  width: 280px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  padding: 10px;
  z-index: 999;
}

.hidden {
  display: none;
}

.dp-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dp-header select {
  width: 48%;
  padding: 5px;
}

.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 12px;
  text-align: center;
  margin-bottom: 5px;
  opacity: 0.6;
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.dp-day {
  text-align: center;
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
}

.dp-day:hover {
  background: #eee;
}

.dp-day.selected {
  background: #2f6fed;
  color: white;
}

/*Barrierefreiheit*/
.btn:focus-visible, .btn-anrede:focus-visible{
    outline: 2px solid #0d6efd;
    outline-offset: 3px;
}
html[data-input-method="keyboard"] .btn-check:focus + .btn {
    outline: 2px solid blue;
}

html[data-input-method="mouse"] .btn-check:focus + .btn {
    outline: none;
}

/*Start-Button mobil: weisser Balken ueber volle Breite am unteren Rand (nur Schritt 0, Klasse setzt form-composer.js)*/
@media (max-width: 767.98px) {
    #nextBtnBar.fc-start-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        z-index: 1030;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #fff;
        padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 12px rgba(0,0,0,.12);
    }
    /* Button fuellt den Balken bis auf das umgebende Padding aus */
    #nextBtnBar.fc-start-bar #nextBtn {
        width: 100%;
    }
    /* Platz schaffen, damit der Balken keinen Seiteninhalt (Footer) verdeckt */
    body.fc-start-fixed {
        padding-bottom: 90px;
    }
}
.form-select.is-valid,
.form-select.is-invalid {
    background-size:
        1.1rem auto,
        1.1rem 1.1rem;
}