/* Kontaktformular – genutzt von index.html (weiße Karte im roten Kontaktblock)
   und von kontakt.php (Fehlerseite). Keine CSS-Variablen, keine externen Ressourcen. */

.kform {
  position: relative;
  background: #fff;
  color: #1c1c1c;
  text-align: left;
  border-radius: 18px;
  padding: 34px 36px 30px;
  box-shadow: 0 24px 70px #3a10204d;
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- Fehlerübersicht oben ---------- */
.kf-summary {
  margin: 0 0 26px;
  padding: 16px 18px;
  border: 2px solid #9b1c1c;
  border-radius: 10px;
  background: #fbf1f1;
}
.kf-summary:focus { outline: 3px solid #7b1e22; outline-offset: 3px; }
.kform .kf-summary .kf-sum-title {
  font-size: 1rem;
  font-weight: 700;
  color: #8a1717;
  margin: 0 0 6px;
}
.kform .kf-summary p { margin: 0 0 6px; color: #3b1414; font-size: .92rem; }
.kform .kf-summary ul { margin: 0; padding-left: 20px; }
.kform .kf-summary li { margin: 3px 0; font-size: .92rem; color: #3b1414; }
.kf-summary a { color: #8a1717; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Felder ---------- */
.kf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
}
.kf-field { display: flex; flex-direction: column; min-width: 0; }
.kf-full { grid-column: 1 / -1; }
.kform .kf-field[hidden] { display: none; }

.kform label,
.kf-choice legend {
  font-size: .9rem;
  font-weight: 600;
  color: #1c1c1c;
  margin-bottom: 7px;
}
.kf-opt { font-weight: 400; color: #6b6b6b; }

.kform input[type="text"],
.kform input[type="email"],
.kform input[type="tel"],
.kform select,
.kform textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem; /* 16 px: kein Auto-Zoom auf iOS */
  color: #1c1c1c;
  background: #faf6f1;
  border: 1.5px solid #d9cccc;
  border-radius: 9px;
  transition: border-color .2s, background-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.kform textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.kform select {
  padding-right: 42px;
  text-overflow: ellipsis; /* lange Hochschulnamen im geschlossenen Feld */
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%237b1e22' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.kform input:hover,
.kform select:hover,
.kform textarea:hover { border-color: #b9a3a3; }
.kform input:focus,
.kform select:focus,
.kform textarea:focus {
  outline: 3px solid #7b1e2240;
  outline-offset: 0;
  border-color: #7b1e22;
  background-color: #fff;
}

/* Fehlerzustand: Rahmen + Text, nie nur Farbe */
.kform input[aria-invalid="true"],
.kform select[aria-invalid="true"],
.kform textarea[aria-invalid="true"] { border-color: #9b1c1c; border-width: 2px; background-color: #fff; }
.kform .kf-error {
  margin: 7px 0 0;
  font-size: .86rem;
  line-height: 1.45;
  font-weight: 500;
  color: #8a1717;
}
.kform .kf-error[hidden] { display: none; }
.kform .kf-hint { margin: 7px 0 0; font-size: .84rem; line-height: 1.45; color: #6b6b6b; }

/* ---------- Zoom / Telefon ---------- */
.kf-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.kf-choice legend { padding: 0; float: left; width: 100%; }
.kf-choice-row { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kform .kf-radio {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  margin: 0;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 1rem;
  border: 1.5px solid #d9cccc;
  border-radius: 9px;
  background: #faf6f1;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.kform .kf-radio:hover { border-color: #b9a3a3; }
.kf-radio input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #7b1e22;
  cursor: pointer;
}
.kf-radio input:focus-visible { outline: 3px solid #7b1e22; outline-offset: 3px; }
.kform .kf-radio:has(input:checked) { border-color: #7b1e22; background: #fff; box-shadow: inset 0 0 0 1px #7b1e22; }

/* ---------- Spamschutz-Feld: für Menschen unsichtbar ---------- */
.kf-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Absenden ---------- */
.kf-actions { margin-top: 26px; }
.kf-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 28px;
  border: 0;
  border-radius: 9px;
  background: #7b1e22;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.kf-submit:hover { background: #5a1518; }
.kf-submit:active { transform: translateY(1px); }
.kf-submit:focus-visible { outline: 3px solid #7b1e22; outline-offset: 3px; }
.kf-submit[aria-busy="true"] { cursor: progress; background: #5a1518; }
.kf-submit[aria-busy="true"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff66;
  border-top-color: #fff;
  animation: kfSpin .8s linear infinite;
}
@keyframes kfSpin { to { transform: rotate(360deg); } }

.kform .kf-legal {
  margin: 14px 0 0;
  font-size: .82rem;
  line-height: 1.55;
  color: #5f5f5f;
  text-align: center;
}
.kform .kf-legal a { color: #7b1e22; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .kform { padding: 26px 20px 24px; border-radius: 14px; }
  .kf-grid { grid-template-columns: 1fr; gap: 18px; }
  .kf-choice-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 340px) {
  .kf-choice-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .kf-submit[aria-busy="true"]::before { animation: none; }
}
