/* ============================================================
 * Gemeinsame Formular-Bausteine
 * ============================================================ */

/* Hinweis zur verschlüsselten Übertragung, unter den Absende-Knopf */
.ssl-hinweis {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 0;
  font-family: var(--sans, sans-serif);
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--ink-mute, #8A8A92);
}
.ssl-hinweis svg {
  width: 13px; height: 13px; flex: 0 0 auto;
  stroke: #1d6b3a; stroke-width: 2; fill: none;
}
.ssl-hinweis span { line-height: 1.4; }

@media (max-width: 480px) {
  .ssl-hinweis { font-size: 10px; letter-spacing: 1px; }
}

/* Honigtopf — für Menschen und Vorleseprogramme unsichtbar,
   Bots füllen ihn trotzdem aus. */
.hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* Rückmeldung unter dem Absende-Knopf */
.form-hinweis {
  margin: 12px 0 0;
  font-family: var(--sans, sans-serif);
  font-size: 13.5px; line-height: 1.5;
}
.form-hinweis:empty { display: none; }
.form-hinweis.ok {
  color: #1d6b3a; background: rgba(29, 107, 58, .08);
  padding: 12px 14px; border-radius: 10px; border-left: 3px solid #1d6b3a;
}
.form-hinweis.fehler {
  color: var(--red-deep, #A00D24); background: rgba(200, 16, 46, .07);
  padding: 12px 14px; border-radius: 10px; border-left: 3px solid var(--red, #C8102E);
}

input.field.fehlerhaft,
select.field.fehlerhaft,
textarea.field.fehlerhaft {
  border-color: var(--red, #C8102E);
  background: rgba(200, 16, 46, .04);
}

/* ============================================================
 * Umschalter „Ich biete" / „Ich suche"
 * ------------------------------------------------------------
 * Ersetzt die frühere Überschrift „Kostenlose Bewertung" über
 * dem Kontaktformular der Startseite.
 * ============================================================ */
.kf-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin: 0 0 26px;
  background: var(--cream-2, #EFEBE4);
  border-radius: 12px;
}

.kf-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-mute, #8A8A92);
  transition: background .22s ease, color .22s ease, box-shadow .22s ease;
}

.kf-tab:hover { color: var(--ink, #1B1B1F); }

.kf-tab.aktiv {
  background: var(--paper, #fff);
  color: var(--red, #C8102E);
  box-shadow: 0 1px 3px rgba(27, 27, 31, .09);
}

.kf-tab:focus-visible { outline: 2px solid var(--red, #C8102E); outline-offset: 2px; }

/* Drei Felder in einer Reihe (Fläche, Grundstück, Baujahr) */
.form-row.kf-drei { grid-template-columns: 1fr 1fr 1fr; }

/* Auswahlfelder auf die Optik der Textfelder bringen */
select.field {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A8A92' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}

/* Auswahl der Immobilienarten im Modus „Ich suche" */
.kf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.kf-chips label {
  position: relative;
  display: inline-flex;
}

.kf-chips input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}

.kf-chips span {
  display: block;
  padding: 10px 17px;
  border: 1px solid var(--line, #E4E0D6);
  border-radius: 100px;
  background: var(--cream, #FAF7F2);
  font-family: var(--sans, sans-serif);
  font-size: 13px;
  color: var(--ink-soft, #55555C);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.kf-chips input:checked + span {
  border-color: var(--red, #C8102E);
  background: rgba(200, 16, 46, .06);
  color: var(--red, #C8102E);
  font-weight: 500;
}

.kf-chips input:focus-visible + span { outline: 2px solid var(--red, #C8102E); outline-offset: 2px; }

@media (max-width: 720px) {
  .kf-tabs { margin-bottom: 20px; }
  .kf-tab { padding: 12px 6px; font-size: 11px; letter-spacing: 1.2px; }
  .form-row.kf-drei { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .form-row.kf-drei { grid-template-columns: 1fr; }
}
