/* FormProcessor – Formulare (class="fp-form") und Meldungen, Farben wie cd_admin/warenkorb */

/* ---------- Meldungen ---------- */
.fp-alert {
  margin: 0 0 20px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
  border-radius: 6px;
}
.fp-alert p {
  margin: 0;
}
.fp-alert ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.fp-alert font {
  font-size: inherit; /* alte Meldungen aus der Konfiguration */
  color: inherit;
}
.fp-alert-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}
.fp-alert-success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Adresstabelle: Beschriftung links, Feld rechts ---------- */
.fp-form table:not(.wk-table) {
  width: 100%;
  max-width: 680px;
  margin: 0 0 16px;
  border-collapse: collapse;
}
.fp-form table:not(.wk-table) td {
  padding: 6px 8px;
  vertical-align: middle;
  border: 0;
}
.fp-form table:not(.wk-table) td:first-child:not([colspan]) {
  width: 32%;
  text-align: right;
  font-weight: 500;
  color: #374151;
}
.fp-form table:not(.wk-table) td[valign="top"]:first-child,
.fp-form table:not(.wk-table) td[style*="vertical-align: top"]:first-child {
  padding-top: 14px;
  vertical-align: top;
}
.fp-form table:not(.wk-table) td[colspan] {
  padding-top: 4px;
  font-size: 13px;
  color: #64748b;
}
.fp-form table:not(.wk-table) td br {
  display: none; /* Leerzeilen aus dem Editor hinter Feldern */
}

/* ---------- Felder ---------- */
.fp-form input[type="text"],
.fp-form input[type="email"],
.fp-form input[type="tel"],
.fp-form input:not([type]),
.fp-form select,
.fp-form textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: #1f2937;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}
.fp-form input[name="PLZ"] {
  max-width: 140px;
}
.fp-form textarea {
  min-height: 100px;
  resize: vertical;
}
.fp-form input:focus,
.fp-form select:focus,
.fp-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, .6);
}
.fp-form input[type="checkbox"],
.fp-form input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  vertical-align: -3px;
  accent-color: #1e3a8a;
}

/* Fehler */
.fp-form input.fp-invalid,
.fp-form select.fp-invalid,
.fp-form textarea.fp-invalid {
  border-color: #dc2626;
  background-color: #fef2f2;
}
.fp-form input[type="checkbox"].fp-invalid {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
}
.fp-error {
  display: block;
  margin: 4px 0 2px;
  font-size: 13px;
  font-weight: 500;
  color: #b91c1c;
}

/* Absenden */
.fp-form input[type="submit"],
.fp-form button[type="submit"]:not(.wk-btn):not(.wk-remove) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  margin: 8px 0;
  padding: 12px 24px;
  font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  border: 1px solid #14532d;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.2);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fp-form input[type="submit"]:hover,
.fp-form button[type="submit"]:not(.wk-btn):not(.wk-remove):hover {
  background: linear-gradient(180deg, #15803d 0%, #166534 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,.18);
}

/* Schmal: Beschriftung über dem Feld */
@media (max-width: 600px) {
  .fp-form table:not(.wk-table),
  .fp-form table:not(.wk-table) > tbody,
  .fp-form table:not(.wk-table) > tbody > tr,
  .fp-form table:not(.wk-table) > tbody > tr > td {
    display: block;
    width: auto !important;
  }
  .fp-form table:not(.wk-table) td:first-child:not([colspan]) {
    padding: 10px 0 2px;
    text-align: left;
  }
  .fp-form table:not(.wk-table) td {
    padding: 0;
  }
  .fp-form input[type="text"],
  .fp-form input[type="email"],
  .fp-form textarea {
    max-width: none;
  }
  .fp-form input[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}
