/* Chat translation (js/chattr.js) and Local chat's fade-out (js/chatexpire.js).
   The globe is tiny and quiet on purpose: faint on a message that looks foreign (.on), only on hover / focus on the
   rest (a mouse), and never in the ticker. The translation sits under the original, which steps back a little. */
.m-trb { font: inherit; border: 0; padding: 0 2px; margin-left: 4px; background: none; color: #9fe1ff; cursor: pointer; vertical-align: -2px; line-height: 1;
  opacity: 0; transition: opacity .15s; border-radius: 5px; }
.m-trb .ic { width: 14px; height: 14px; display: block; }
.m-trb.on { opacity: .5; }
@media (hover: hover) { #chat-log .msg.pl:hover .m-trb { opacity: .6; } }
#chat-log .msg.pl:focus-within .m-trb, .m-trb:hover, .m-trb:focus-visible { opacity: 1; }
.m-trb:focus-visible, .m-trl:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* a touch screen has no hover: only the flagged ones show (a bigger tap area around the same small glyph) */
html.touch .m-trb:not(.on) { display: none; }
html.touch .m-trb { padding: 5px 7px; margin: -5px -3px -5px 1px; }
#chat:not([data-state="expanded"]) .m-trb, #chat:not([data-state="expanded"]) .m-tr { display: none; }

.m-tr { margin: 2px 0 1px; padding: 3px 0 2px 8px; border-left: 2px solid rgba(159, 225, 255, .45); color: #e8eeff; overflow-wrap: anywhere; }
.m-tr .m-trt { display: block; }
.m-tr .m-trm { display: block; margin-top: 1px; font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.m-tr .m-trm .ic { width: 11px; height: 11px; margin-right: 3px; vertical-align: -1.5px; opacity: .8; }
.m-trl { font: inherit; border: 0; padding: 0; background: none; color: #9fe1ff; cursor: pointer; }
.m-trl:hover { text-decoration: underline; }
.m-trl.quiet { color: inherit; opacity: .85; }   /* "Never translate <language>": there, not loud */
html.touch .m-trl { padding: 4px 0; }
.m-tr.busy, .m-tr.err { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); border-left-color: rgba(255, 255, 255, .18); }
.m-tr.err { display: block; }
/* the original steps back while its translation shows */
.msg.pl.tr-on > .m-text { font-size: .9em; color: rgba(232, 238, 255, .62); }

/* Local chat clears itself: a line fades before it goes */
#chat-log .msg.expiring { opacity: 0; transition: opacity .9s ease; }

/* Settings > Language: the languages that are never translated */
.tr-never { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tr-never .chip-x { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06); color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.tr-never .chip-x .ic { width: 11px; height: 11px; }
