/* [P1:V3] Gesprächsnotizen in mVOS (notizen.js): Karte in der Kundenakte, Abschnitt in der
   Akquise-Akte, Dialoge. Farben aus admin.css :root. Zustände nie nur über Farbe. */

/* Kundenakte: Karte „Gesprächsnotizen“ */
#detail-notizen-card h2.card-title { margin: 0; }
.notiz-kopf-knoepfe { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.notiz-liste { list-style: none; margin: 0; padding: 0; }
.notiz-zeile {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.notiz-zeile:last-child { border-bottom: 0; }
.notiz-zeile-datum { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.notiz-art { white-space: nowrap; color: var(--text); }
.notiz-zeile-titel { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.notiz-zeile-wer { color: var(--text-muted); white-space: nowrap; }
.notiz-zeile-zusatz { grid-column: 3 / 5; color: var(--text-muted); font-size: 12px; }
.notiz-zeile-oeffnen { grid-column: 5; grid-row: 1; }
.notiz-zeile--weg .notiz-zeile-titel { text-decoration: line-through; text-decoration-color: var(--text-light); }
.notiz-leer { padding: 12px 14px; color: var(--text-muted); font-size: 13px; }
.notiz-fuss { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }
#page-customer-detail .notiz-zeile .btn-sm { padding: 3px 10px; }
/* Schmal (Handy, schmale Akte): Datum, Art und Öffnen oben, darunter Titel und Verfasser */
@media (max-width: 640px) {
  .notiz-zeile { grid-template-columns: auto minmax(0, 1fr) auto; }
  .notiz-zeile-datum { grid-column: 1; grid-row: 1; }
  .notiz-zeile .notiz-art { grid-column: 2; grid-row: 1; }
  .notiz-zeile-oeffnen { grid-column: 3; grid-row: 1; }
  .notiz-zeile-titel { grid-column: 1 / -1; grid-row: 2; }
  .notiz-zeile-wer { grid-column: 1 / -1; grid-row: 3; white-space: normal; }
  .notiz-zeile-zusatz { grid-column: 1 / -1; grid-row: 4; }
}

/* Akquise-Akte */
.akq-akte-knoepfe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.akq-abschnitt .notiz-liste { margin: 0 -22px 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.akq-abschnitt .notiz-zeile { padding: 8px 22px; }

/* Dialoge */
.gn-dialog h2.modal-title { margin: 0; font-size: 18px; }
.gn-dialog .modal-header { gap: 12px; }
.gn-inhalt { display: grid; gap: 12px; }
.gn-unterzeile { margin: -12px 0 0; }
.gn-meta p { margin: 0 0 4px; }
.gn-zwischentitel { font-size: 13px; font-weight: 700; margin: 8px 0 0; color: var(--text); }
.gn-reihe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gn-fuss { align-items: center; flex-wrap: wrap; }
.gn-fuss .gn-platz { flex: 1; }
.gn-fuss-hinweis { flex: 1 1 260px; margin: 0; }
.gn-gefahr { color: var(--danger); border-color: #FECACA; }
@media (max-width: 560px) { .gn-reihe { grid-template-columns: 1fr 1fr; } .gn-reihe > :first-child { grid-column: 1 / -1; } }

/* Editor und Formulare (gemeinsame Klassen mit dem Beraterfenster, dort video.css) */
.notiz-editor { display: grid; gap: 10px; font-size: 14px; }
.notiz-feldgruppe { display: grid; gap: 4px; }
.notiz-feldgruppe label, .notiz-nachtrag-form label { font-size: 13px; font-weight: 600; color: var(--text); }
.notiz-feld {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface); width: 100%;
  border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 38px;
}
.notiz-feld:focus-visible, .notiz-baustein:focus-visible, .notiz-lesen:focus-visible, .notiz-ablage:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.notiz-feld[readonly] { background: var(--bg); }
/* Nur im Editor und in den Dialogen: Die Dashboard-Kachel „Notizen“ (admin.js) nutzt dieselbe Klasse */
.notiz-editor textarea.notiz-text { resize: vertical; line-height: 1.5; min-height: 10rem; }
.notiz-bausteine { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.notiz-bausteine-titel { font-size: 12px; color: var(--text-muted); }
.notiz-baustein {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: 4px 10px; min-height: 28px;
}
.notiz-baustein:hover { border-color: var(--accent); }
.notiz-stand { margin: 0; font-size: 12px; color: var(--text-muted); }
.notiz-hinweis { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.notiz-hinweis--warnung { color: #7A3E00; background: #FEF3C7; border: 1px solid #FCD34D; border-radius: 8px; padding: 8px 10px; }
.notiz-leise { color: var(--text-muted); font-size: 12.5px; margin: 0; }
.notiz-fehler { margin: 0; color: #B42318; font-weight: 600; font-size: 13px; }
.notiz-haken { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-height: 32px; }
.notiz-haken input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.notiz-kopien { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px 8px; margin: 0; display: grid; gap: 2px; }
.notiz-kopien legend { font-size: 12px; color: var(--text-muted); padding: 0 4px; }
.notiz-neu { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.notiz-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notiz-konflikt, .notiz-rueckfrage { border: 1.5px solid var(--warning); background: #FFFBEB; border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.notiz-konflikt p, .notiz-rueckfrage p { margin: 0; font-weight: 600; }
.notiz-ablage { margin: 0; font-weight: 600; color: #065F46; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 8px; padding: 8px 10px; }
.notiz-ablage::before { content: "✓ "; }
.notiz-lesen {
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; max-height: 50vh; overflow-y: auto;
}
.notiz-zusatz { display: grid; gap: 2px; }
.notiz-nachtraege { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notiz-nachtrag { display: grid; gap: 4px; border-left: 3px solid var(--border); padding-left: 10px; }
.notiz-nachtrag-form { display: grid; gap: 6px; }
.notiz-laedt { padding: 6px 0; }
.notiz-vorleser { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { .notiz-baustein { transition: border-color .12s; } }

/* [P1:X] Transkript im mVOS-Dialog (Pruef-Ansicht) und in der Kundenakte ("Transkript anzeigen") */
.tk-pruefen { display: grid; gap: 10px; border-top: 1px solid var(--border, #e5e7eb); padding-top: 14px; margin-top: 14px; }
.tk-titel { margin: 0; font-size: 15px; font-weight: 700; }
.tk-zustand, .tk-hinweis, .tk-leise { margin: 0; font-size: 14px; color: var(--text-muted, #6b7280); }
.tk-hinweis--warnung { color: inherit; border-left: 3px solid #E0A458; padding-left: 10px; }
.tk-fehler { margin: 0; font-size: 14px; color: #b91c1c; }
.tk-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 45vh; overflow-y: auto; }
.tk-abschnitt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 8px 10px; }
.tk-wahl { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.tk-label { display: grid; gap: 2px; min-width: 0; cursor: pointer; }
.tk-kopf { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--text-muted, #6b7280); }
.tk-sprecher { font-weight: 700; color: inherit; }
.tk-zeit { font-variant-numeric: tabular-nums; }
.tk-text { font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.tk-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-anhang { display: grid; gap: 8px; }
.tk-anhang .btn { justify-self: start; }
