/* Chat stickers (src/stickers.js, src/sticker-picker.js): the picker, and stickers inside chat lines and message bubbles. */

/* ---- the picker: tabs over a scrolling grid (match chat panel and Lobby panels) ---- */
#emojipanel.stk, .lobby-emoji.stk { display: block; max-height: none; overflow: visible; padding: 6px 6px 4px; }
.stk-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.stk .stk-tab {
  flex: 1;
  display: grid;
  place-items: center;
  height: 34px;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 10px;
  box-shadow: none;
}
.stk .stk-tab[aria-pressed="true"] { background: rgba(255, 216, 105, 0.22); border-color: #ffd869; }
.stk-tabimg { width: 26px; height: 26px; object-fit: contain; display: block; }
.stk-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; max-height: min(114px, 20vh); overflow-y: auto; scrollbar-width: thin; }
.stk-grid--words { grid-template-columns: repeat(4, 1fr); }
.stk .stk-pick {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 3px;
  font-size: 0;
  background: none;
  border: none;
  border-radius: 10px;
  box-shadow: none;
}
.stk .stk-pick:active { background: rgba(255, 255, 255, 0.18); transform: none; }
.stk-pickimg { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }

/* the match chat window has a fixed maximum height: with the picker open, the quick-chat buttons step aside */
#chatwrap.stk-open #quickchat { display: none; }

/* the chat button that opens the picker shows a sticker instead of an emoji character */
#btn-emoji { display: grid; place-items: center; }
#btn-emoji .stk-tabimg { width: 26px; height: 26px; }

/* ---- a sticker inside a line of chat ---- */
.stk-img { display: inline-block; width: auto; height: 26px; vertical-align: -7px; margin: 0 1px; }
.stk-only .stk-img { height: 64px; vertical-align: middle; margin-left: 6px; }
#chatlog li.stk-only { display: flex; align-items: center; }

/* Lobby private messages: a lone sticker has no bubble around it */
.bubble.stk-only { background: none; border-image: none; border-color: transparent; box-shadow: none; padding: 0; }
.bubble.stk-only .stk-img { height: 72px; margin: 0; }
.bubble .stk-img { height: 28px; }

/* Lobby public chat: the flag rule (.lobby-line img) must not shrink a sticker to flag size */
.lobby-line .stk-img { width: auto; height: 28px; margin: 0 1px; border-radius: 0; vertical-align: -8px; }
.lobby-line .stk-only .stk-img, .lobby-line .stk-only.stk-img { height: 44px; vertical-align: middle; }
