/* Darstellung wie WhatsApp (24.11.2026) — backend/darstellung.py, static/darstellung.js. Die Werte setzt window.dsAnwenden (base.html)
   als Variablen an <html>; der Kontrast ist am Server gerechnet (Schrift hell/dunkel, Akzent als Schrift >= 4.5:1). */

/* Akzentfarbe: Flaechen, Verlauf und Markierungen nehmen sie; als SCHRIFT die lesbare Fassung je Modus (wie --korall-schrift in meeyo.css) */
:root[data-ds-akzent] { --korall: var(--ds-akzent); --korall-schrift: var(--ds-akzent-dunkel) }
:root[data-ds-akzent][data-theme="light"] { --korall-schrift: var(--ds-akzent-hell) }

/* Schriftgroesse im Chat (klein · normal · gross · sehr gross) — die Blase waechst mit */
.nachricht, .ew-chat-nachricht, .gr-n { font-size: calc(1em * var(--ds-schrift, 1)) }

/* Farbe meiner Blasen (je Chat oder fuer alle) und die passende Schrift */
[data-ca-farbe] .nachricht.ich, [data-ca-farbe] .ew-chat-nachricht.ich, [data-ca-farbe] .gr-n.meins { background: var(--ca-farbe) !important; color: var(--ca-schrift, #fff) }
[data-ca-dunkel] .nachricht.ich :is(.chat-haken, small, .klein, .zeit), [data-ca-dunkel] .ew-chat-nachricht.ich :is(small, .klein),
[data-ca-dunkel] .gr-n.meins :is(small, .klein) { color: rgba(27, 16, 36, .72) !important }
[data-ca-dunkel] .nachricht.ich .chat-haken.gelesen { color: #0b5fa5 !important; text-shadow: none }
/* Heller Hintergrund: was direkt darauf steht (Datum, Hinweise), bekommt dunkle Schrift */
[data-ca-hell] .chat-tag span, [data-ca-hell] > .klein, [data-ca-hell] > .leise { color: #1b1024 }

/* Auswahl (Einstellungen «Darstellung» und «Design für diesen Chat») */
.ds-gruppe { display: grid; gap: 6px; margin: 10px 0 4px }
.ds-titel { display: block }
.ds-reihe { display: flex; flex-wrap: wrap; gap: 8px }
.ds-wahl { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 70px; background: none; border: 2px solid transparent;
  border-radius: 12px; padding: 4px; color: inherit; cursor: pointer; font: inherit }
.ds-wahl small { font-size: .72rem; text-align: center; line-height: 1.2 }
.ds-wahl.an { border-color: currentColor }
.ds-wahl:focus-visible { outline: 2px solid var(--korall); outline-offset: 2px }
.ds-punkt { width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35) }
.ds-flaeche { width: 40px; height: 54px; border-radius: 8px; border: 1px solid rgba(127, 127, 127, .4) }
.ds-eigen input[type="color"] { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer }
.ds-foto { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px }
.ds-foto input[type="file"] { display: none }
.ds-vorschau { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--linie);
  background-color: var(--nacht); min-height: 120px }
.ds-vorschau .nachricht { max-width: 80% } .ds-vorschau .nachricht p { margin: 0 }
.ds-vorschau .nachricht.du { align-self: flex-start; background: var(--pflaume-hell) }
.ds-vorschau .nachricht.ich { align-self: flex-end }
