/* h21-BUBBLES (22 Nov 2026). Hussein: "it should show each party a different colour so you can tell which is you and them,
   like WhatsApp does a green box and white". CSS only, original chat design (mx1); loaded last so it wins over the FRDM
   theme greys. You = Freedom gold/tan on the right, them = white with a soft edge on the left. Dark and blue themes get
   matching dark variants. Ticks, reactions, timestamps and group sender names keep their own colours. */
html:root[data-frdm-theme][data-frdm-theme="light"],
html:root[data-theme="light"]:not([data-frdm-theme]) { --out-bubble: #f1e1b8; --in-bubble: #ffffff; }
html:root[data-frdm-theme][data-frdm-theme="dark"] { --out-bubble: #4a3c1c; --in-bubble: #26262b; }
html:root[data-frdm-theme][data-frdm-theme="blue"] { --out-bubble: #54431d; --in-bubble: #1e3350; }

.chat-screen .bubble.in { border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 1px 1.5px rgba(0, 0, 0, .08); }
.chat-screen .bubble.out { border: 1px solid rgba(150, 110, 30, .18); box-shadow: 0 1px 1.5px rgba(0, 0, 0, .06); }
html:root[data-frdm-theme="dark"] .chat-screen .bubble.in, html:root[data-frdm-theme="blue"] .chat-screen .bubble.in,
html:root[data-frdm-theme="dark"] .chat-screen .bubble.out, html:root[data-frdm-theme="blue"] .chat-screen .bubble.out { border-color: rgba(255, 255, 255, .08); box-shadow: none; }

/* a warm thread background in light mode so white bubbles stand out (WhatsApp-like) */
html:root[data-frdm-theme="light"] .chat-screen .messages,
html:root[data-theme="light"]:not([data-frdm-theme]) .chat-screen .messages { background: #f2f2ef; }
