/* huelle-texteditor.css: das Tool Texteditor (huelle-texteditor.js, R-23, 25.10.2026).
   Nur Variablen aus app.css, damit helles und dunkles Design stimmen; Symbole sind Blatt-Symbole, Zeichen oder
   mit CSS gezeichnet (kein SVG in Dateien). */

/* Der Lesesaal ist hier eine Spalte: Kopf, Leiste und Fläche; Meldungen der Hände stehen darüber. */
.kwLesesaal[data-editor="texteditor"], .wgVollLeib[data-editor="texteditor"] { flex-direction: column; }
.teEditor { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.teEditor > .prommKopf { flex: none; margin-bottom: 0; }
.teEditor > .fhVorschlaege { flex: none; }

/* Der Zustand der Datei: ein Punkt. Grün gespeichert, orange ungespeichert, blau beim Speichern. */
.teStatus { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); cursor: help; }
.teStatus[data-zustand="sauber"] { background: var(--gruen); }
.teStatus[data-zustand="offen"] { background: var(--warn); }
.teStatus[data-zustand="speichert"] { background: var(--blau); }
.teSchloss { flex: none; display: inline-grid; place-items: center; color: var(--dim); cursor: help; }
.teSchloss svg { width: 15px; height: 15px; }

/* Umschalter der Ansicht: ein Rechteck, links gefüllt (Text), geteilt (beides), rechts gefüllt (Vorschau). */
.teModi { display: inline-flex; gap: 4px; flex: none; }
.teModus { display: inline-grid; grid-template-columns: 1fr 1fr; width: 16px; height: 12px; overflow: hidden;
  border: 1.6px solid currentColor; border-radius: 3px; }
.teModus i { display: block; }
.teModus[data-wie="text"] i:first-child, .teModus[data-wie="vorschau"] i:last-child { background: currentColor; }
.teModus[data-wie="beides"] i:first-child { border-right: 1.6px solid currentColor; }

/* Die Leiste mit den Handgriffen für Markdown. */
.teLeiste { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px;
  border: 1px solid var(--linie); border-radius: var(--rundKlein, 9px); background: var(--zeile); }
.teEditor[data-ansicht="vorschau"] .teLeiste { display: none; }
.teTrenner { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--linie); }
.teGlyph { font-weight: 700; font-size: 13px; line-height: 1; }
.teGlyph_kursiv { font-style: italic; font-family: Georgia, serif; font-weight: 600; }
.teGlyph_ueberschrift { font-size: 12px; letter-spacing: -.5px; }

.teHinweis { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px;
  border-radius: var(--rundKlein, 9px); background: var(--zeile); color: var(--dim); }
.teHinweis[hidden] { display: none; }
.teHinweis.schlecht { color: var(--warnText); }
.teHinweis > span { flex: 1; min-width: 0; }

/* Text links, Vorschau rechts; auf schmalen Schirmen untereinander. */
.teFlaeche { flex: 1; min-height: 0; display: flex; gap: 10px; }
.teText, .teVorschau { flex: 1 1 0; min-width: 0; min-height: 0; border: 1px solid var(--linie);
  border-radius: var(--rundKlein, 9px); background: var(--panel); color: var(--text); }
.teText { resize: none; margin: 0; padding: 10px 12px; overflow: auto; outline: none; white-space: pre-wrap;
  font: 400 13px/1.6 ui-monospace, Consolas, monospace; tab-size: 2; caret-color: var(--gold); }
.teText:focus-visible { border-color: var(--gold); }
.teText::selection { background: color-mix(in srgb, var(--gold) 30%, transparent); }
.teVorschau { overflow: auto; padding: 10px 16px; font-size: 14px; line-height: 1.62; }
.teFlaeche[data-modus="text"] .teVorschau, .teFlaeche[data-modus="vorschau"] .teText { display: none; }
@media (max-width: 760px) { .teFlaeche[data-modus="beides"] { flex-direction: column; } }

/* Aufgaben in der Vorschau: ein Kästchen, bei erledigten grün mit Haken. */
.teAufgabe { list-style: none; margin-left: -1.2em; }
.teKaestchen { position: relative; display: inline-block; width: 12px; height: 12px; margin-right: 7px;
  border: 1.6px solid var(--dim); border-radius: 3px; vertical-align: -1px; }
.teKaestchen[data-an="1"] { background: var(--gruen); border-color: var(--gruen); }
.teKaestchen[data-an="1"]::after { content: ""; position: absolute; left: 2.5px; top: -.5px; width: 3px; height: 7px;
  border: solid var(--panel); border-width: 0 2px 2px 0; transform: rotate(40deg); }
