/* ── Maskierung · Tabelle (design part 3) — tokens only ──────────────────── */
/* README §1c Tabelle mode; inline styles of Lysi Workspace.dc.html.         */

.wst { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* buttons: `.wst .x` (0,2,0) beats ws-mask.css `.wsm button` reset (0,1,1) */

/* filter chips */
.wst .wst-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--lysi-s-6);
  padding: var(--lysi-s-12) var(--lysi-s-16); border-bottom: 1px solid var(--lysi-border);
}
.wst .wst-chip {
  display: flex; align-items: center; gap: var(--lysi-s-6); padding: 3px var(--lysi-s-10);
  border: 0; border-radius: var(--lysi-r-99); background: transparent; color: var(--lysi-ink2);
  box-shadow: inset 0 0 0 1px var(--lysi-ghost); cursor: pointer;
  font: 500 var(--lysi-fs-12-5) var(--lysi-font-sans);
}
.wst .wst-chip.is-on { background: var(--lysi-btn); color: var(--lysi-on-btn); box-shadow: inset 0 0 0 1px var(--lysi-btn); }
.wst .wst-chip .wst-sw { width: 7px; height: 7px; }
.wst .wst-n { font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-11-5); opacity: .8; }
.wst-sw { width: var(--lysi-s-8); height: var(--lysi-s-8); border-radius: 2px; background: var(--cat-swatch); flex: none; }
.wst-sw-warn { background: var(--lysi-warn-line); }

/* grid: Original · Platzhalter · Sicherheit */
.wst-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr) 150px;
  align-items: center; padding: 0 var(--lysi-s-20);
}
.wst-head {
  height: 34px; flex: none; border-bottom: 1px solid var(--lysi-border); color: var(--lysi-ink3);
  font-size: var(--lysi-fs-11); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.wst-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 52px; }   /* room for the last row's hover overlay */
.wst-row { border-bottom: 1px solid var(--lysi-border); }
.wst-row.is-open { box-shadow: inset 3px 0 0 var(--lysi-warn-line); }   /* open = same row + amber edge (owner 2026-10-03) */
.wst-line { height: 40px; cursor: pointer; font-size: var(--lysi-fs-13-5); color: var(--lysi-ink); }
.wst-orig { display: flex; align-items: center; gap: var(--lysi-s-8); min-width: 0; padding-right: var(--lysi-s-10); }
.wst-otext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wst-phcell { min-width: 0; overflow: hidden; }
.wst-ph, .wst-kept {
  font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-11-5); font-weight: 500;
  padding: var(--lysi-s-2) var(--lysi-s-6); border-radius: var(--lysi-r-4); white-space: nowrap;
}
.wst-ph { background: var(--cat-bg); color: var(--cat-fg); }
.wst-kept { background: var(--lysi-seg); color: var(--lysi-ink2); font-family: var(--lysi-font-sans); }

/* Sicherheit: 56×5 bar + mono value; amber below 80 % (scored rows only) */
.wst-conf { display: flex; align-items: center; gap: var(--lysi-s-9); }
.wst-bar { width: 56px; height: 5px; border-radius: 3px; background: var(--lysi-track2); overflow: hidden; }
.wst-fill { display: block; height: 100%; background: var(--lysi-accent); }
.wst-val { font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-12-5); font-weight: 600; color: var(--lysi-ink); }
.wst-conf.is-low .wst-fill { background: var(--lysi-warn-line); }
.wst-conf.is-low .wst-val { color: var(--lysi-warn-ink); }

/* action strip under open rows (decided rows: on hover) */
.wst-strip {
  display: flex; align-items: center; gap: var(--lysi-s-6); white-space: nowrap;
  padding: 0 var(--lysi-s-20) var(--lysi-s-10) 36px; font-size: var(--lysi-fs-12-5); font-weight: 500;
}
/* decided rows: the strip appears on hover / keyboard focus only — as an overlay
   over the next row, so nothing below shifts whichever way the pointer comes from */
