/* NeXtMail Web – Menüband (nm-web-band). Farben aus web.css; Maße über --d-band-* (nm-dichte kann sie je Dichte setzen),
   Vorgabe gemessen am Vorbild (Bild 4, 100 %): Reiterzeile 32 px, Fläche 90 px = große Knöpfe 66 px (Symbol 26 px)
   bzw. Dreierstapel 3 × 22 px + Gruppenname 16 px; vereinfacht 40 px. */
:root { --d-band-reiter: 28px; --d-band-tab: 26px; --d-band-flaeche: 84px; --d-band-gross: 66px; --d-band-klein: 22px; --d-band-zeile: 40px; --d-band-symbol: 24px; }   /* nm-verfassen-band 14.11.: Maße wie der Windows-Client (C-8: Reiter 28, Fläche 84) */

/* Gerüst: das Band ist eine eigene Zeile neben der Navigationsleiste */
.app.mit-band { grid-template-rows: var(--kopf) auto minmax(0, 1fr); }
.app.mit-band > .navleiste { grid-row: 2 / 4; }
.app.mit-band > .band { grid-row: 2; grid-column: 2; min-width: 0; }
.app.mit-band > .inhalt { grid-row: 3; }

.band { position: relative; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 6; min-width: 0; user-select: none; }
.band-reiter { display: flex; align-items: center; gap: 2px; height: var(--d-band-reiter); padding: 0 6px 0 8px; min-width: 0; }
.band-reiter-liste { display: flex; align-items: flex-end; gap: 2px; height: 100%; min-width: 0; }
.band-reiter .luecke { flex: 1; }
.band-tab { height: var(--d-band-tab); padding: 0 10px; border: 0; border-radius: 7px 7px 0 0; background: transparent; color: var(--muted); font-weight: 500; font-size: 12.5px;
  cursor: pointer; white-space: nowrap; flex: none; }
.band-tab:hover { background: var(--hover); color: var(--text); }
.band-tab.an { color: var(--akzent-text); box-shadow: inset 0 -2px 0 var(--accent); }
.band-tab.datei { color: var(--akzent-text); font-weight: 600; }
.band-tab:focus-visible, .band-kn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.band-optionen.ik { width: 26px; height: 26px; }
/* web-gleichstand (Build 25): Menüband ein-/ausklappen gut sichtbar in der Reiterzeile */
.band-klapp-reiter { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; margin-right: 4px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; flex: none; }
.band-klapp-reiter svg.ic { width: 15px; height: 15px; color: var(--muted); }
.band-klapp-reiter:hover { background: var(--hover); }
.band-klapp-reiter[aria-pressed=true] { background: var(--accent-soft); color: var(--akzent-text); border-color: transparent; }
.band-klapp-reiter:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.band-leiste { display: flex; align-items: center; gap: 2px; height: 40px; padding: 4px 8px; overflow: hidden; min-width: 0; flex-wrap: nowrap; border-top: 1px solid var(--line); }
.band-leiste:not([data-modus=klassisch]) { height: var(--d-band-zeile); }
.band-kn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--text);
  cursor: pointer; white-space: nowrap; font-size: 14px; flex: none; min-width: 0; }
.band-kn svg.ic { color: var(--muted); }
.band-kn:hover:not(:disabled) { background: var(--hover); }
.band-kn.an { background: var(--accent-soft); color: var(--akzent-text); }
.band-kn.an svg.ic { color: var(--akzent-text); }
.band-kn.gefahr:not(:disabled), .band-kn.gefahr:not(:disabled) svg.ic { color: var(--gefahr); }
.band-kn:disabled { opacity: .42; cursor: default; }
.band-kn .pfeil { width: 14px; height: 14px; margin-left: -3px; }
.band-kn.ohne-text { width: 32px; padding: 0; justify-content: center; }
.band-kn.ohne-text .txt, .band-kn.ohne-text .pfeil { display: none; }
.band-trenn { width: 1px; height: 20px; background: var(--line); margin: 0 5px; flex: none; }
.band-mehr { margin-left: auto; }
.band-klapp { width: 28px; padding: 0; justify-content: center; margin-left: 2px; }
.band-mehr + .band-klapp, .band-mehr[hidden] + .band-klapp { margin-left: auto; }
.band-mehr:not([hidden]) + .band-klapp { margin-left: 2px; }
.band-leiste.schwebend { position: absolute; left: 0; right: 0; top: var(--d-band-reiter); background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: var(--schatten); z-index: 30; }

/* klassisch: Gruppen mit Namen unten */
.band-leiste[data-modus=klassisch] { height: var(--d-band-flaeche); align-items: stretch; padding: 2px 4px 1px; }
.band-gruppe { display: flex; flex-direction: column; padding: 0 4px; border-right: 1px solid var(--line); flex: none; }
.band-gruppe-inhalt { display: flex; align-items: flex-start; gap: 2px; flex: 1; min-height: 0; }
.band-gruppe-name { font-size: 11px; line-height: 14px; padding-top: 1px; color: var(--muted); text-align: center; white-space: nowrap; }
.band-kn.gross { flex-direction: column; justify-content: flex-start; height: var(--d-band-gross); width: min-content; min-width: 48px; max-width: 96px; padding: 5px 5px 2px; gap: 3px; white-space: normal;
  text-align: center; line-height: 1.2; font-size: 13px; }
