/* Chat editor, reactions and the pinned message. Choices stay neutral: never a warm highlight. */
.chat-edit-button { margin-left: 0; }
.messages[data-chat-bubble] .message.own .message-bubble:not(:has(> .message-image)) { background: var(--chat-outgoing); }
.chat-pin-banner { order: 2; display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-bottom: 1px solid #ffffff1a; background: #15181d; }
.chat-pin-banner button { min-height: 40px; border: 0; background: transparent; color: #f4f5f7; font: inherit; }
.chat-pin-banner button:first-child { display: grid; flex: 1; min-width: 0; text-align: left; }
.chat-pin-banner small { font-size: 12px; color: #999da6; }
.chat-pin-banner span { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.chat-pin-banner button:last-child { flex: none; width: 40px; font-size: 20px; color: #999da6; }
/* Reactions hang off the bubble's bottom edge in one pill, like WhatsApp:
   they never change the bubble's size; the row below makes room for them. */
body.authenticated .message .message-bubble:has(> .message-reactions) { position: relative; }
body.authenticated .message:has(> .message-bubble > .message-reactions) { margin-bottom: 16px; }
.message-reactions { position: absolute; z-index: 1; bottom: -20px; inset-inline-start: 10px; display: flex; flex-wrap: nowrap; gap: 0; max-width: calc(100% - 20px); margin: 0; padding: 1px 3px; border: 2px solid #121316; border-radius: 999px; background: #2a2c31; box-shadow: 0 2px 6px #0006; }
.own .message-reactions { inset-inline-start: auto; inset-inline-end: 10px; }
.message-reactions button { display: inline-flex; align-items: center; gap: 2px; min-height: 24px; padding: 0 4px; border: 0; border-radius: 999px; background: transparent; color: #e9eaee; font: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.message-reactions button[aria-pressed="true"] b { font-weight: 700; }
.message-reactions b { font-size: 12px; font-weight: 500; color: #c9cbd1; }
/* Sits in the conversation's column like the reply bar, so the keyboard can never hide it. */
.mention-suggest { order: 4; flex: none; z-index: 30; margin: 0 8px 6px; display: grid; overflow: hidden; border: 1px solid #ffffff26; border-radius: 14px; background: #1f2329; box-shadow: 0 8px 24px #0006; }
.mention-suggest[hidden] { display: none; }
.mention-suggest button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 0; background: transparent; color: #f4f5f7; font: inherit; text-align: left; }
.mention-suggest button + button { border-top: 1px solid #ffffff14; }
.mention-suggest span { display: grid; min-width: 0; }
.mention-suggest strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mention-suggest small { font-size: 12px; color: #999da6; }
.message-mention { display: inline; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.message-mention.is-self { padding: 0 4px; border-radius: 5px; background: #ffffff26; }
.chat-edit { width: min(100% - 24px, 460px); max-height: 86dvh; padding: 0; overflow: auto; border: 1px solid #ffffff26; border-radius: 18px; background: #15181d; color: #f4f5f7; }
.chat-edit::backdrop { background: #000a; }
.chat-edit-sheet { display: grid; gap: 20px; padding: 16px; }
.chat-edit header { display: flex; align-items: center; justify-content: space-between; }
.chat-edit h2 { margin: 0; font-size: 20px; font-weight: 600; }
.chat-edit h3 { margin: 0; font-size: 15px; font-weight: 600; }
.chat-edit p { margin: 0; font-size: 13px; color: #999da6; }
.chat-edit section { display: grid; gap: 8px; }
.chat-edit form { display: flex; align-items: flex-end; gap: 8px; }
.chat-edit label { display: grid; flex: 1; min-width: 0; gap: 4px; font-size: 13px; color: #c9ccd2; }
.chat-edit input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #ffffff26; border-radius: 10px; background: #1f2329; color: inherit; font: inherit; font-size: 16px; }
.chat-edit button { min-height: 44px; padding: 0 14px; border: 1px solid #ffffff26; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.chat-edit header button { width: 44px; padding: 0; border: 0; font-size: 22px; }
.chat-edit-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-edit-swatches button { width: 44px; padding: 0; border-radius: 50%; font-size: 12px; }
.chat-edit-swatches button[aria-pressed="true"] { border: 2px solid #f4f5f7; }
.chat-edit-status { min-height: 18px; }
.chat-edit button:focus-visible, .chat-pin-banner button:focus-visible, .message-reactions button:focus-visible { outline: 2px solid #c6c6c6; outline-offset: 2px; }