.wst-row:not(:hover):not(:focus-within):not(.is-hot) .wst-strip-hover { display: none; }
.wst-row { position: relative; }
.wst-row .wst-strip-hover {
  /* one fixed start for every row, just after a short word like «Köln» (ends at 63 px;
     owner 2026-09-30), so the pointer can go straight down past it to the next name */
  position: absolute; right: 0; top: 100%; z-index: 3; left: 73px;
  padding: var(--lysi-s-8) var(--lysi-s-12) var(--lysi-s-10); flex-wrap: wrap; row-gap: var(--lysi-s-6);
  border-left: 1px solid var(--lysi-border); border-bottom-left-radius: var(--lysi-r-8);
  background: color-mix(in srgb, var(--lysi-panel) 78%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--lysi-border); box-shadow: var(--lysi-shadow-panel);
}
.wst-row:hover { z-index: 3; }
.wst .wst-act {
  display: flex; align-items: center; gap: var(--lysi-s-8); padding: 5px 11px; border-radius: var(--lysi-r-6);
  border: 1px solid transparent; background: transparent; color: var(--lysi-ink); cursor: pointer; font: inherit;
}
.wst .wst-act-primary { border-color: var(--lysi-ink3); font-weight: 600; }   /* quiet outline, not a solid block */
.wst .wst-act-ghost { border-color: var(--lysi-ghost); }
.wst .wst-act-text { padding: 5px var(--lysi-s-8); color: var(--lysi-ink2); }
.wst-kbd { font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-11); opacity: .6; }
.wst-why { margin-left: auto; color: var(--lysi-warn-ink); font-weight: 600; }
.wst-input {
  flex: 1; min-width: 0; padding: 5px var(--lysi-s-8); border: 1px solid var(--lysi-ghost); border-radius: var(--lysi-r-6);
  background: var(--lysi-card); color: var(--lysi-ink); font: 500 var(--lysi-fs-12-5) var(--lysi-font-mono);
}

/* footer */
.wst-foot {
  display: flex; align-items: center; gap: var(--lysi-s-8); padding: var(--lysi-s-12) var(--lysi-s-20);
  border-top: 1px solid var(--lysi-border); font-size: var(--lysi-fs-12-5);
}
.wst-count { color: var(--lysi-ink2); white-space: nowrap; }
.wst .wst-save {
  margin-left: auto; padding: var(--lysi-s-6) 11px; border: 1px solid var(--lysi-ghost); border-radius: var(--lysi-r-6);
  background: transparent; color: var(--lysi-ink); font: 500 var(--lysi-fs-12-5) var(--lysi-font-sans); white-space: nowrap; cursor: pointer;
}

/* ⌘⇧C while open > 0: the disabled confirm button nudges (keys.js) */
.ws-flash { animation: ws-flash 600ms ease; }
@keyframes ws-flash {
  0%, 100% { transform: none; }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .ws-flash { animation: none; outline: 2px solid var(--lysi-warn-line); }
}

/* one focused data point (row click → lit in the text) + Kategorien headers */
.wst-row.is-focus { box-shadow: inset 3px 0 0 var(--lysi-accent); background: var(--lysi-row-on); }
.wst-group {
  display: flex; align-items: center; gap: var(--lysi-s-8); width: 100%; height: 36px; padding: 0 var(--lysi-s-12);
  border: 0; border-bottom: 1px solid var(--lysi-border); background: none; color: var(--lysi-ink);
  font: inherit; font-size: var(--lysi-fs-13); font-weight: 500; cursor: pointer; text-align: left;
}
.wst-group:hover, .wst-group.is-on { background: var(--lysi-row-on); }
.wst-group-name { flex: 1; }

