/* ------------------------------------
   Regio-Bau Formulare
------------------------------------ */

.icoForm {
  width: 100%;
  color: #666;
}


/* ------------------------------------
   Formularvarianten
------------------------------------ */

.icoForm .form-expose,
.icoForm .form-capital {
  width: 100%;
  margin: 0;
}


/* Das Kapitalanlage-Modal nutzt dieselbe
   ausgewogene Breite wie das Exposé-Modal. */
.ico-modal-content:has(.form-capital) {
  width: min(100%, 760px);
  max-width: 760px;
}


/* ------------------------------------
   Überschriften
------------------------------------ */

.icoForm h4 {
  max-width: calc(100% - 74px);

  margin: 0 0 30px;

  color: #666;

  font-size: clamp(22px, 2.1vw, 29px);
  font-weight: 400;
  line-height: 1.18;
}


/* Kapitalanlage-Headline */
.icoForm .form-capital h4 {
  max-width: calc(100% - 76px);

  margin-bottom: 28px;

  font-size: clamp(23px, 2vw, 29px);
  line-height: 1.18;
}


/* Zeile „Dein Wunschobjekt“ */
.icoForm > form > p:first-of-type {
  margin: 0 0 8px;

  color: #666;

  font-size: 15px;
  line-height: 1.4;
}


/* Objekttitel im Exposé-Formular */
.icoForm .form-expose h4 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.16;
}


/* ------------------------------------
   Allgemeines Feldraster
------------------------------------ */

.icoForm .wrapFds {
  width: 100%;
}


.icoForm .flxLe,
.icoForm .flxRi {
  width: auto;
  min-width: 0;
  margin: 0;
}


/* ------------------------------------
   Exposé-Formular
------------------------------------ */

/* Links Kontaktdaten, rechts Nachricht */
.icoForm .form-expose .wrapFds {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 0 24px;
}


.icoForm .form-expose .flxRi {
  display: flex;
}


.icoForm .form-expose .flxRi textarea {
  flex: 1;

  min-height: 306px;
}


/* ------------------------------------
   Kapitalanlageformular
------------------------------------ */

/*
 * Beide bestehenden Feldcontainer werden
 * für das Layout transparent. Dadurch bilden
 * alle sechs Felder ein gemeinsames Raster:
 *
 * Anrede          Vorname
 * Name            E-Mail
 * Telefonnummer   Zeitfenster
 */
.icoForm .form-capital .wrapFds {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 14px 24px;
}


.icoForm .form-capital .flxLe,
.icoForm .form-capital .flxRi {
  display: contents;
}


/* Im Grid werden die Abstände ausschließlich
   über gap gesteuert. */
.icoForm .form-capital input,
.icoForm .form-capital select {
  margin-bottom: 0;
}


/* ------------------------------------
   Eingabefelder
------------------------------------ */

.icoForm input,
.icoForm select,
.icoForm textarea {
  display: block;

  width: 100%;

  margin: 0 0 14px;
  padding: 12px 14px;

  border: 1px solid #ededed;
  border-radius: 0;

  background-color: #efefef;
  color: #555;

  font: inherit;
  line-height: 1.35;

  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}


/* Einheitliche Höhe der einzeiligen Felder */
.icoForm input:not([type="checkbox"]),
.icoForm select {
  min-height: 50px;
}


/* Select-Platzhalter */
.icoForm select:required:invalid {
  color: #777;
}


.icoForm select option {
  color: #222;
  background-color: #fff;
}


/* Nachricht */
.icoForm textarea {
  resize: vertical;
}


/* Fokuszustand */
.icoForm input:focus,
.icoForm select:focus,
.icoForm textarea:focus {
  outline: none;

  border-color: #3470c6;
  background-color: #fff;

  box-shadow:
    0 0 0 3px rgba(52, 112, 198, 0.14);
}


/* Sichtbarer Tastaturfokus */
.icoForm input:focus-visible,
.icoForm select:focus-visible,
.icoForm textarea:focus-visible,
.icoForm button:focus-visible,
.icoForm a:focus-visible,
.ico-cls:focus-visible {
  outline: 2px solid #3470c6;
  outline-offset: 3px;
}


/* Fehlerzustand erst nach Absendeversuch */
.icoForm .form-submitted input:invalid,
.icoForm .form-submitted select:invalid,
.icoForm .form-submitted textarea:invalid {
  border-color: #c62828;
  background-color: #fff6f6;
}


/* ------------------------------------
   Checkboxen
------------------------------------ */

.icoForm .checkbox-label {
  display: flex;
  align-items: flex-start;

  width: 100%;
  max-width: 100%;

  margin: 16px 0 0;

  color: #5f5f5f;

  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;

  cursor: pointer;
}


.icoForm .checkbox-label + .checkbox-label {
  margin-top: 10px;
}


/* Im Kapitalanlageformular etwas mehr Abstand
   zwischen Felderraster und erster Checkbox */
.icoForm .form-capital .checkbox-label {
  margin-top: 18px;
}


.icoForm .form-capital .checkbox-label + .checkbox-label {
  margin-top: 10px;
}


/* Checkbox selbst */
.icoForm .checkbox-label input[type="checkbox"],
.icoForm input.icoChk {
  flex: 0 0 auto;

  width: 19px;
  height: 19px;

  margin: 1px 11px 0 0;
  padding: 0;

  border: 1px solid #777;

  transform: none;

  accent-color: #3470c6;

  cursor: pointer;
}