.band-kn.gross > svg.ic { width: var(--d-band-symbol); height: var(--d-band-symbol); flex: none; }
.band-kn.gross .txt { flex: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* nm-ui-perfekt B-1: Menüpfeil steht in der Textzeile, der Knopf bleibt so hoch wie die anderen */
.band-kn.gross .txt svg.ic.pfeil { display: inline-block; width: 12px; height: 12px; margin: 0 0 0 1px; vertical-align: -1px; }
.band-stapel { display: flex; flex-direction: column; justify-content: flex-start; }
.band-kn.klein { height: var(--d-band-klein); padding: 0 7px; gap: 6px; font-size: 13px; }
.band-kn.klein svg.ic { width: 16px; height: 16px; }
.band-kn.klein .pfeil { width: 12px; height: 12px; }
.band-gruppe.zu { min-width: 0; }

/* Schnellzugriff in der Kopfleiste */
.band-schnell { display: flex; align-items: center; gap: 2px; margin-right: 6px; }
.band-schnell .band-kn { width: 32px; height: 32px; padding: 0; justify-content: center; }
.band-schnell .band-kn .txt, .band-schnell .band-kn .pfeil { display: none; }
.band-schnell .band-kn svg.ic { width: 18px; height: 18px; }
.band-schnell .band-schnell-mehr { width: 22px; }
.band-schnell .band-schnell-mehr svg.ic { width: 14px; height: 14px; }

/* Tastenhinweise */
.band-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); text-align: center; pointer-events: none; box-shadow: var(--schatten-klein); }