/* «Zu prüfen» section head above the Kategorien accordion */
.wst-sec { display: flex; align-items: baseline; gap: var(--lysi-s-8); padding: var(--lysi-s-14) var(--lysi-s-20) var(--lysi-s-8); border-bottom: 1px solid var(--lysi-border); }
.wst-sec-title { font-size: var(--lysi-fs-14); font-weight: 600; color: var(--lysi-ink); }
.wst-sec-n { font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-12); color: var(--lysi-ink3); }
.wst-sec-n.is-warn { font-weight: 600; color: var(--lysi-warn-ink); }
.wst .wst-link { margin-left: auto; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: var(--lysi-fs-12-5); font-weight: 500; color: var(--lysi-accent-text); }
/* «Zu prüfen» · Kategorien head: category + range + «n offen», Alle maskieren / Alle behalten */
.wst-cat { padding: var(--lysi-s-10) var(--lysi-s-12) var(--lysi-s-10); border-bottom: 1px solid var(--lysi-border); box-shadow: inset 3px 0 0 var(--lysi-warn-line); display: flex; flex-direction: column; gap: var(--lysi-s-8); }
.wst-cat-line { display: flex; align-items: center; gap: var(--lysi-s-8); font-size: var(--lysi-fs-13); font-weight: 600; color: var(--lysi-ink); }
.wst-cat-range { margin-left: auto; font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-11-5); color: var(--lysi-warn-ink); }
.wst-cat-n { font-size: var(--lysi-fs-12); font-weight: 400; color: var(--lysi-ink2); white-space: nowrap; }
.wst-cat-acts { display: flex; gap: var(--lysi-s-6); font-size: var(--lysi-fs-12-5); font-weight: 500; }
/* after a decision: the open row now on that spot looks hovered — overlay above the row below it */
.wst-row.is-hot { z-index: 4; }
.wst-row:is(:hover, .is-hot) .wst-line { background: var(--lysi-row-on); }
.wst-group-acts { display: flex; justify-content: flex-end; padding: var(--lysi-s-6) var(--lysi-s-20); border-bottom: 1px solid var(--lysi-border); }

/* Kategorien accordion (owner 2026-10-03): heads stay visible, the open category's rows scroll */
.wst-body.wst-acc-body { display: flex; flex-direction: column; overflow-y: auto; padding-bottom: 0; }
.wst-acc-body > :not(.wst-acc-rows) { flex: none; }
.wst-acc-head {
  display: flex; align-items: center; gap: var(--lysi-s-8); width: 100%; height: 40px; padding: 0 var(--lysi-s-12);
  border: 0; border-bottom: 1px solid var(--lysi-border); background: none; color: var(--lysi-ink);
  font: inherit; font-size: var(--lysi-fs-13); font-weight: 500; cursor: pointer; text-align: left;
}
.wst-acc-head:hover, .wst-acc-head.is-on { background: var(--lysi-row-on); }
.wst-acc-head.is-on { font-weight: 600; }
.wst-acc-warn { display: inline-flex; align-items: center; gap: var(--lysi-s-4); font-family: var(--lysi-font-mono); font-size: var(--lysi-fs-12); font-weight: 600; color: var(--lysi-warn-ink); }
.wst-acc-warn .ws-icon { color: var(--lysi-warn-line); }
.wst-acc-acts { padding: var(--lysi-s-8) var(--lysi-s-12); border-bottom: 1px solid var(--lysi-border); }
.wst-acc-rows { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding-bottom: 52px; border-bottom: 1px solid var(--lysi-border); }   /* room for the last row's overlay */

/* bulk-decision undo toast (undoToast.js) */
.ws-undo-toast {
  position: fixed; left: 50%; bottom: var(--lysi-s-24); transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: var(--lysi-s-12); padding: var(--lysi-s-8) var(--lysi-s-16);
  border-radius: var(--lysi-r-99); background: var(--lysi-btn); color: var(--lysi-on-btn);
  font: 500 var(--lysi-fs-12-5) var(--lysi-font-sans);
}
.ws-undo-toast .ws-undo-btn {
  border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer;
}
