/*
 * Kontaktformular der Websites (Markup: cf-shared/ui/contact-form).
 *
 * Liest die Design-Tokens der einbindenden Seite (--bg-card, --border-color, --primary, ...),
 * damit das Formular in lucee@schüri violett, in hosting@schüri grün erscheint, ohne dass
 * eine Seite etwas nachbaut. Jede Variable hat einen Rückfallwert: apps-website etwa kennt
 * kein --primary-glow. Die Knöpfe gestaltet die Seite selbst (.btn), hier nur ihr Sperrzustand.
 */
.cf-contact-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card, rgba(15, 22, 38, 0.55));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 18px);
  padding: clamp(20px, 5vw, 36px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: left;
}

/* Zwei Spalten, solange Platz ist; darunter eine. Ohne Media-Query, und min() hält die
   Spalte auf 360px unter der Containerbreite (Rule frontend-web.md). */
.cf-contact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  column-gap: 20px;
}

.cf-contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-bottom: 20px;
}

.cf-contact-field label {
  font-family: var(--font-headings, inherit);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted, #9ca3af);
}

.cf-contact-field input,
.cf-contact-field textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  color: var(--text-main, #f3f4f6);
  font-family: var(--font-body, inherit);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.cf-contact-field textarea {
  resize: vertical;
  min-height: 140px;
}

.cf-contact-field input::placeholder,
.cf-contact-field textarea::placeholder {
  color: rgba(156, 163, 175, 0.6);
}

.cf-contact-field input:focus,
.cf-contact-field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary, #8b5cf6) 55%, transparent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px var(--primary-glow, color-mix(in srgb, var(--primary, #8b5cf6) 18%, transparent));
}

/* Honeypot: für Menschen unsichtbar, für Formular-Bots aber im DOM auffindbar.
   Bewusst nicht display:none - manche Bots überspringen genau das. */
.cf-contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-contact-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cf-contact-actions .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cf-contact-status {
  font-size: 0.95rem;
  color: var(--text-muted, #9ca3af);
  margin: 0;
}

.cf-contact-status.is-success {
  color: #34d399;
}

.cf-contact-status.is-error {
  color: #f87171;
}

/* Alternative Kontaktwege unter dem Knopf (Argument noteHtml). */
.cf-contact-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  color: var(--text-muted, #9ca3af);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.cf-contact-note p {
  margin: 0;
}

.cf-contact-note a {
  color: var(--text-main, #f3f4f6);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary, #8b5cf6) 60%, transparent);
  text-underline-offset: 3px;
}

.cf-contact-note a:hover {
  color: var(--primary, #8b5cf6);
}
