/* ==========================================================================
   Kontaktformular – nutzt die globalen Theme-Tokens aus quantdesk.css.
   Global (nicht scoped), weil Blazors InputText/InputTextArea die <input>/
   <textarea> über Kindkomponenten rendern; scoped CSS würde sie nicht treffen.
   ========================================================================== */

.contact-form-wrap { max-width: 680px; margin: 0 auto; }

.contact-form-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0;
}

.contact-form-lead { color: var(--text-2); margin: 8px 0 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-field { display: flex; flex-direction: column; gap: 7px; }

.form-field label,
.form-consent { font-size: 13.5px; }

.form-field label { font-weight: 600; color: var(--text); }
.form-optional { color: var(--text-3); font-weight: 400; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form textarea { resize: vertical; min-height: 130px; }

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-3); }

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
}

/* Fully self-drawn checkbox (appearance:none) so the box is identical in both
   states across browsers/DPI – only fill + checkmark change, no shape "jump". */
.form-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0; /* override the .contact-form input padding, otherwise the box is forced ~30px */
  /* top margin tuned so the box TOP aligns with the text cap height (line-height 1.5
     adds leading above the caps); paired with align-items:flex-start on .form-consent. */
  margin: 5px 0 0;
  display: grid;
  place-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.form-consent input[type="checkbox"]::before {
  content: "";
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform 0.12s ease-in-out;
  background: #fff;
  clip-path: polygon(14% 44%, 0% 60%, 45% 100%, 100% 18%, 86% 4%, 44% 74%);
}

.form-consent input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form-consent input[type="checkbox"]:checked::before { transform: scale(1); }

.form-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-consent a { color: var(--accent-strong); text-decoration: underline; }

.validation-message { color: #fb7185; font-size: 12.5px; }

.form-error {
  color: #fb7185;
  font-size: 14px;
  background: color-mix(in srgb, #fb7185 12%, transparent);
  border: 1px solid color-mix(in srgb, #fb7185 35%, transparent);
  border-radius: 10px;
  padding: 11px 14px;
  margin: 0;
}

.contact-form button[type="submit"] { align-self: flex-start; margin-top: 4px; }

/* Honeypot – für Menschen unsichtbar, Bots füllen es aus. */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form-status {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 28px;
}

.contact-form-status h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  margin: 0 0 8px;
}

.contact-form-status p { color: var(--text-2); margin: 0 0 18px; }
