/* workspace-bento-rechte-fenster.css — Fenster „Wer sieht „<Name>“?“ (Rechtsklick → Berechtigungen …, Ralph 23.11.2026).
   Aufbau aus den Bausteinen: Dialog = a4h-modal (marke/bausteine/43-dialog.html), Feld = a4h-field + a4h-field-label (21-felder-und-filter.html),
   Pillen = tm-pille (Auswahl grafit), Knöpfe = a4h-btn, Kürzel = a4h-avatar. Hier steht nur, was die Bausteine nicht schon liefern
   (die Stil-Basis marke-ui.css wirkt nur im Beta-Ring, darum die wenigen Rückfall-Werte). Flach: keine Kästen, ein Rollbalken. */

/* Hinter Dialogen keine Abdunklung (REGELN „Festgelegt“: --marke-abdunklung) */
.wrf-dunkel { z-index: 2200; background: var(--marke-abdunklung); }
.wrf.a4h-modal { display: flex; flex-direction: column; gap: 0; width: min(520px, 100%); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: var(--marke-r-l); background: var(--marke-flaeche); box-shadow: var(--marke-schatten); }
.wrf--server.a4h-modal { width: min(680px, 100%); max-width: 680px; }
.wrf .a4h-modal-head { align-items: center; padding: 12px 12px 0 24px; }
.wrf .a4h-modal-head .a4h-h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--marke-text); overflow-wrap: anywhere; }
.wrf .a4h-icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.wrf .a4h-modal-body { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 24px; overflow-y: auto; }
.wrf .a4h-modal-foot { position: static; align-items: center; margin: 0; padding: 12px 24px; border-top: 1px solid var(--marke-linie); }
.wrf .a4h-modal-foot[hidden] { display: none; }
.wrf-fuss-luecke { flex: 1; }
.wrf-frage { max-width: 260px; }

/* Abschnitte: flach, nur eine feine Linie dazwischen */
.wrf-teil { padding: 16px 0; }
.wrf-teil + .wrf-teil, .wrf-server { border-top: 1px solid var(--marke-linie); }
[data-firma]:empty + .wrf-server { border-top: 0; }
.wrf .a4h-field-label { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--marke-text-2); }
.wrf .a4h-hint { margin: 8px 0 0; font-size: 12px; color: var(--marke-text-2); }

/* Segment-Pillen (tm-pille aus workspace-team.css; Auswahl grafit) */
.wrf-pillen { display: flex; flex-wrap: wrap; gap: 4px; }
.wrf-pillen .tm-pille { height: 28px; padding: 0 12px; font-size: 12px; font-weight: 600; }
.wrf-pillen .tm-pille:disabled { opacity: .5; cursor: default; }
.wrf-person { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.wrf-weg { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--marke-r-pill); background: transparent; color: inherit; cursor: pointer; }
.wrf-weg svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* „+ Person“: normales Feld (38 px, Radius 9, weiß, feiner Rand), Fokus grafit wie alle Workspace-Felder (marke-ui-workspace.css), nie lila */
.wrf-person-feld { margin-top: 12px; }
.wrf .a4h-field { height: 38px; padding: 0 12px; border: 1px solid var(--marke-linie-stark); border-radius: var(--marke-r-m); background: var(--marke-flaeche); color: var(--marke-text); font: 500 13px var(--marke-schrift); box-shadow: none; }
.wrf .a4h-field:focus, .wrf .a4h-field:focus-visible { outline: 0; border-color: var(--marke-text-3); box-shadow: none; }

/* Treffer als Listenzeilen: Kürzel-Kreis + Name, leiser Hover */
.wrf-treffer { display: grid; gap: 4px; margin-top: 8px; }
.wrf-treffer-z { display: flex; align-items: center; gap: 12px; width: 100%; padding: 4px 8px; border: 0; border-radius: var(--marke-r-m); background: transparent; color: var(--marke-text); font: 500 13px var(--marke-schrift); text-align: left; cursor: pointer; }
.wrf-treffer-z:hover, .wrf-treffer-z:focus-visible { background: var(--marke-feld); outline: 0; }
.wrf-treffer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrf-treffer-z small { font-size: 12px; color: var(--marke-text-3); }
.wrf .a4h-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--marke-r-pill); background: var(--marke-akzent-zart); color: var(--marke-akzent); font-size: 11px; font-weight: 700; }

/* Schalter-Zeilen: Text links, Schalter rechts (Schalter wie .a4h-switch aus marke-ui.css, gilt hier auch ohne die Stil-Basis) */
.wrf-zeile { display: flex; align-items: center; gap: 12px; justify-content: space-between; width: 100%; padding: 8px 0; font: 500 13px var(--marke-schrift); color: var(--marke-text); }
.wrf-zeile-knopf { border: 0; background: transparent; cursor: pointer; text-align: left; }
.wrf-zeile-knopf:hover { color: var(--marke-akzent); }
.wrf .a4h-switch { position: relative; width: 36px; height: 20px; flex: none; padding: 0; border: 0; border-radius: var(--marke-r-pill); background: var(--marke-linie-stark); cursor: pointer; transition: background .15s; }
.wrf .a4h-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: var(--marke-r-pill); background: white; box-shadow: var(--marke-schatten-leise); transition: left .15s; }
.wrf .a4h-switch[aria-checked="true"] { background: var(--marke-nav-blau); }
.wrf .a4h-switch[aria-checked="true"]::after { left: 18px; }
.wrf .a4h-switch:disabled { opacity: .5; cursor: default; }
.wrf .a4h-switch:focus-visible { outline: 2px solid var(--marke-akzent); outline-offset: 2px; }

/* Abschnitt „Server“ (Betreiber, Hauptserver): Zeilen aus workspace-bento-ausliefern.css, hier nur eingepasst */
.wrf .wka-fehler { margin: 8px 0 0; }
.wrf .wka-teil--bestaetigen { padding: 12px 0 0; }

@media (max-width: 640px) {
  .wrf .a4h-modal-head { padding-left: 16px; }
  .wrf .a4h-modal-body { padding: 0 16px; }
  .wrf .a4h-modal-foot { padding: 12px 16px; flex-wrap: wrap; }
}

/* Dunkler Modus (Ralph 23.11.2026, Bildprüfung): Fenster hebt sich ab (abgesetzte Fläche + feine Linie statt unsichtbarem Schatten),
   gewählte Pille hell gefüllt wie .bw-pillen (workspace-chat-bewertung.css) – grafit wäre auf Dunkel unsichtbar. */
:root[data-theme="dark"] .wrf.a4h-modal { background: var(--marke-flaeche-2); box-shadow: 0 0 0 1px var(--marke-linie-stark), var(--marke-schatten); }
:root[data-theme="dark"] .wrf .a4h-field { background: var(--marke-flaeche); }
:root[data-theme="dark"] .wrf-pillen .tm-pille.an { background: var(--marke-text); color: var(--marke-flaeche); }

/* Rechtsklick: Fenster an der Klickstelle wie ein Kontextmenü (Ralph 24.11.2026); Lage setzt workspace-bento-rechte-fenster.js#amZeiger */
.wrf-am-zeiger.a4h-overlay { display: block; padding: 0; }
.wrf-am-zeiger .wrf.a4h-modal { position: fixed; top: var(--wrf-y, 8px); left: var(--wrf-x, 8px); max-height: calc(100vh - 16px); }
/* Ohne Fuß (z. B. „Für diesen Eintrag gibt es nichts einzustellen.“): unten Luft statt Text an der Kante */
.wrf .a4h-modal-body:has(+ .a4h-modal-foot[hidden]) { padding-bottom: 16px; }
