/* ============================================================
   Kontakt — contact form styling
   Built on styles.css tokens + subpage.css accents
   ============================================================ */

.form-layout {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 4vw, 48px); align-items: start;
}

/* ---------- Form card ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(24px, 3vw, 38px);
}

.field { margin-bottom: 20px; }
.field:last-of-type { margin-bottom: 0; }
.field label, .group-label {
  display: block; font-size: 14.85px; font-weight: 600; color: var(--ink);
  margin-bottom: 8px; line-height: 1.45;
}
.field label .req, .group-label .req { color: oklch(0.55 0.22 27); font-weight: 700; }

.field input,
.field select,
.field textarea {
  width: 100%; font-family: inherit; font-size: 17.05px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 14px; line-height: 1.4;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 264px; overflow: hidden; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: oklch(0.58 0.15 28);
  box-shadow: 0 0 0 3px oklch(0.58 0.15 28 / 0.14);
}

/* select with custom chevron */
.field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-right: 42px; cursor: pointer;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row .field { margin-bottom: 0; }

/* eGK highlighted field */
.field-highlight {
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  border-radius: 14px; padding: 20px 20px 22px;
}
.field-highlight label { color: var(--ink); }
.field-highlight select { background: #fff; }

.field-hint { font-size: 14.3px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }

/* Ärzte hint below Behandlungsbereich */
.bereich-aerzte {
  font-size: 14.85px; color: var(--muted); margin: 12px 0 0;
  padding-left: 14px; border-left: 3px solid var(--accent-line); line-height: 1.65;
}
.bereich-aerzte strong { color: var(--ink); font-weight: 600; }

/* consent */
.consent {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14.85px; color: var(--muted); line-height: 1.55;
  margin: 22px 0 24px;
}
.consent input {
  width: 19px; height: 19px; margin-top: 1px; flex: 0 0 auto;
  accent-color: var(--accent-deep); cursor: pointer;
}
.consent a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.consent .req { color: oklch(0.55 0.22 27); font-weight: 700; }

/* submit */
.btn-submit {
  width: 100%; justify-content: center;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent-deep); color: #fff;
  font-family: inherit; font-weight: 600; font-size: 17.05px;
  padding: 15px 24px; border: none; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-submit:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -18px oklch(0.40 0.10 250 / 0.6);
}
.btn-submit:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

/* status + note */
.form-status {
  margin-top: 16px; padding: 13px 16px; border-radius: 11px;
  font-size: 15.4px; font-weight: 500; line-height: 1.5; display: none;
}
.form-status.show { display: block; }
.form-status.ok {
  background: oklch(0.96 0.04 155); color: oklch(0.42 0.10 155);
  border: 1px solid oklch(0.85 0.07 155);
}
.form-status.err {
  background: oklch(0.96 0.04 28); color: oklch(0.50 0.15 28);
  border: 1px solid oklch(0.85 0.09 28);
}
.form-note {
  margin: 16px 0 0; font-size: 13.75px; color: var(--muted); line-height: 1.6;
}
.form-note strong { color: var(--ink); font-weight: 700; }

/* ---------- Aside ---------- */
.kontakt-aside { display: flex; flex-direction: column; gap: 18px; }
.kontakt-aside .info-card { background: var(--accent-tint); }
.kontakt-aside .callout { margin-top: 0; }
/* highlighted contact row matching the selected Behandlungsbereich */
.contact-list .row.is-active .label { color: var(--accent-deep); font-weight: 700; }

@media (max-width: 860px) {
  .form-layout { grid-template-columns: 1fr; }
  .kontakt-aside { order: 1; }
  .form-card { order: 0; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field { margin-bottom: 20px; }
}

/* ---------- ACCENT THEMES (switched by selected Behandlungsbereich) ---------- */
.subpage.theme-neutral {
  --accent: var(--ink); --accent-deep: var(--ink);
  --accent-tint: oklch(0.965 0.004 250); --accent-line: var(--line); --accent-grad: var(--ink);
}
.subpage.theme-cool {
  --accent: var(--cool); --accent-deep: var(--cool-deep);
  --accent-tint: var(--cool-tint); --accent-line: oklch(0.88 0.06 29); --accent-grad: oklch(0.45 0.17 29);
}
.subpage.theme-warm {
  --accent: var(--warm); --accent-deep: var(--warm-deep);
  --accent-tint: var(--warm-tint); --accent-line: oklch(0.90 0.03 248); --accent-grad: oklch(0.40 0.10 250);
}
/* smooth transition between accent themes */
.subpage { transition: none; }
.theme-cool, .theme-warm, .theme-neutral { transition: --accent .3s ease; }
