/* Reactions on chat messages (Nicolas, 8 November): one emoji per person per message, in every chat.
   On a computer a smiley shows beside a message on hover; on a phone a press and hold opens the same row. */
.msg-item,.msg-reactbar{--rx-bg:#fff;--rx-line:rgba(127,127,127,.35);--rx-ink:#2b2a28}
html[data-theme="dark"] .msg-item,html[data-theme="dark"] .msg-reactbar{--rx-bg:#2a2928;--rx-line:#4a4641;--rx-ink:#f3eee6}
.msg-react-btn{position:absolute;top:2px;width:30px;height:30px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:var(--rx-ink);opacity:0;cursor:pointer;transition:opacity .12s}
.msg-item.mine>.msg-react-btn{right:calc(100% + 4px)}
.msg-item.theirs>.msg-react-btn{left:calc(100% + 4px)}
.msg-item:hover>.msg-react-btn,.msg-react-btn:focus-visible{opacity:.7}
.msg-react-btn:hover{opacity:1;background:rgba(127,127,127,.18)}
.msg-react-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.msg-react-btn svg circle[r=".6"]{fill:currentColor}
@media (hover:none){
  .msg-react-btn{display:none}
  .msg-item{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
}

/* The emojis under a message: one pill per emoji with how many chose it; yours in aqua. */
.msg-reacts{display:flex;flex-wrap:wrap;gap:4px;margin-top:-6px;padding:0 8px;position:relative;z-index:1}
.msg-pill{display:inline-flex;align-items:center;gap:3px;height:24px;padding:0 7px;border:1px solid var(--rx-line);border-radius:999px;background:var(--rx-bg);color:var(--rx-ink);font-size:14px;line-height:1;cursor:pointer}
.msg-pill b{font-size:12px;font-weight:700}
.msg-pill.mine{border-color:#91d9c1;background:#e4f5ef}
html[data-theme="dark"] .msg-pill.mine{background:#24403a}

/* The row of emojis: above the message (under it when the top of the list would hide it); + shows them all. */
.msg-reactbar{position:absolute;bottom:calc(100% + 4px);z-index:30;display:flex!important;flex-direction:row!important;flex-wrap:nowrap;width:max-content;max-width:none!important;align-items:center;gap:2px;padding:4px;border:1px solid var(--rx-line);border-radius:24px;background:var(--rx-bg);box-shadow:0 6px 20px rgba(0,0,0,.18)}
.msg-reactbar.below{bottom:auto;top:calc(100% + 4px)}
.msg-reactbar.side{bottom:auto;top:0}
.msg-item.mine>.msg-reactbar.side{right:calc(100% + var(--rx-gap,8px))}
.msg-item.theirs>.msg-reactbar.side{left:calc(100% + var(--rx-gap,8px))}
.msg-item.mine>.msg-reactbar{right:0}
.msg-item.theirs>.msg-reactbar{left:0}
.msg-reactbar button{width:38px;height:38px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;font-size:22px;line-height:1;cursor:pointer}
.msg-reactbar button:hover,.msg-reactbar button:focus-visible{background:rgba(127,127,127,.18)}
.msg-react-more{color:var(--rx-ink)}
.msg-react-more svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.msg-reactbar.dock{position:fixed;top:auto;left:50%;right:auto;bottom:calc(env(safe-area-inset-bottom,0px) + 88px);transform:translateX(-50%);z-index:1000}
.msg-reactbar.all{flex-wrap:wrap!important;width:min(316px,78vw);max-height:220px;overflow-y:auto;border-radius:14px}
