/* /kontakt — Kontaktformular + KI-Assistent (KONTAKT-1, KONTAKT-KI-1).
   Uses the shared tokens from SiteConfig::cssVariables(); scoped to .k-kontakt. */

.k-kontakt__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 767px) { .k-kontakt__grid { grid-template-columns: minmax(0, 1fr); } }

.k-kontakt .k-h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-4, 1rem); }
.k-kontakt .k-h3 { margin: 0 0 0.75rem; }
.k-kontakt__side .k-h3 + * { margin-top: 0; }
.k-kontakt__side > .k-h3:not(:first-child) { margin-top: 2rem; }

.k-field { margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.k-field label { font-weight: 600; }
.k-field input[type="text"], .k-field input[type="email"], .k-field select, .k-field textarea,
.k-assist textarea {
  width: 100%; min-height: 44px; padding: 0.7rem 0.9rem; font: inherit; color: var(--color-text);
  background: var(--color-bg-card, #fff); border: 1px solid var(--color-border-strong, var(--color-border));
  border-radius: var(--radius-md, 6px);
}
.k-field textarea, .k-assist textarea { resize: vertical; line-height: 1.5; }
/* Running text on this page is never below the body size (site_audit bodyPx, Schutzregel < 16 px):
   the privacy note and the AI disclosure are read, not skimmed (Zeugnis Landing 2026-10-09). */
.k-kontakt .k-note { font-size: var(--k-fs-body, 1rem); line-height: var(--k-lh-body, 1.6); }
.k-field input:focus-visible, .k-field select:focus-visible, .k-field textarea:focus-visible,
.k-assist textarea:focus-visible, .k-field--check input:focus-visible {
  outline: 3px solid var(--color-accent); outline-offset: 2px;
}
.k-field [aria-invalid="true"] { border-color: var(--color-danger); border-width: 2px; }
.k-hint { font-size: 0.875rem; color: var(--color-text-muted); }
.k-err { font-size: 0.9375rem; font-weight: 600; color: var(--color-danger-text, var(--color-danger)); }
.k-req { color: var(--color-danger-text, var(--color-danger)); }
.k-opt { font-weight: 400; color: var(--color-text-muted); }

.k-field--check { display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; align-items: start; }
.k-field--check input { width: 1.375rem; height: 1.375rem; margin-top: 0.15rem; accent-color: var(--color-accent); }
.k-field--check label { font-weight: 400; }
.k-field--check .k-hint, .k-field--check .k-err { grid-column: 2; }

/* Honeypot: off-screen for people, present for bots. Not display:none — some
   bots skip hidden fields. */
.k-kontakt__hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.k-kontakt__kuendigen { font-size: var(--k-fs-body, 1rem); margin: 0.25rem 0 0; padding: 0.6rem 0.8rem; border-left: 3px solid var(--color-warning, var(--color-accent)); background: var(--color-bg-alt, transparent); }
/* JS shows the hint only for the Kündigung topic; without JS it always stays visible. */
.k-js .k-kontakt__kuendigen[data-aus] { display: none; }

.k-kontakt__errors { border: 2px solid var(--color-danger); border-radius: var(--radius-md, 6px); padding: 0.9rem 1.1rem; margin: 0 0 1.5rem; background: color-mix(in srgb, var(--color-danger) 8%, transparent); }
.k-kontakt__errors ul { margin: 0.4rem 0 0 1.2rem; }
.k-kontakt__errors a { color: var(--color-danger-text, var(--color-danger)); text-decoration: underline; }
.k-kontakt__ok { border: 2px solid var(--color-success); border-radius: var(--radius-lg, 12px); padding: 1.4rem; background: color-mix(in srgb, var(--color-success) 8%, transparent); }
.k-kontakt__ok:focus { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.k-kontakt__ticket { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; }
.k-kontakt__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.k-kontakt__links a { text-decoration: underline; }
#k-senden { min-height: 48px; }

/* Assistant */
.k-assist { border: 1px solid var(--color-border); border-radius: var(--radius-lg, 12px); padding: 1.1rem; background: var(--color-bg-card, transparent); }
.k-assist__badge { font-weight: 600; margin: 0 0 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.k-assist__tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--color-accent); color: var(--color-on-accent, #fff); }
.k-assist .k-note { font-size: var(--k-fs-body, 1rem); }
.k-assist .k-note a { text-decoration: underline; }
.k-assist__log { display: grid; gap: 0.6rem; margin: 0.9rem 0; max-height: 26rem; overflow-y: auto; }
.k-assist__log:empty { display: none; }
.k-assist__msg { padding: 0.6rem 0.8rem; border-radius: var(--radius-md, 6px); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--k-fs-body, 1rem); line-height: 1.5; }
.k-assist__msg--user { background: var(--color-accent-soft, var(--color-bg-alt)); justify-self: end; max-width: 90%; }
.k-assist__msg--bot { background: var(--color-bg-alt, transparent); border: 1px solid var(--color-border); }
.k-assist__msg--fehler { border: 1px solid var(--color-danger); }
.k-assist__wer { display: block; font-size: 0.75rem; font-weight: 700; color: var(--color-text-muted); margin-bottom: 0.15rem; }
.k-assist__form label { font-weight: 600; display: block; margin-bottom: 0.35rem; }
.k-assist__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.k-assist__actions .btn { min-height: 44px; }
.k-assist__off { padding: 0.8rem 1rem; border: 1px dashed var(--color-border-strong, var(--color-border)); border-radius: var(--radius-md, 6px); color: var(--color-text-muted); }

@media (max-width: 639px) {
  .k-assist__actions .btn, #k-senden { width: 100%; }
}
