/* Chat colours: one source of truth for lobby + game screens, PC and phone (v21).
   The rules sit in the cascade layer "snk-chat", which each page declares first in <head>
   (<style>@layer snk-chat;</style>). !important declarations in the first-declared layer win over
   every unlayered !important rule and every later layer, so no id-stacking is needed here and older
   per-skin chat colours (theme.css, ui-fixes.css, pc-client-v8.css, mobile-v7.css, ...) cannot override it.
   Colours follow the PC client. Role comes from data-role (server-verified), else the .tx role class. */
@layer snk-chat {
  /* sender names */
  #chat-log .nm,
  #chat-log .nm * { color: #dbe6f2 !important; font-weight: 800 !important; font-style: normal !important; }
  #chat-log .nm.me,
  #chat-log .nm.me * { color: #ffec99 !important; } /* your own name: same pale gold as in the player lists (list-colors.css) */

  /* message text by role */
  /* administrators and moderators: the same orange, bold */
  #chat-log .tx:is([data-role="admin"], [data-role="mod"], .admin:not([data-role]), .mod:not([data-role])),
  #chat-log .tx:is([data-role="admin"], [data-role="mod"], .admin:not([data-role]), .mod:not([data-role])) :not(img) { color: #ff9f43 !important; font-weight: 700 !important; font-style: normal !important; }
  #chat-log .tx:is([data-role="member"], .vip:not([data-role]), .sub:not([data-role])),
  #chat-log .tx:is([data-role="member"], .vip:not([data-role]), .sub:not([data-role])) :not(img) { color: #2ccfe0 !important; font-weight: 400 !important; font-style: normal !important; }
  #chat-log .tx:is([data-role="free"], .free:not([data-role])),
  #chat-log .tx:is([data-role="free"], .free:not([data-role])) :not(img) { color: #b0b8c0 !important; font-weight: 400 !important; font-style: normal !important; }

  /* private messages: white, italic, not bold (tag and text) */
  #chat-log .pm,
  #chat-log :is(.pm-tag, .pm-tx),
  #chat-log :is(.pm-tag, .pm-tx) :not(img) { color: #ffffff !important; font-style: italic !important; font-weight: 400 !important; }
}
