.hintergrund.grau {
    background-color: #ececec;
    aspect-ratio: unset !important;
}

/*.site-main:has(.wpcf7) {
    background: #fff;
}

.page-section:has(.wpcf7) {
    max-width: 100%;
    padding: 22px 23px;
    text-align: left;
}*/

.page-section .wpcf7,
.page-section .wpcf7-form {
    text-align: left;
}

/*
.page-section .wp-block-heading,
.page-section h1 {
    color: #07445f;
}*/

/* Kontaktformular Layout */
.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.form-left {
    flex: 1 1 66%;
    max-width: 768px;
    min-width: 300px;
}

.form-right {
    flex: 1 1 260px;
    min-width: 240px;
}

.form-right > p:first-child,
.form-right strong {
    font-weight: bold;
}

.wpcf7-form label {
    display: block;
    font-weight: 400;
}

/* Eingabefelder Styling */
.wpcf7-form-control-wrap input,
.wpcf7-form-control-wrap select,
.wpcf7-form-control-wrap textarea {
    width: 100%;
    font-size: 14px;
    box-sizing: border-box;
}

.wpcf7-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.wpcf7-form select,
.wpcf7-form textarea {
    display: block;
    width: 100%;
    padding: 13px 26px;
    margin-top: 12px;
    border: 1px solid rgba(189, 189, 189, 0.2);
    border-radius: 12px;
    background-color: #f5f5f5;
    box-shadow: none;
    outline: none;
    line-height: 1.5;
    min-height: 49px;
}

textarea {
    resize: vertical;
    min-height: 132px;
}

/* Telefonfelder */
.telefon-row {
    margin-top: -25px;	
}

.telefon-fields {
    display: flex;
    gap: 10px;
    align-items: center;
}

.telefon-fields select {
    flex: 0 0 130px;
}

.telefon-fields input[type="tel"] {
    flex: 1;
}

[data-name="your-telefon"] {
    flex: 1;
}

/* Checkboxen untereinander */
.wpcf7-list-item {
    display: block;
    margin: 4px 0;
}

.wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.wpcf7-form input[type="checkbox"],
.wpcf7-form input[type="radio"] {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    display: inline-block;
    width: 20px !important;
    min-width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 2px solid #07445f;
    border-radius: 6px;
    background: #fff;
    vertical-align: middle;
}

.wpcf7-form input[type="radio"] {
    border-radius: 50%;
}

.wpcf7-form input[type="checkbox"]:checked::before {
    content: "✓";
    display: block;
    color: #07445f;
    font-size: 15px;
    font-weight: 900;
    line-height: 16px;
    text-align: center;
}

.wpcf7-form input[type="radio"]:checked::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    margin: 4px;
    border-radius: 50%;
    background: #07445f;
}

/* Formular Footer / Absende-Button */
.form-footer {
    margin-top: 20px;
}

.form-footer input[type="submit"] {
    background-color: #07445f;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
}

.form-footer input[type="submit"]:hover {
    background-color: #055080;
}

/* Optional: kleinere Abst�nde / Zusatzfelder */
.p {
    margin-top: -25px;	
}

.firmendaten {
    margin-top: 20px;
    font-size: 14px;
}

.name-row {
    display: flex;
    gap: 10px; /* Abstand zwischen Vor- und Nachname */
    flex-wrap: wrap; /* Falls Bildschirm zu klein wird */
}

