/* Textbausteinkatalog: Auswahlebene (aus anderen Modulen aufrufbar) und Verwaltung. Farben über die Lila-Tokens der Verwaltung. */
.text-blocks-overlay { --tb-surface:var(--compact-surface,#fff); --tb-soft:var(--compact-soft,#faf8fb); --tb-text:var(--compact-text,#2b2432); --tb-muted:var(--compact-muted,#7a7086); --tb-line:var(--compact-line,#eee7f1); --tb-border:var(--lila-border,#d9d0de); --tb-tint:var(--compact-tint,#f1e9f5); --tb-accent:var(--compact-accent,#4e2555);
  position:fixed; inset:0; z-index:1200; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(43,36,50,.45); backdrop-filter:blur(2px); color:var(--tb-text); }
.text-blocks-dialog { display:grid; grid-template-rows:auto 1fr auto; width:min(1040px, 100%); max-height:min(88vh, 760px); background:var(--tb-surface); border-radius:12px; box-shadow:0 24px 60px rgba(43,36,50,.35); overflow:hidden; }
.text-blocks-dialog > header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 20px; border-bottom:1px solid var(--tb-line); background:var(--lila-heading,var(--tb-soft)); }
.text-blocks-dialog > header h2 { margin:0; font-size:16px; font-weight:650; color:var(--tb-text); }
.text-blocks-dialog > header p { margin:3px 0 0; font-size:12.5px; color:var(--tb-muted); }
.text-blocks-close { border:none; background:transparent; cursor:pointer; padding:6px; border-radius:8px; color:var(--tb-muted); }
.text-blocks-close:hover { background:var(--tb-tint); color:var(--tb-accent); }
.text-blocks-close svg { width:18px; height:18px; }
.text-blocks-body { display:grid; grid-template-columns:minmax(240px, 320px) 1fr; min-height:0; }
.text-blocks-body aside { display:grid; grid-template-rows:auto auto 1fr; gap:8px; padding:14px; border-right:1px solid var(--tb-line); background:var(--tb-soft); min-height:0; }
.text-blocks-body aside input, .text-blocks-body aside select { min-height:36px; padding:6px 10px; border:1px solid var(--tb-border); border-radius:8px; font:inherit; background:var(--tb-surface); color:var(--tb-text); }
.text-blocks-list { list-style:none; margin:0; padding:0; overflow:auto; min-height:0; }
.text-blocks-list li { padding:8px 10px; border-radius:8px; cursor:pointer; display:grid; gap:2px; }
.text-blocks-list li:hover { background:var(--tb-tint); }
.text-blocks-list li.active { background:#643182; color:#fff; }
.text-blocks-list li.active small { color:rgba(255,255,255,.8); }
.text-blocks-list li small { font-size:11.5px; color:var(--tb-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.text-blocks-list li.text-blocks-group { cursor:default; padding:10px 10px 2px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--tb-muted); }
.text-blocks-list li.text-blocks-group:hover { background:transparent; }
.text-blocks-list li.muted, .text-blocks-list li.danger-text { cursor:default; }
.text-blocks-preview { display:grid; grid-template-rows:auto 1fr auto; gap:10px; padding:14px 18px; min-height:0; }
.text-blocks-preview label { display:grid; gap:4px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--tb-muted); min-height:0; }
.text-blocks-preview input, .text-blocks-preview textarea { padding:8px 10px; border:1px solid var(--tb-border); border-radius:8px; font:inherit; font-size:13.5px; line-height:1.45; background:var(--tb-surface); color:var(--tb-text); text-transform:none; letter-spacing:0; }
.text-blocks-preview textarea { resize:vertical; min-height:200px; }
.text-blocks-missing { margin:0; font-size:12px; color:#9a2c22; }
.text-blocks-dialog > footer { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:12px 20px; border-top:1px solid var(--tb-line); background:var(--tb-soft); }
.text-blocks-dialog > footer .text-blocks-hint { margin-right:auto; font-size:12px; }
.text-blocks-dialog .button { display:inline-flex; align-items:center; gap:6px; }
@media (max-width: 720px) {
  .text-blocks-body { grid-template-columns:1fr; grid-template-rows:minmax(160px, 40%) 1fr; }
  .text-blocks-body aside { border-right:none; border-bottom:1px solid var(--tb-line); }
}

/* Verwaltung (Einstellungen › Textbausteine): Ergänzungen zu workspace-modules.css */
.text-blocks-row.inactive .wm-row-main strong, .text-blocks-row.inactive .text-blocks-excerpt { color:var(--wm-muted,#9b93a3); }
.text-blocks-row .text-blocks-subject-line { color:var(--wm-accent,#4e2555); font-size:12.5px; }
.text-blocks-row .text-blocks-excerpt { white-space:pre-line; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.text-blocks-editor textarea { min-height:220px; }
.text-blocks-editor-row .toggle-row { min-height:38px; }
.text-blocks-preview-subject { padding:8px 12px; font-weight:600; max-height:none; }
