/* wp_privacy – Papierkorb, Änderungsprotokoll, Dubletten, Austritte, Datenschutz (Paket privacy/WP7; SPEC_UI_CLOSE_1ZU1 C-20).
   Von base.html eingebunden. Seitenlayout, Werkzeugzeile und Tabellen kommen aus wp_settings.css; hier nur, was diese
   Seiten zusätzlich brauchen – und der Änderungsverlauf der Lead-Seite sowie die Dubletten-Warnung in Formularen
   (von anderen Paketen eingebunden). */

.privacy-list { margin: 0 0 12px; padding-left: 20px; }
.privacy-list li { margin: 4px 0; }
.privacy-filter { row-gap: 8px; }
/* Änderungsprotokoll und Papierkorb: Filterleiste wie Close „Event Log“ (E367) – eigener Streifen direkt unter der Titelzone
   (62 px, Linie unten), umrandete Knöpfe 32 px mit Icon 14 + Text, Abstand 6, das grau gefüllte Suchfeld nimmt die restliche
   Breite. Immer EINE Zeile: die Leiste bricht nie um – wird es eng, kürzen die Knöpfe ihren Text mit „…“ (das Suchfeld
   behält mindestens 120 px) und „Filter zurücksetzen“ ist unter 1600 px Fensterbreite nur das Icon mit Tooltip. */
.history-bar { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; min-width: 0; margin: -24px -24px 24px; padding: 15px 24px 14px; border-bottom: 1px solid var(--border-default); }
.history-bar > .btn { gap: 6px; flex: 0 1 auto; min-width: 48px; max-width: 240px; }
.history-bar > .btn .icon { width: 14px; height: 14px; flex: none; color: var(--icon-default); }
.history-bar > .btn > [data-filter-label] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-bar__search { flex: 1 1 120px; width: auto; min-width: 120px; }
/* Der Platzhalter steht immer ganz da: im Änderungsprotokoll bleiben dem Suchfeld bei 1440 und 1280 px rund 165–170 px, deshalb heißt er dort
   kurz „Lead-/Objekt-ID“ (101 px Text) und die Leiste rückt unter 1500 px auf 4 px Abstand zusammen. Solange das Feld leer ist, hält es keinen
   Platz für das „×“ des Browsers frei (rund 17 px, die dem Platzhalter fehlten); noch enger endet er mit „…“ [Abnahme ET-06] */