.firstname-field {
    flex: 1; /* Stra�e bekommt mehr Platz */
}
/* TABLET + MOBILE */
@media (max-width: 980px) {
  .form-container {
    flex-direction: column;
    gap: 28px;
  }

  .form-left,
  .form-right {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .telefon-fields {
    flex-direction: column;
    gap: 8px;
  }

  .telefon-fields select {
    flex: 1 1 auto;
  }

  .name-row {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .wpcf7-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  .wpcf7-form select,
  .wpcf7-form textarea {
    padding: 10px 18px;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .form-footer input[type="submit"] {
    width: 100%;
    padding: 14px;
  }
}
.lastname-field {
    flex: 1; /* Hausnummer kleiner */
}

/* Optional: Eingabefelder weiterhin volle Breite innerhalb ihres Containers */
.firstname-field input,
.lastname-field input {
    width: 100%;
}

.strasse-hausnummer-row {
    display: flex;
    gap: 10px; /* Abstand zwischen Stra�e und Hausnummer */
    flex-wrap: wrap; /* Falls Bildschirm zu klein wird */
}

.strasse-field {
    flex: 2; /* Stra�e bekommt mehr Platz */
    min-width: 150px;
}

.hausnummer-field {
    flex: 1; /* Hausnummer kleiner */
    min-width: 80px;
}

/* Optional: Eingabefelder weiterhin volle Breite innerhalb ihres Containers */
.strasse-field input,
.hausnummer-field input {
    width: 100%;
}

.plz-ort-row {
    display: flex;
    gap: 10px; /* Abstand zwischen PLZ und Ort */
    flex-wrap: wrap; /* Falls Bildschirm zu klein wird */
}

.plz-field {
    flex: 1; /* PLZ kleiner */
    min-width: 80px;
}

.ort-field {
    flex: 2; /* Ort bekommt mehr Platz */
    min-width: 150px;
}

#ort-vorschlaege .ort-select-dropdown {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Stil f�r den optionalen Hinweis */
#ort-vorschlaege p {
    font-weight: bold;
    color: #07445f; /* Passend zur �berschrift */
}

/* Container f�r die Vorschl�ge positionieren */
#ort-vorschlaege-liste {
    position: relative;
    /* Damit die Liste �ber andere Elemente gelegt werden kann */
    z-index: 10; 
}

/* Stil der einzelnen Vorschl�ge (die wie Dropdown-Optionen aussehen) */
.ort-vorschlag-item {
    display: block;
    padding: 8px 10px;
    background-color: #fff; /* Wei�er Hintergrund */
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 1em;
    line-height: 1.2;
    margin-top: -1px; /* R�nder �berlappen, um eine durchgehende Linie zu erzeugen */
}

/* Nur der oberste Vorschlag erh�lt einen oberen Rand */
.ort-vorschlag-item:first-child {
    margin-top: 0;
    border-top-width: 1px;
}

/* Hover-Effekt f�r bessere Benutzerf�hrung */
.ort-vorschlag-item:hover {
    background-color: #f1f1f1;
}

/* Stil f�r den Fall, dass die Vorschlagsliste aktiv ist */
.ort-vorschlaege-aktiv .ort-vorschlag-item {
    /* Optional: F�gt einen leichten Schatten hinzu, damit es wie ein Popover wirkt */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

/* --- Styling f�r Dropdown-�hnliche Vorschl�ge --- */

/* 1. Der Wrapper muss relativ sein, damit die Vorschlagsliste absolut positioniert werden kann */
.suggestion-wrapper {
    position: relative;
    /* Stellt sicher, dass das Eingabefeld die volle Breite beibeh�lt */
    display: block; 
}

/* 2. Styling der Vorschlagsliste selbst */
.suggestion-list {
    position: absolute; /* �berlagert das Formular */
    top: 100%; /* Beginnt direkt unter dem Eingabefeld */
    left: 0;
    z-index: 1000; /* Stellt sicher, dass es �ber anderen Elementen liegt */
    width: 100%;
    max-height: 200px;
    overflow-y: auto; /* Scrollbar, falls viele Vorschl�ge */
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none; /* Keine Standard-Listenpunkte */
    padding: 0;
    margin-top: -1px; /* Kleiner �berlapp, damit die R�nder verschmelzen */
}

/* 3. Styling f�r die einzelnen Vorschlagselemente (Land/Ort) */
.country-vorschlag-item,
.ort-vorschlag-item {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
    transition: background-color 0.2s;
}

/* 4. Hover-Effekt f�r bessere Benutzerf�hrung */
.country-vorschlag-item:hover,
.ort-vorschlag-item:hover {
    background-color: #f0f0f0;
}

@media (max-width: 900px) {
    .page-section:has(.wpcf7) {
        padding: 18px 16px;
    }

    .form-container {
        gap: 24px;
    }

    .form-left,
    .form-right {
        max-width: none;
        flex-basis: 100%;
    }
}