/* Datenschutzzeile */
.icoForm .checkbox-label.icoChkLnk {
  align-items: flex-start;

  font-size: 14px;
  line-height: 1.45;
}


.icoForm .checkbox-label span {
  display: inline;
  min-width: 0;
}


/* Datenschutzlink */
.icoForm .checkbox-label a.lnkDts {
  margin-right: 0.18em;

  color: #111;

  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}


.icoForm .checkbox-label a.lnkDts:hover {
  color: #3470c6;
}


/* Unsichtbares Honeypot-Feld */
.icoForm .noDis {
  display: none !important;
}


/* ------------------------------------
   Absende-Button
------------------------------------ */

.icoForm .wrpSnd {
  margin-top: 24px;
}


.icoForm .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 190px;
  min-height: 50px;
  height: auto;

  margin: 0;
  padding: 12px 22px;

  border: 2px solid #3470c6;
  border-radius: 0;

  background-color: transparent;
  color: #3470c6;

  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;

  text-align: center;
  text-transform: uppercase;

  cursor: pointer;

  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}


.icoForm .form-capital .button {
  min-width: 230px;
}


.icoForm .button.fill {
  border-color: #3470c6;

  background-color: #3470c6;
  color: #fff;

  text-shadow: none;
}


.icoForm .button.fill:hover {
  border-color: #3470c6;

  background-color: #fff;
  color: #3470c6;
}


.icoForm .button:disabled {
  opacity: 0.65;
  cursor: wait;
}


/* ------------------------------------
   Statusmeldungen
------------------------------------ */

.icoForm .form-success,
.icoForm .form-error {
  margin: 0;
  padding: 16px 18px;

  font-size: 16px;
  line-height: 1.5;
}


.icoForm .form-success {
  border-left: 4px solid #2e7d32;

  background-color: #f1f8f2;
  color: #245c28;
}


.icoForm .form-error {
  border-left: 4px solid #c62828;

  background-color: #fff4f4;
  color: #8e1b1b;
}


/* ------------------------------------
   Schließen-Button
------------------------------------ */

.ico-cls {
  appearance: none;
  -webkit-appearance: none;

  position: absolute;
  z-index: 5;

  top: 16px;
  right: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  min-width: 50px;
  height: 50px;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background-color: #fff;
  color: #3470c6;

  font-family: Arial, sans-serif;
  font-size: 31px;
  font-weight: 700;
  line-height: 1;

  box-shadow:
    0 2px 7px rgba(0, 0, 0, 0.22);

  cursor: pointer;

  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}


.ico-cls:hover {
  background-color: #3470c6;
  color: #fff;

  transform: scale(1.04);

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.25);
}


/* ------------------------------------
   Tablet und kleinere Fenster
------------------------------------ */

@media screen and (max-width: 767px) {
  .ico-modal-content:has(.form-capital) {
    width: 100%;
    max-width: none;
  }


  .icoForm h4,
  .icoForm .form-capital h4 {
    max-width: calc(100% - 54px);

    margin-bottom: 24px;

    font-size: clamp(21px, 5.6vw, 27px);
    line-height: 1.22;
  }


  /* Beide Formulare einspaltig */
  .icoForm .form-expose .wrapFds,
  .icoForm .form-capital .wrapFds {
    grid-template-columns: 1fr;
    gap: 12px;
  }


  /*
   * Die Container bleiben beim Kapitalanlageformular
   * transparent, damit die ursprüngliche Feldreihenfolge
   * auch mobil erhalten bleibt.
   */
  .icoForm .form-capital .flxLe,
  .icoForm .form-capital .flxRi {
    display: contents;
  }


  .icoForm .form-expose .wrapFds {
    gap: 0;
  }


  .icoForm .form-expose .flxRi textarea {
    min-height: 170px;
  }


  .icoForm input,
  .icoForm select,
  .icoForm textarea {
    margin-bottom: 12px;
  }


  /* Kapitalanlage nutzt Grid-Abstände */
  .icoForm .form-capital input,
  .icoForm .form-capital select {
    margin-bottom: 0;
  }


  .icoForm .checkbox-label,
  .icoForm .checkbox-label.icoChkLnk {
    width: 100%;

    font-size: 13px;
  }


  .icoForm .form-capital .checkbox-label {
    margin-top: 16px;
  }


  .icoForm .form-capital .checkbox-label + .checkbox-label {
    margin-top: 10px;
  }


  .icoForm .wrpSnd {
    margin-top: 22px;
  }


  .icoForm .button,
  .icoForm .form-capital .button {
    width: 100%;
    min-width: 0;
  }


  .ico-cls {
    top: 12px;
    right: 12px;

    width: 44px;
    min-width: 44px;
    height: 44px;

    font-size: 27px;
  }
}


/* ------------------------------------
   Kleine Smartphones
------------------------------------ */

@media screen and (max-width: 420px) {
  .icoForm h4,
  .icoForm .form-capital h4 {
    max-width: calc(100% - 46px);

    font-size: 20px;
    line-height: 1.25;
  }


  .icoForm input,
  .icoForm select,
  .icoForm textarea {
    padding: 11px 12px;

    font-size: 14px;
  }


  .icoForm input:not([type="checkbox"]),
  .icoForm select {
    min-height: 47px;
  }


  .icoForm .checkbox-label,
  .icoForm .checkbox-label.icoChkLnk {
    font-size: 12.5px;
  }


  .ico-cls {
    width: 40px;
    min-width: 40px;
    height: 40px;

    font-size: 25px;
  }
}