/* Gemeinsame Werkzeugleiste der Rich-Text-Editoren (shared/rte-leiste.js).
   Farben ueber Tokens: Gruppen-App/Eltern-Stil (--navy, --card-border, --peach) bzw. dunkle
   Admin-Oberflaechen (--text, --border, --surface). Alle Regeln haengen an .rte-leiste und
   haben bewusst hoehere Spezifitaet als die alten .editor-toolbar-/.mail-toolbar-Stile. */
html body .rte-leiste.rte-leiste {
  --rte-ink: var(--navy, var(--text, #0b2a6b));
  --rte-line: var(--card-border, var(--border, #fbdfbf));
  --rte-aktiv: var(--peach, var(--tint-blue, #fde3c8));
  --rte-hover: var(--peach, var(--surface2, #fde3c8));
  --rte-pop-bg: var(--card-bg, var(--surface, #fff));
  --rte-pop-rand: var(--navy, var(--text, #0b2a6b));
  --rte-schatten: var(--card-shadow, rgba(0, 0, 0, .45));
  position: relative; display: block; padding: 0; gap: 0; overflow: visible; margin-bottom: 0;
}
html body .rte-leiste.rte-leiste .rte-scroll {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 0; padding: 4px;
  overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
html body .rte-leiste.rte-leiste .rte-scroll::-webkit-scrollbar { display: none; }
html body .rte-leiste.rte-leiste .rte-btn {
  flex: 0 0 auto; box-sizing: border-box; min-width: 40px; height: 40px; padding: 0 6px; margin: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--rte-ink); box-shadow: none; transform: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-weight: 700; font-size: 15px; line-height: 1; font-family: inherit; cursor: pointer; transition: none;
}
html body .rte-leiste.rte-leiste .rte-btn:hover { background: var(--rte-hover); color: var(--rte-ink); border: 0; transform: none; }
html body .rte-leiste.rte-leiste .rte-btn[aria-pressed="true"],
html body .rte-leiste.rte-leiste .rte-btn.active { background: var(--rte-aktiv); color: var(--rte-ink); border: 0; }
html body .rte-leiste.rte-leiste .rte-btn[aria-expanded="true"] { background: var(--rte-aktiv); }
html body .rte-leiste.rte-leiste .rte-btn svg { width: 21px; height: 21px; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; display: block; }
html body .rte-leiste.rte-leiste .rte-btn b, html body .rte-leiste.rte-leiste .rte-btn i, html body .rte-leiste.rte-leiste .rte-btn u { font-size: 16px; font-weight: 700; }
html body .rte-leiste.rte-leiste .rte-btn.rte-dd { min-width: 70px; padding: 0 8px; border: 2px solid var(--rte-line); font-weight: 600; font-size: 14px; justify-content: space-between; }
html body .rte-leiste.rte-leiste .rte-btn.rte-dd .rte-chev { width: 16px; height: 16px; }
html body .rte-leiste.rte-leiste .rte-btn[hidden] { display: none; }
html body .rte-leiste.rte-leiste .rte-sep { flex: 0 0 auto; width: 1px; height: 22px; background: var(--rte-line); margin: 0 3px; border-radius: 1px; }
html body .rte-leiste.rte-leiste .rte-btn:focus-visible, html body .rte-leiste.rte-leiste .rte-mi:focus-visible, html body .rte-leiste.rte-leiste .rte-ib:focus-visible { outline: 2px solid var(--rte-ink); outline-offset: -2px; }

html body .rte-leiste.rte-leiste .rte-pop {
  position: absolute; z-index: 30; min-width: 210px; max-width: calc(100% - 8px); box-sizing: border-box;
  background: var(--rte-pop-bg); border: 2.5px solid var(--rte-pop-rand); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--rte-schatten); padding: 6px; display: block;
}
html body .rte-leiste.rte-leiste .rte-pop[hidden], html body .rte-leiste.rte-leiste .rte-sub[hidden], html body .rte-leiste.rte-leiste .rte-imgbar[hidden] { display: none; }
html body .rte-leiste.rte-leiste .rte-mi {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto; box-sizing: border-box; min-height: 42px; padding: 8px 10px; margin: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--rte-ink); text-align: left;
  font-weight: 600; font-size: 14px; line-height: 1.2; font-family: inherit; cursor: pointer; transform: none; box-shadow: none; transition: none;
}
html body .rte-leiste.rte-leiste .rte-mi[hidden] { display: none; }
html body .rte-leiste.rte-leiste .rte-mi:hover { background: var(--rte-hover); color: var(--rte-ink); border: 0; transform: none; }
html body .rte-leiste.rte-leiste .rte-mi[aria-pressed="true"], html body .rte-leiste.rte-leiste .rte-mi.active { background: var(--rte-aktiv); border: 0; color: var(--rte-ink); }
html body .rte-leiste.rte-leiste .rte-mi svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
html body .rte-leiste.rte-leiste .rte-mi .rte-chev { width: 16px; height: 16px; margin-left: auto; transition: none; }
html body .rte-leiste.rte-leiste .rte-mi[aria-expanded="true"] .rte-chev { transform: rotate(180deg); }
html body .rte-leiste.rte-leiste .rte-txt { pointer-events: none; }
html body .rte-leiste.rte-leiste .rte-sub { padding-left: 14px; }
html body .rte-leiste.rte-leiste .rte-sub .rte-mi { min-height: 38px; }

html body .rte-leiste.rte-leiste .rte-imgbar {
  position: absolute; z-index: 31; display: flex; gap: 2px; padding: 2px; background: var(--rte-pop-bg);
  border: 2.5px solid var(--rte-pop-rand); border-radius: 12px; box-shadow: 3px 3px 0 var(--rte-schatten);
}
html body .rte-leiste.rte-leiste .rte-ib {
  width: 40px; height: 40px; min-width: 40px; padding: 0; margin: 0; border: 0; border-radius: 8px; background: transparent;
  color: var(--rte-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transform: none; box-shadow: none;
}
html body .rte-leiste.rte-leiste .rte-ib:hover { background: var(--rte-hover); border: 0; transform: none; color: var(--rte-ink); }
html body .rte-leiste.rte-leiste .rte-ib[aria-pressed="true"] { background: var(--rte-aktiv); border: 0; }
html body .rte-leiste.rte-leiste .rte-ib svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }

/* Einzel-ID-Farben der alten Konsolen-Knoepfe (#nm-link, #nm-imgup ...) duerfen die einheitliche Leiste nicht einfaerben. */
html body .rte-leiste.rte-leiste .rte-btn, html body .rte-leiste.rte-leiste .rte-mi, html body .rte-leiste.rte-leiste .rte-ib { color: var(--rte-ink) !important; border-color: transparent; }
html body .rte-leiste.rte-leiste .rte-btn.rte-dd { border-color: var(--rte-line); }
html body .rte-leiste.rte-leiste .rte-btn:hover, html body .rte-leiste.rte-leiste .rte-mi:hover, html body .rte-leiste.rte-leiste .rte-ib:hover { background: var(--rte-hover) !important; }
html body .rte-leiste.rte-leiste [aria-pressed="true"] { background: var(--rte-aktiv) !important; }
