/* NeXtMail – Menüband im Verfassen-Fenster (verfband.js). DIESELBE Datei in Web und Windows-Client. Farben aus web.css/app.css
   (--panel, --line, --text, --muted, --hover, --accent, --accent-soft, --akzent-text, --gefahr), Maße wie das Menüband des
   Hauptfensters im Client (C-8): Reiterzeile 28 px, Fläche groß 84 px (Knopf 66 px oder 3 × 22 px + Gruppenname 14 px), kompakt 40 px (--d-band). */
.vb { --vb-reiter: 28px; --vb-flaeche: 84px; --vb-gross: 66px; --vb-klein: 22px; --vb-zeile: var(--d-band, 40px); --vb-symbol: 24px;
  position: relative; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); user-select: none; min-width: 0; flex: none;
  font-size: var(--d-schrift, 14px); }
.verfassen-kopf + .vb { border-top: 0; }
.vb-kopf { display: flex; align-items: center; gap: 6px; height: var(--vb-reiter); padding: 0 6px 0 6px; min-width: 0; }
.vb-tabs { display: flex; align-items: flex-end; gap: 1px; height: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex: 0 1 auto; }
.vb-tabs::-webkit-scrollbar { display: none; }
.vb-tab { height: 26px; padding: 0 10px; border: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex: none; }
.vb-tab:hover { background: var(--hover); color: var(--text); }
.vb-tab.an { color: var(--akzent-text); box-shadow: inset 0 -2px 0 var(--accent); }
.vb-tab.datei { color: var(--akzent-text); font-weight: 600; }
.vb-tab:focus-visible, .vb-kn:focus-visible, .vb-starter:focus-visible, .vb-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Befehlssuche */
.vb-suche { position: relative; display: flex; align-items: center; flex: 0 1 240px; min-width: 120px; margin-left: auto; }
.vb-suche > svg.ic { position: absolute; left: 8px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.vb-suche-feld { width: 100%; height: 24px; padding: 0 8px 0 28px; border: 1px solid var(--line); border-radius: var(--d-radius, 4px); background: var(--panel2, var(--panel));
  color: var(--text); font: inherit; font-size: 13px; outline: none; min-width: 0; }
.vb-suche-feld:focus { border-color: var(--accent); background: var(--panel); }
.vb-suche-feld::placeholder { color: var(--muted); }
.vb-suche-feld::-webkit-search-cancel-button { cursor: pointer; }
.vb-treffer { position: fixed; z-index: 95; min-width: 260px; }
.vb-treffer button { display: flex; align-items: center; gap: 10px; width: 100%; }
.vb-treffer button.aktiv { background: var(--hover); }
.vb-treffer kbd { margin-left: auto; font: 12px var(--schrift, inherit); color: var(--muted); }
.vb-treffer .vb-leer { padding: 8px 12px; color: var(--muted); }

/* Knöpfe */
.vb-kn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 0; border-radius: var(--d-radius, 4px); background: transparent; color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; flex: none; min-width: 0; }
.vb-kn svg.ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.vb-kn:hover:not(:disabled) { background: var(--hover); }
.vb-kn.an { background: var(--accent-soft); color: var(--akzent-text); }
.vb-kn.an svg.ic { color: var(--akzent-text); }
.vb-kn.gefahr:not(:disabled), .vb-kn.gefahr:not(:disabled) svg.ic { color: var(--gefahr); }
.vb-kn:disabled { opacity: .42; cursor: default; }
.vb-kn .pfeil { width: 12px !important; height: 12px !important; margin-left: -3px; }
.vb-umschalter { height: 24px; padding: 0 5px; flex: none; }
.vb-umschalter .txt { display: none; }
.vb-umschalter svg.ic { width: 18px; height: 18px; }

/* Leiste */
.vb-leiste { display: flex; align-items: center; gap: 2px; height: var(--vb-zeile); padding: 0 6px; overflow: hidden; min-width: 0; flex-wrap: nowrap; border-top: 1px solid var(--line); }
.vb-trenn { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex: none; }
.vb-mehr { margin-left: auto; }
.vb-kn.flach { width: 32px; padding: 0; justify-content: center; }
.vb-kn.flach .txt, .vb-kn.flach .pfeil { display: none; }
.vb-kn.flach.mit-text { width: auto; padding: 0 8px; }
.vb-kn.flach.mit-text .txt, .vb-kn.flach.mit-text .pfeil { display: inline-block; }
.vb-kn.flach svg.ic { width: 18px; height: 18px; }
.vb-sel { height: 26px; padding: 0 4px; border: 1px solid var(--line); border-radius: var(--d-radius, 4px); background: var(--panel); color: var(--text); font: inherit; font-size: 13px;
  flex: none; min-width: 0; cursor: pointer; }