.history-bar__search .input { text-overflow: ellipsis; }
.history-bar__search .input:placeholder-shown::-webkit-search-cancel-button { display: none; }
@media (max-width: 1500px) { .history-bar { gap: 4px; } }
.history-bar > .history-bar__reset { flex: none; min-width: 0; }
.history-bar__reset-icon { display: none; }
@media (max-width: 1599px) {
  .history-bar > .history-bar__reset { width: 32px; padding: 0; justify-content: center; }
  .history-bar__reset-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
  .history-bar__reset-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* schmale Fenster (1280–1439): Knöpfe ohne Icon und mit 8 px Rand, damit die Beschriftungen ganz lesbar bleiben */
@media (max-width: 1439px) {
  .history-bar > .btn[data-menu] { padding: 0 8px; }
  .history-bar > .btn[data-menu] > .icon { display: none; }
}
.history-user-menu { width: 240px; }
.history-user-menu .menu-item .avatar { flex: none; }
.history-range { padding: 4px 8px 8px; }
.history-range__label { display: block; margin: 0 0 6px; font: 600 12px/16px var(--font-sans); color: var(--text-default); }
.history-range__fields { display: flex; align-items: center; gap: 6px; color: var(--text-light); }
.history-range__fields .input { width: 140px; height: 32px; }
/* Änderungsprotokoll als Zeitachse wie Close „Event Log“ (E367, E373): Zeilen 48 px ohne Tabelle – Icon im weißen Kreis 20 px
   auf einer senkrechten 1-px-Linie · Zeit grau 13 px · Objekt blau mit Buchstaben-Avatar · Ereignis fett + grauer Zusatz ·
   rechts Avatar 20 des Auslösers · Pfeil. Aufgeklappt (<details>): Kasten mit Rand und Radius 8, neuer Wert grün hinterlegt. */
.event-log { position: relative; margin: -8px 0 0; padding: 0; list-style: none; }
.event-log::before { content: ""; position: absolute; left: 9px; top: 24px; bottom: 24px; width: 1px; background: var(--border-default); }
.event-log__item { position: relative; }
.event-log__row {
  display: grid; grid-template-columns: 20px 104px minmax(140px, 26%) minmax(0, 1fr) auto 16px; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 8px 0 0; border-radius: 6px; cursor: pointer; list-style: none; font: 400 14px/20px var(--font-sans); color: var(--text-default);
}
.event-log__row::-webkit-details-marker { display: none; }
.event-log__row:hover { background: linear-gradient(to right, transparent 28px, var(--table-cell-hover) 28px); }   /* die Linie links bleibt frei */
.event-log__icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--border-default); border-radius: 50%; background: var(--surface); color: var(--icon-default); }
.event-log__icon .icon { width: 12px; height: 12px; }
.event-log__when { font-size: 13px; line-height: 18px; color: var(--text-light); white-space: nowrap; }
.event-log__object { display: flex; align-items: center; gap: 8px; min-width: 0; }
.event-log__object > .avatar { flex: none; }
.event-log__object > a, .event-log__object > span:not(.avatar):not(.status-pill) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-log__object > a { color: var(--link); }
.event-log__object > .status-pill { flex: none; }
.event-log__what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-log__what strong { font-weight: 600; }
.event-log__fields { margin-left: 4px; font-size: 13px; color: var(--text-light); }
.event-log__who { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.event-log__who .avatar { display: flex; }
.event-log__name { font-size: 13px; line-height: 18px; color: var(--text-medium); white-space: nowrap; }
.event-log__chevron { display: inline-flex; color: var(--icon-default); transition: transform var(--dur-quick) var(--ease); }
.event-log__entry[open] > .event-log__row .event-log__chevron { transform: rotate(90deg); }
.event-log__detail { margin: 0 0 12px 32px; padding: 12px 16px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.event-log__meta { margin: 0 0 8px; font-size: 13px; line-height: 18px; color: var(--text-light); }
.event-log__detail .privacy-change ins { padding: 0 4px; border-radius: 4px; background: var(--green-5); color: var(--green-70); font-weight: 400; }
.event-log + .pagination, .event-log + nav { margin-top: 16px; }
@media (max-width: 900px) {
  .event-log__row { grid-template-columns: 20px 84px minmax(0, 1fr) auto 16px; }
  .event-log__what { display: none; }
}
@media (prefers-reduced-motion: reduce) { .event-log__chevron { transition: none; } }
.privacy-count { margin-top: 0; }
.privacy-field-narrow { max-width: 420px; }

/* Tabellen */
.privacy-table td, .privacy-table tbody th { vertical-align: middle; }
.privacy-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: nowrap; }
.privacy-actions form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.privacy-name { font-weight: 600; color: var(--link); }
.privacy-table .col-check { width: 40px; }

/* Änderungen */
.privacy-changes { margin: 6px 0 0; display: grid; gap: 3px; }
.privacy-change { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 18px; }
.privacy-change dt { color: var(--text-light); font-weight: 400; overflow-wrap: anywhere; }
.privacy-change dd { margin: 0; overflow-wrap: anywhere; white-space: normal; }
.privacy-change del { color: var(--text-danger); text-decoration: line-through; text-decoration-color: rgba(221, 15, 33, .5); }
.privacy-change ins { color: var(--text-success); text-decoration: none; font-weight: 600; }
.privacy-note { display: inline-block; margin-left: 6px; font-size: 13px; color: var(--text-light); }

/* Lead-Verlauf (Reiter auf der Lead-Seite) */
.privacy-timeline { list-style: none; margin: 0; padding: 0; }
.privacy-timeline-item { border-left: 2px solid var(--border-default); padding: 6px 0 12px 14px; margin: 0 0 4px; }
.privacy-timeline-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.privacy-timeline-head .truncate { max-width: 260px; }
.privacy-more { padding: 8px 0; }

/* Dubletten-Warnung im Formular */
.privacy-duplicate-check:empty { display: none; }
.privacy-duplicate-warning { margin: 8px 0; }
.privacy-duplicate-warning ul { margin: 4px 0; }

/* Bestätigungsseiten */
.privacy-confirm-page h2 { margin-top: 0; }
.privacy-confirm-page.settings-card { overflow: hidden; }
.settings-list__row--plain { padding: 0 12px; min-height: 40px; }

/* Rückgängig-Toast */
.toast .privacy-undo-btn { margin-left: 8px; flex-shrink: 0; }

@media (max-width: 760px) {
  .privacy-change { grid-template-columns: 1fr; gap: 0; }
  .privacy-actions { justify-content: flex-start; flex-wrap: wrap; }
}
