/* ========== Modernes, responsives Kontaktformular ========== */
/* Farben & Spacing zentral steuerbar */
:root{
  --brand: #1e6a8e;          /* <- Systemhaus-Kolb-Blau (anpassbar) */
  --brand-600: #1e6a8e;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --bg: #FFFFFF;             /* kein Hintergrund */
  --ok: #0E9F6E;
  --warn: #1e6a8e;
  --err: #DC2626;

  --radius: 10px;
  --shadow: 0 6px 20px rgba(2,6,23,.06);
  --gap: 14px;
}

/* Basis */
html { box-sizing: border-box; -webkit-text-size-adjust:100%;}
*, *::before, *::after { box-sizing: inherit; }

body{
  margin:0;
  font-family: Inter, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg); /* bewusst neutral/transparent */
}

/* Formular-Wrapper (optional, falls du eine Klasse hast) */
.contact-form{
  width: 100%;
  max-width: 720px;
  margin: 24px auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: transparent; /* kein Panel-Hintergrund */
}

/* Grid-Layout für Labels & Felder */
.contact-form .row{
  display: grid;
  grid-template-columns: 180px 1fr; /* Label | Feld */
  gap: var(--gap);
  align-items: center;
  margin-bottom: var(--gap);
}

/* Kompatibel zu deinen bestehenden Klassen/Tags */
.formlabel{
  display: block;
  font-weight: 600;
  color: var(--text);
  min-width: 0; /* verhindert Überlauf */
}

.formlabelerror{ color: var(--err); }

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select{
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea{
  min-height: 120px;
  max-height: 420px;
  resize: vertical;
}

/* Fokus & Hover – gut sichtbar, barrierearm */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
textarea:hover,
select:hover{
  border-color: color-mix(in oklab, var(--brand) 35%, #000 0%);
}

input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="tel"]:focus-visible,
input[type="url"]:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent);
}

/* Checkboxen & Radios */
input[type="checkbox"],
input[type="radio"]{
  inline-size: 20px;
  block-size: 20px;
  accent-color: var(--brand);
}

/* Buttons */
.formbutton,
button[type="submit"],
input[type="submit"]{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}

button[type="submit"]:hover,
input[type="submit"]:hover{ background: var(--brand-600); }

button[type="submit"]:active,
input[type="submit"]:active{ transform: translateY(1px); }

button[type="submit"]:focus-visible,
input[type="submit"]:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 25%, transparent);
}

/* Fehlermarkierung kompatibel zu deinen Klassen */
.forminputerror,
input.forminputerror,
textarea.forminputerror,
select.forminputerror{
  border-color: var(--err) !important;
  background: #FFF7F7;
}

.validationError{ display: block; color: var(--err); font-weight: 600; }
.errordiv{ display: none; } /* wird nur gezeigt, wenn du .validationError setzt */

/* Info/Status-Meldungen */
.validationmsg,
.infomsg{
  font-weight: 700;
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.validationmsg{ color: var(--err); background: #FFF3CD; }
.infomsg{ color: #0B3B7A; background: #E6F0FF; }

/* Kleine Hilfsklassen für Layout */
.textCell{ width:100%; }
.forminput{ width:100%; }

/* Responsiv: Labels über den Feldern auf schmalen Screens */
@media (max-width: 680px){
  .contact-form{ padding: 18px; }
  .contact-form .row{
    grid-template-columns: 1fr; /* Label oben, Feld darunter */
  }
  .formlabel{ margin-bottom: 4px; }
}

/* Barrierefreiheit / Bewegung reduzieren */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}
