/* ============================================================
   WENDLER-FORMS.CSS
   Formular-Baukasten – theme-neutral, wiederverwendbar
   ============================================================
   Wird NACH wendler.css und VOR/zusammen mit dem Theme geladen:
     <link rel="stylesheet" href="/css/wendler.css">
     <link rel="stylesheet" href="/css/wendler-forms.css">
     <link rel="stylesheet" href="/css/wendler-cmyk.css">   (oder -grau)
     <link rel="stylesheet" href="/css/[seite].css">

   Enthält ALLES, was mit Eingabe/Formularen zu tun hat:
   Felder, Radio-Karten, Datei-Upload, Einwilligung, Status.
   Funktioniert in beiden Themes über die Variable --form-accent.

   THEME-ANPASSUNG (eine Zeile genügt):
     – Standard ist grün (siehe unten).
     – Auf der Grabpflege-Seite in wendler-grau.css ergänzen:
         :root { --form-accent: var(--gray-accent);
                 --form-accent-soft: var(--gray-bg-2);
                 --form-accent-ring: rgba(122,140,130,0.25); }
   ============================================================ */

/* ── FORM-AKZENT (Standard = Grün) ──────────────────────────── */
:root {
  --form-accent:      var(--green);       /* Rahmen bei Fokus, aktive Auswahl */
  --form-accent-dark: var(--green-dark);  /* Links/Text-Akzente */
  --form-accent-soft: var(--green-50);    /* zarte Füllung aktiver Elemente */
  --form-accent-ring: var(--green-100);   /* Fokus-Schein um Felder */
}

/* ── FORM-WRAPPER ───────────────────────────────────────────── */
.form-wrap { max-width: 680px; margin: 0 auto; }

.form-intro { font-size: 17px; color: var(--fg-muted); font-weight: 300; margin-bottom: 28px; }
.form-intro a { color: var(--form-accent-dark); }

.wform { display: flex; flex-direction: column; gap: 22px; }

/* ── EINZELFELDER ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
.field label,
.field-legend { font-weight: 600; font-size: 15px; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--fg-muted); }

.wform input[type="text"],
.wform input[type="email"],
.wform input[type="tel"],
.wform input[type="number"],
.wform textarea,
.wform select {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.wform input:focus,
.wform textarea:focus,
.wform select:focus {
  outline: none;
  border-color: var(--form-accent);
  box-shadow: 0 0 0 3px var(--form-accent-ring);
}
.wform textarea { resize: vertical; min-height: 120px; }

/* ── FELDGRUPPEN ────────────────────────────────────────────── */
.field-group { border: none; }
.field-legend { margin-bottom: 12px; }
.field-hint { font-size: 14px; color: var(--fg-muted); font-weight: 300; margin-bottom: 14px; }

/* ── RADIO-KARTEN (auswählbare Kästchen) ────────────────────── */
.radio-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.radio-card {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: border-color var(--duration), background var(--duration);
}
.radio-card:hover { border-color: var(--form-accent); }
.radio-card input { accent-color: var(--form-accent); width: 18px; height: 18px; flex-shrink: 0; }
.radio-card:has(input:checked) {
  border-color: var(--form-accent);
  background: var(--form-accent-soft);
}

/* ── CHECKBOX-KARTEN (Mehrfachauswahl, optional nutzbar) ────── */
.check-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check-card {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: border-color var(--duration), background var(--duration);
}
.check-card:hover { border-color: var(--form-accent); }
.check-card input { accent-color: var(--form-accent); width: 18px; height: 18px; flex-shrink: 0; }
.check-card:has(input:checked) { border-color: var(--form-accent); background: var(--form-accent-soft); }

/* ── DATEI-UPLOAD (Drag & Drop) ─────────────────────────────── */
.file-drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 30px 20px; text-align: center; cursor: pointer; position: relative;
  transition: border-color var(--duration), background var(--duration);
}
.file-drop:hover,
.file-drop.is-drag { border-color: var(--form-accent); background: var(--form-accent-soft); }
.file-drop-icon { color: var(--form-accent-dark); line-height: 0; }
.file-drop-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.file-drop-text { font-weight: 600; font-size: 15px; color: var(--fg-muted); }
.file-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.file-list { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; justify-content: space-between; gap: 12px;
  background: var(--paper-warm); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px;
}
.file-item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--fg-muted); flex-shrink: 0; }

/* ── EINWILLIGUNG (DSGVO-Checkbox) ──────────────────────────── */
.consent {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; color: var(--fg-muted); font-weight: 300;
  background: var(--paper-warm); border-radius: var(--radius); padding: 16px 18px;
}
.consent input { margin-top: 3px; width: 19px; height: 19px; accent-color: var(--form-accent); flex-shrink: 0; }
.consent a { font-weight: 600; color: var(--form-accent-dark); }
.consent strong { font-weight: 600; color: var(--ink); }

/* ── STATUSMELDUNGEN ────────────────────────────────────────── */
.form-status { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; font-weight: 600; }
.form-status--ok {
  background: var(--green-100); color: var(--green-900);
  border: 1px solid var(--green-200);
}
.form-status--error {
  background: #fbe6e3; color: #7c2417;
  border: 1px solid #f0b9b0;
}

/* ── KLEINTEILE ─────────────────────────────────────────────── */
.form-note { font-size: 13px; color: var(--fg-muted); margin-top: -6px; }
.form-fallback { font-size: 14px; color: var(--fg-muted); text-align: center; font-weight: 300; }
.form-fallback a { color: var(--form-accent-dark); }

/* Voll-breiter Absende-Button (nutzt .btn aus wendler.css) */
.btn-block { width: 100%; justify-content: center; padding: 16px; font-size: 16px; }

/* Honeypot (Spam-Schutz, unsichtbar) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}