/* Datei (Rückseite) */
.band-datei { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: 220px minmax(0, 1fr); background: var(--bg); }
.band-datei-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; background: var(--fuell1); background: linear-gradient(180deg, var(--fuell1), var(--fuell2)); }
.band-datei-nav button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; text-align: left; font-size: 14px; }
.band-datei-nav button svg.ic { color: #fff; }
.band-datei-nav button:hover, .band-datei-nav button.an { background: rgba(255, 255, 255, .18); }
.band-datei-nav button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.band-datei-nav .band-datei-zurueck { margin-bottom: 10px; }
.band-datei-nav .luecke { flex: 1; }
.band-datei-inhalt { padding: 28px 32px; overflow: auto; max-width: 860px; }
.band-datei-inhalt h1 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.band-konto { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.band-konto b { display: block; }
.band-konto span:not(.konto-kn) { color: var(--muted); font-size: 13px; }
.band-kachel { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 560px; min-height: 64px; margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); color: var(--text); cursor: pointer; text-align: left; box-shadow: var(--schatten-klein); }
.band-kachel:hover:not(:disabled) { background: var(--hover); }
.band-kachel:disabled { opacity: .55; cursor: default; }
.band-kachel svg.ic { width: 26px; height: 26px; color: var(--akzent-text); }
.band-kachel b { display: block; font-weight: 600; }
.band-kachel .t span { display: block; color: var(--muted); font-size: 12.5px; }

/* Anpassen */
.band-anpassen .zeile { margin-bottom: 12px; }
.band-anpassen .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.band-anp-liste { border: 1px solid var(--line); border-radius: 10px; max-height: 320px; overflow: auto; margin-bottom: 12px; }
.band-anp-zeile { display: flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 4px 0 10px; border-top: 1px solid var(--line); }
.band-anp-zeile:first-child { border-top: 0; }
.band-anp-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.band-anp-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-anp-name kbd { margin-left: auto; font-size: 12px; color: var(--muted); }
.band-anp-name svg.ic { color: var(--muted); }
.band-anp-zeile .ik { width: 32px; height: 32px; }
.band-anp-kopf { font-size: 13px; font-weight: 600; margin: 14px 0 8px; }
.band-anp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.band-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 15px; font-size: 13px; background: var(--panel2); cursor: pointer; }
.band-info-zeile { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.band-info-zeile:first-child { border-top: 0; }
.band-info-zeile span { color: var(--muted); }

/* Schreibfenster */
.verfassen > .band-verfassen { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); z-index: 1; }
.band-verfassen .band-reiter { height: 34px; padding-left: 6px; }
.band-verfassen .band-tab { height: 30px; font-size: 13.5px; }
/* durchlauf W-4: schmales Schreibfenster (Handy 375 px) – Registerkarten wischbar statt abgeschnitten */
.band-verfassen .band-reiter { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.band-verfassen .band-reiter::-webkit-scrollbar { display: none; }
.band-verfassen .band-tab { flex: none; white-space: nowrap; }

/* schmal (Handy): eine Zeile mit Registerkarten-Wahl */
.band.schmal .band-leiste { border-top: 0; height: 44px; }
.band-reiterwahl { font-weight: 600; }
@media (max-width: 760px) {
  .app.mit-band { grid-template-rows: var(--kopf) auto minmax(0, 1fr) calc(60px + env(safe-area-inset-bottom)); }
  .app.mit-band > .band { grid-column: 1; grid-row: 2; }
  .app.mit-band > .inhalt { grid-row: 3; grid-column: 1; }
  .app.mit-band > .navleiste { grid-row: 4; grid-column: 1; }
  .band-kn { height: 36px; }
  .band-kn.ohne-text { width: 36px; }
  .band-schnell { display: none; }
  .band-datei { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .band-datei-nav { flex-direction: row; flex-wrap: wrap; padding: 8px; }
  .band-datei-nav button { height: 44px; }
  .band-datei-nav .luecke { display: none; }
  .band-datei-inhalt { padding: 16px; }
  .verfassen > .band-verfassen .band-leiste { height: 44px; }
}
@media print { .band, .band-schnell, .band-datei { display: none !important; } }
html.wenig-bewegung .band * { transition: none !important; }
.band-leiste[data-modus=klassisch] > .band-mehr { align-self: center; }
.band-leiste[data-modus=klassisch] > .band-klapp { align-self: flex-end; height: 24px; }
.band.schmal .band-mehr { width: 36px; padding: 0; justify-content: center; }
.band.schmal .band-mehr .txt { display: none; }

/* nm-ui-perfekt B-2: „Neu …“ steht im Menüband – der große Knopf über Ordnern, Kontakten und Kalenderliste entfällt am Schreibtisch */
@media (min-width: 761px) {
  .app.mit-band:not(.band-aus):not(.band-nur-reiter) .inhalt .neu-kn, .app.mit-band:not(.band-aus) .kal-seite > .kn.haupt.breit { display: none; }   /* nm27-ux: eingeklappt (nur Reiter) bleibt „Neu …“ über der Liste (Kalender: nm-server27-vor B3) */
}
.band-kn .txt .nb { white-space: nowrap; }
/* nm26-verfassen D3: Raster-Aufklapper des Schreib-Bands (Tabelle, Symbole, Farben) sitzen in .menue – dessen Zeilenknopf-Regel
   (.menue button: 100 % breit, 36 px hoch, ohne Rahmen) machte aus dem 10 × 8-Tabellenraster unsichtbare 24 × 30-Flächen.
   Hier gelten wieder die Maße aus verfband.css (dort unverändert, byte-gleich mit dem Client). */
.menue.vb-pop { min-width: 0; }
.menue.vb-pop button.vb-zelle { display: block; width: 18px; height: 18px; min-height: 0; padding: 0; gap: 0; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); }
.menue.vb-pop button.vb-zelle:hover { background: var(--panel); }
.menue.vb-pop button.vb-zelle:not(.an) { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }   /* auch dunkel gut sichtbar */
.menue.vb-pop button.vb-zelle.an { background: var(--accent-soft); border-color: var(--accent); }
.menue.vb-pop button.vb-zeichen { display: flex; justify-content: center; width: 28px; height: 28px; min-height: 0; padding: 0; gap: 0; border: 1px solid transparent; border-radius: 4px; font-size: 15px; line-height: 1; }
.menue.vb-pop button.vb-zeichen:hover, .menue.vb-pop button.vb-zeichen:focus-visible { background: var(--hover); border-color: var(--line); }
.menue.vb-pop button.vb-farbe { display: block; width: 22px; height: 22px; min-height: 0; padding: 0; gap: 0; border: 1px solid var(--line); border-radius: 4px; }
.menue.vb-pop .vb-tabinfo { padding: 2px 4px 6px; }
/* nm26-verfassen D4/D5: Leer-Hinweis in Signatur- und Baustein-Menü umbricht statt das Menü breit zu ziehen */
.menue .kopfz .vb-leer { display: block; max-width: 300px; white-space: normal; line-height: 1.4; }
.menue .kopfz .vb-leer b { margin-bottom: 2px; }

/* nm27-ux (UX-W-B5): Haupt-Band wie der Windows-Client – Beschriftungen einzeilig („Neue Mail“ statt „Neue / Mail“), Gruppennamen 12 px.
   Nur das Band der Ansichten (.app > .band); das Band im Schreibfenster (verfband) bleibt unberührt. */
.app > .band .band-gruppe-name { font-size: 12px; line-height: 14px; }
.app > .band .band-kn.gross { width: auto; max-width: none; white-space: nowrap; }
.app > .band .band-kn.gross .txt { display: block; overflow: visible; -webkit-line-clamp: unset; }
/* „Einklappen“ nur einmal: aufgeklappt der Pfeil unten rechts im Band, eingeklappt der Knopf „Menüband zeigen“ in der Reiterzeile */
.app > .band[data-modus=klassisch] .band-klapp-reiter, .app > .band[data-modus=vereinfacht] .band-klapp-reiter { display: none; }
.app > .band[data-modus=reiter] .band-leiste.schwebend .band-klapp { display: none; }
