/* antragsfelder.css – Texteditor, Zeichenzähler, Mehrfachauswahl, Kostenplan, Hinweistext */

/* --- Hinweistext im Formular --- */
.form-hinweis {
  background: #fdf6e3;
  border: 1px solid #e8d9a0;
  border-radius: var(--radius, 10px);
  padding: 14px 18px;
  margin: 4px 0 18px;
  font-size: 0.92rem;
  color: var(--ink-soft, #3E4C46);
}
.form-hinweis h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink, #16211D); }
.form-hinweis p { margin: 0 0 8px; }
.form-hinweis ul { margin: 0 0 8px; padding-left: 22px; }
.form-hinweis > :last-child { margin-bottom: 0; }

/* --- Zeichenzähler --- */
.zeichenzaehler { margin-top: 4px; font-size: 0.8rem; color: var(--ink-soft, #3E4C46); text-align: right; }
.zeichenzaehler.fast { color: #8a5c14; }
.zeichenzaehler.ueber { color: var(--stamp, #A8402E); font-weight: 600; }

/* --- Texteditor --- */
.rt-feld { border: 1px solid var(--line, #C9D2C7); border-radius: 8px; background: #fff; overflow: hidden; }
.rt-feld:focus-within { border-color: var(--primary-light, #2E6B5F); box-shadow: 0 0 0 2px rgba(46,107,95,0.18); }
.rt-werkzeug { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #f4f6f3; border-bottom: 1px solid var(--line, #C9D2C7); }
.rt-knopf {
  min-width: 34px; height: 30px; padding: 0 8px;
  border: 1px solid var(--line, #C9D2C7); border-radius: 6px; background: #fff;
  font: inherit; font-size: 0.9rem; line-height: 1; cursor: pointer; color: var(--ink, #16211D);
}
.rt-knopf:hover { background: #eef2ed; }
.rt-knopf.aktiv { background: var(--primary, #1B4B43); border-color: var(--primary, #1B4B43); color: #fff; }
.rt-knopf.rt-fett { font-weight: 700; }
.rt-knopf.rt-kursiv { font-style: italic; }
.rt-editor { min-height: 160px; max-height: 480px; overflow-y: auto; padding: 10px 12px; outline: none; line-height: 1.55; }
.rt-editor p { margin: 0 0 0.7em; }
.rt-editor ul, .rt-editor ol { margin: 0 0 0.7em; padding-left: 24px; }
.rt-editor > :last-child { margin-bottom: 0; }

/* --- Mehrfachauswahl (Auswahl-Chips) --- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; font-weight: 400; cursor: pointer; }
.chip input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.chip span {
  display: inline-block; padding: 7px 14px;
  border: 1px solid var(--line, #C9D2C7); border-radius: 999px; background: #fff;
  font-size: 0.92rem; line-height: 1.3; color: var(--ink, #16211D);
  transition: background .12s, border-color .12s, color .12s;
}
.chip:hover span { border-color: var(--primary-light, #2E6B5F); }
.chip input:checked + span { background: var(--primary, #1B4B43); border-color: var(--primary, #1B4B43); color: #fff; }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 2px solid var(--primary-light, #2E6B5F); outline-offset: 2px; }
.chips.limit-erreicht { outline: 2px solid var(--stamp, #A8402E); outline-offset: 4px; border-radius: 8px; }

/* --- Kostenplan --- */
.kostenplan { max-width: 720px; }
.kp-tabelle { width: 100%; border-collapse: collapse; }
.kp-tabelle th { text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft, #3E4C46); padding: 0 6px 6px; }
.kp-tabelle th.kp-betrag-kopf { width: 150px; }
.kp-tabelle td { padding: 3px 6px; vertical-align: middle; }
.kp-tabelle td input { width: 100%; margin: 0; }
.kp-tabelle td.kp-aktion { width: 36px; text-align: center; }
.kp-entfernen {
  width: 28px; height: 28px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  font-size: 1.2rem; line-height: 1; color: var(--ink-soft, #3E4C46); cursor: pointer;
}
.kp-entfernen:hover { background: #f3e3df; color: var(--stamp, #A8402E); }
.kp-tabelle tfoot td { border-top: 2px solid var(--line, #C9D2C7); padding-top: 8px; font-weight: 600; }
.kp-tabelle tfoot td.kp-summe { text-align: right; font-family: var(--font-mono); }
.kostenplan .kp-hinzu { margin-top: 10px; }

/* Anzeige in Prüfansicht / PDF */
.kp-anzeige { border-collapse: collapse; width: 100%; max-width: 560px; }
.kp-anzeige td { padding: 3px 8px 3px 0; border-bottom: 1px solid #e4e8e2; }
.kp-anzeige td.kp-b { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kp-anzeige tr.kp-summenzeile td { font-weight: 600; border-bottom: 0; border-top: 2px solid #c9d2c7; }

@media (max-width: 640px) {
  .kp-tabelle th.kp-betrag-kopf { width: 110px; }
}

/* ---------- Tabelle (Personenlisten, Stundenzettel u. ä.) ---------- */
.tabelle { max-width: 100%; }
.tab-scroll { overflow-x: auto; }
.tab-tabelle { width: 100%; border-collapse: collapse; min-width: 480px; }
.tab-tabelle th { text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft, #3E4C46); padding: 0 6px 6px; white-space: nowrap; }
.tab-tabelle td { padding: 2px 4px; vertical-align: middle; }
.tab-tabelle td input, .tab-tabelle td select { width: 100%; margin: 0; min-width: 70px; }
.tab-tabelle td input.tab-zahl { min-width: 80px; text-align: right; }
.tab-tabelle .tab-nr { width: 36px; text-align: right; color: var(--ink-soft, #3E4C46); font-size: 0.82rem; padding-right: 8px; }
.tab-tabelle td.tab-aktion { width: 36px; text-align: center; }
.tab-tabelle tfoot td { border-top: 2px solid var(--line, #C9D2C7); padding-top: 8px; font-weight: 600; }
.tab-tabelle tfoot td.tab-summe { text-align: right; font-family: var(--font-mono); }
.tab-entfernen {
  border: 0; background: transparent; color: var(--ink-soft, #3E4C46); font-size: 1.2rem; line-height: 1;
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
}
.tab-entfernen:hover { background: #f3e3df; color: var(--stamp, #A8402E); }
.tab-leiste { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.tab-leiste .hint { margin: 0; }
.tab-auswertung { margin-top: 14px; }

.tab-anzeige { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.tab-anzeige th { text-align: left; font-size: 0.8rem; color: var(--ink-soft, #3E4C46); padding: 3px 8px 3px 0; border-bottom: 2px solid #c9d2c7; }
.tab-anzeige td { padding: 3px 8px 3px 0; border-bottom: 1px solid #e4e8e2; }
.tab-anzeige td.tab-z { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tab-anzeige tr.tab-summenzeile td { font-weight: 600; border-top: 2px solid #c9d2c7; border-bottom: 0; }
.tab-auswertung-anzeige { max-width: 460px; margin-top: 10px; }

/* Upload-Hinweis (Dateiformate/Größe) – klein und kursiv */
.hint.hint-upload { font-size: 0.78rem; font-style: italic; opacity: 0.85; }

/* Tabellenfeld: Liste aus Datei übernehmen (CSV/Excel) */
.tab-leiste .tab-vorlage { font-size: 0.86rem; }
.tab-import { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: #f3f6f5; border: 1px solid rgba(16,49,44,0.15); font-size: 0.92rem; max-width: 60rem; }
.tab-import[hidden] { display: none; }
.tab-import p { margin: 0 0 6px; }
.tab-import ul { margin: 0 0 8px; padding-left: 1.2rem; }
.tab-import-ok { background: rgba(27,75,67,0.08); }
.tab-import-warn { background: rgba(232,163,61,0.16); }
.tab-import-fehler { background: rgba(168,64,46,0.1); color: #8a2f2a; }
.tab-import-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.tab-anzeige.tab-kompakt { font-size: 0.82rem; line-height: 1.25; margin-top: 8px; }
.tab-anzeige.tab-kompakt th, .tab-anzeige.tab-kompakt td { padding: 1px 8px 1px 0; }
.tab-anzeige .tab-nr { width: 2.2em; color: #777; }
.tab-anzeige thead { display: table-header-group; }
.tab-anzeige.tab-matrix { width: auto; min-width: 360px; max-width: 100%; margin-bottom: 4px; }
.tab-anzeige.tab-matrix th.tab-z, .tab-anzeige.tab-matrix td.tab-z { text-align: right; padding-left: 14px; }
.tab-anzeige.tab-matrix tr.tab-summenzeile td { border-top: 1px solid #c9d2c7; }

/* Eingabefelder: Betrag mit „€“, Fehlermeldung unter dem Feld */
.betrag-wrap { position: relative; display: block; }
.betrag-wrap input { padding-right: 2.2rem; }
.betrag-wrap::after { content: "€"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #666; pointer-events: none; }
input.eingabe-ungueltig { border-color: #b3261e !important; }
.eingabe-meldung { color: #b3261e; font-size: 0.85rem; margin-top: 4px; }
.betrag-wrap input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.betrag-wrap input[type=number]::-webkit-inner-spin-button,
.betrag-wrap input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
