/*
 * ChaPaSa – Newsletter-Anmeldeformular
 * Eigenständig gehalten, damit es auch auf Seiten ohne Selbsttest funktioniert.
 * Alles unter .nl-widget gekapselt (Kollisionen mit Astra/Spectra vermeiden).
 *
 * Gestaltung: bewusst OHNE eigenen Kartenhintergrund, damit sich das Formular
 * in den Hintergrund des umgebenden WordPress-Abschnitts einfügt. Überschrift
 * und Einleitungstext werden nicht vom Widget gerendert, sondern im Editor
 * oberhalb des Shortcodes gepflegt.
 */

.nl-widget {
  --nl-terracotta: #C56B4F;
  --nl-sand: #E6DCCF;
  --nl-text: #2C2C2C;

  /* Schrift erbt vom Theme - siehe Hinweis in selbsttest.css.
     Eine eigene Ueberschriften-Variable braucht es hier nicht: Das einzige
     Ueberschriften-Element ist ein <h2>, dort greift Astras Typografie
     von selbst. */
  --nl-font-body: inherit;

  max-width: 480px;
  font-family: var(--nl-font-body);
  color: var(--nl-text);
  box-sizing: border-box;
}

.nl-widget *,
.nl-widget *::before,
.nl-widget *::after {
  box-sizing: inherit;
}

.nl-field {
  margin-bottom: 16px;
}

.nl-field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  /* Dunkel statt Terrakotta: auf farbigem Hintergrund deutlich besser lesbar. */
  color: var(--nl-text);
  margin-bottom: 6px;
}

.nl-field input[type="text"],
.nl-field input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(44, 44, 44, 0.15);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;   /* >=16px verhindert das Auto-Zoomen auf iOS */
  background: #fff;
  color: var(--nl-text);
}

.nl-field input:focus-visible {
  outline: 3px solid var(--nl-terracotta);
  outline-offset: 1px;
  border-color: var(--nl-terracotta);
}

/* Honeypot: für Menschen unsichtbar, für Bots auffindbar.
   Bewusst nicht display:none - manche Bots ignorieren solche Felder. */
.nl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nl-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  background: var(--nl-terracotta);
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
}

.nl-btn:disabled {
  /* Deutlich sichtbar deaktiviert, ohne im farbigen Umfeld zu verschwimmen. */
  background: rgba(44, 44, 44, 0.25);
  color: rgba(255, 255, 255, 0.85);
  cursor: not-allowed;
}

/* Bewusst KEIN Hover-Effekt. Die Zustände müssen aber trotzdem ausdrücklich
   gesetzt werden - sonst greifen die Button-Styles des Themes (Astra) und
   färben den Button beim Überfahren um. */
.nl-widget .nl-btn:hover,
.nl-widget .nl-btn:focus,
.nl-widget .nl-btn:active {
  background: var(--nl-terracotta);
  color: #fff;
  border: none;
}

.nl-widget .nl-btn:disabled:hover,
.nl-widget .nl-btn:disabled:focus,
.nl-widget .nl-btn:disabled:active {
  background: rgba(44, 44, 44, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

.nl-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.nl-privacy-note {
  font-size: 13px;
  line-height: 1.5;
  /* Dunkel gehalten: helles Grau wäre auf farbigem Hintergrund zu schwach. */
  color: rgba(44, 44, 44, 0.75);
  margin-top: 18px;
}

.nl-privacy-note a {
  color: var(--nl-text);
  text-decoration: underline;
}

.nl-status {
  padding: 4px 0;
}

.nl-status__title {
  /* Kein font-family: das Element ist ein <h2>, Astras
     Ueberschriften-Typografie greift dadurch von selbst. */
  font-size: 22px;
  color: var(--nl-text);
  margin: 0 0 8px;
}

.nl-status__text {
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.nl-status--error .nl-status__title {
  color: #8C2F2A;
}

.nl-widget [hidden] {
  display: none !important;
}