.vb-sel:disabled { opacity: .45; cursor: default; }
.vb-leiste[data-modus=kompakt] .vb-sel { margin: 0 2px; }

/* groß: Gruppen mit Namen unten und Dialogknopf */
.vb-leiste[data-modus=gross] { height: var(--vb-flaeche); align-items: stretch; padding: 2px 4px 1px; }
.vb-gruppe { display: flex; flex-direction: column; padding: 0 4px; border-right: 1px solid var(--line); flex: none; min-width: 0; }
.vb-inhalt { display: flex; align-items: flex-start; gap: 2px; flex: 1; min-height: 0; }
.vb-gname { position: relative; height: 14px; font-size: 11px; line-height: 14px; color: var(--muted); text-align: center; white-space: nowrap; padding: 0 16px; }
.vb-starter { position: absolute; right: -2px; bottom: 0; width: 14px; height: 14px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.vb-starter svg.ic { width: 11px; height: 11px; stroke-width: 2.2; }
.vb-starter:hover { background: var(--hover); color: var(--text); }
.vb-kn.gross { flex-direction: column; justify-content: flex-start; height: var(--vb-gross); width: auto; min-width: 46px; max-width: 120px; padding: 3px 4px 2px; gap: 2px;
  white-space: nowrap; text-align: center; line-height: 1.15; font-size: 12px; }
.vb-kn.gross > svg.ic { width: var(--vb-symbol); height: var(--vb-symbol); }
.vb-kn.gross .txt { display: flex; flex-direction: column; align-items: center; max-width: 110px; }
.vb-kn.gross .txt .z { display: block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.vb-kn.gross .txt .pfeil { display: inline-block; width: 11px !important; height: 11px !important; margin: 0 0 0 1px; vertical-align: -1px; }
.vb-stapel { display: flex; flex-direction: column; justify-content: flex-start; }
.vb-kn.klein, .vb-reihe .vb-kn { height: var(--vb-klein); padding: 0 6px; gap: 5px; font-size: 12px; }
.vb-kn.klein svg.ic { width: 15px; height: 15px; }
.vb-reihe { display: flex; align-items: center; gap: 1px; height: calc(var(--vb-klein) + 2px); }
.vb-reihe .vb-kn.symbol { width: 24px; padding: 0; justify-content: center; }
.vb-reihe .vb-kn.symbol .txt { display: none; }
.vb-reihe .vb-kn.symbol .pfeil { display: none; }
.vb-reihe .vb-kn.symbol[aria-haspopup] { width: 30px; gap: 0; }
.vb-reihe .vb-kn.symbol[aria-haspopup] .pfeil { display: inline-block; margin-left: -1px; width: 10px !important; height: 10px !important; }
.vb-reihe .vb-kn.symbol svg.ic { width: 16px; height: 16px; }
.vb-reihe .vb-sel { height: 22px; font-size: 12.5px; margin-right: 2px; }
.vb-gruppe.zu { min-width: 0; }
/* Formatvorlagen: Name in der Form der Vorlage */
.vb-kn.vb-vorlage .txt { font-family: inherit; }
.vb-kn.v-ue1 .txt { font-weight: 600; color: var(--akzent-text); }
.vb-kn.v-ue2 .txt { font-weight: 600; }
.vb-kn.v-titel .txt { font-size: 14px; letter-spacing: -.2px; }
.vb-kn.v-untertitel .txt { color: var(--muted); }
.vb-kn.v-zitat .txt { font-style: italic; }
.vb-leiste[data-modus=gross] .vb-mehr { align-self: center; }

/* schmal (Handy): eine Zeile, Reiterwahl vorn */
.vb.vb-schmal .vb-kopf { height: 40px; }
.vb.vb-schmal .vb-reiterwahl { font-weight: 600; height: 36px; }
.vb.vb-schmal .vb-reiterwahl .pfeil { display: inline-block; }
.vb.vb-schmal .vb-suche { flex: 1 1 auto; }
.vb.vb-schmal .vb-suche-feld { height: 32px; }
.vb.vb-schmal .vb-leiste { height: 44px; }
.vb.vb-schmal .vb-kn.flach { width: 36px; height: 36px; }
.vb.vb-schmal .vb-kn.flach.mit-text { width: auto; }
.vb.vb-schmal .vb-mehr { height: 36px; }

/* Tastenhinweise */
.vb-tipp { position: fixed; z-index: 120; transform: translate(-50%, 0); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; background: var(--text); color: var(--panel);
  font: 600 12px/18px var(--schrift, inherit); text-align: center; pointer-events: none; box-shadow: var(--schatten-klein, 0 1px 3px rgba(0,0,0,.2)); }

/* Aufklapper mit Raster */
.vb-pop { position: fixed; z-index: 96; min-width: 0; padding: 6px; }
.vb-pop .kopfz { padding: 2px 4px 6px; font-size: 12.5px; color: var(--muted); }
.vb-pop-zeile { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.vb-pop-zeile:hover { background: var(--hover); }
.vb-raster { display: grid; gap: 3px; }
.vb-farben { grid-template-columns: repeat(5, 22px); padding: 4px; }
.vb-farbe { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.vb-farbe:hover, .vb-farbe:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.vb-tabraster { gap: 2px; padding: 2px 4px 4px; }
.vb-zelle { width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); cursor: pointer; }
.vb-zelle.an { background: var(--accent-soft); border-color: var(--accent); }
.vb-symbole { grid-template-columns: repeat(10, 28px); padding: 2px; }
.vb-zeichen { width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); font: 15px/1 var(--schrift, inherit); cursor: pointer; }
.vb-zeichen:hover, .vb-zeichen:focus-visible { background: var(--hover); border-color: var(--line); }
/* Client 18 (Nutzerfund D3 „Tabelle sieht komisch aus“): Die Raster sitzen in „.menue.vb-pop“ – die allgemeine Regel
   „.menue button“ (Breite 100 %, Höhe 36 px, kein Rand, durchsichtig; dichte.css min-height) war stärker als die
   Zellen-Regeln. Dann sah man nur eine Zelle und eine leere Fläche. Mit „.vb-pop“ davor gelten wieder die Maße hier. */
.vb-pop .vb-zelle, .vb-pop .vb-farbe, .vb-pop .vb-zeichen { display: block; min-width: 0; min-height: 0; gap: 0; margin: 0; }
.vb-pop .vb-zelle { width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); }
.vb-pop .vb-zelle.an { background: var(--accent-soft); border-color: var(--accent); }
.vb-pop .vb-zelle:hover { background: var(--accent-soft); }
.vb-pop .vb-farbe { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px; }
.vb-pop .vb-zeichen { width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 4px; text-align: center; font: 15px/1 var(--schrift, inherit); }
.vb-pop .vb-zeichen:hover, .vb-pop .vb-zeichen:focus-visible { background: var(--hover); border-color: var(--line); }
.vb-pop .vb-tabinfo { text-align: center; }

/* Dialoge */
.vb-werte { display: flex; flex-direction: column; min-width: 280px; }
.vb-wert { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--line); }
.vb-wert:first-child { border-top: 0; }
.vb-wert kbd { font: 12.5px var(--schrift, inherit); color: var(--muted); white-space: nowrap; }
.vb-zeile { margin-bottom: 10px; }
.vb-haken { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.vb-haken input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.vb-stile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; margin: 4px 0 10px; }
.vb-vorschau { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2, var(--panel)); min-height: 52px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vb-farbwahl { width: 56px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.vb-fund, .vb-marke { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.vb-fund:first-child, .vb-marke:first-child { border-top: 0; }
.vb-fund > span, .vb-marke > span { flex: 1 1 200px; min-width: 0; }
.vb-fund .feld { flex: 1 1 160px; height: 30px; }
.vb-fund.erledigt { opacity: .5; }
.vb-optionen .feld { max-width: 360px; }
.vb-adressbuch { max-height: 340px; overflow: auto; }
.vb-person { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 0; border-top: 1px solid var(--line); }
.vb-person:first-child { border-top: 0; }
.vb-person .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vb-person .t b, .vb-person .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-person .t span { color: var(--muted); font-size: 12.5px; }

/* Format übertragen: Zeiger mit Pinsel */
.editor.vb-maler, .vb-maler { cursor: copy; }
@media print { .vb, .vb-tipp, .vb-pop, .vb-treffer { display: none !important; } }
html.wenig-bewegung .vb * { transition: none !important; }
