/* Sixy stickers in a chat (js/chat/stickers.js). */

/* A sent sticker: no bubble, just Sixy. */
.message-bubble.sticker-bubble { padding: 0 !important; background: transparent !important; box-shadow: none !important; border: 0 !important; max-width: none; }
.chat-sticker { display: block; width: 116px; height: 141px; }
.chat-sticker svg, .sticker-cell svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* The Sixy button sits between the words and Send, in a chat only. */
.sticker-button { display: none; }
.main.is-direct-chat .sticker-button {
  flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #18181b; background: #f4f4f5; cursor: pointer;
  touch-action: manipulation;
}
.main.is-direct-chat .sticker-button svg { width: 44px; height: 45px; margin-top: -2px; overflow: visible; }
.main.is-direct-chat .sticker-button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #18181b; }

/* The panel opens where the keyboard goes, like WeChat. */
.sticker-panel { display: none; }
.main.is-direct-chat .sticker-panel.show {
  display: block; margin: 8px 2px 2px; overflow: hidden;
  border: 1px solid #ecece8; border-radius: 25px; background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}
/* One row on top: ⚙ · 🔍 · ★ · the six characters (or ‹ and the search, or ‹ Settings). */
.sticker-panel .sp-top { display: flex; align-items: center; gap: 6px; min-height: 50px; padding: 8px 10px 2px; }
.sticker-panel .sp-gear, .sticker-panel .sp-find { flex: none; width: 38px; height: 38px; padding: 0; border: 0; display: grid; place-items: center; background: none; color: #18181b; font-size: 24px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.sticker-panel .sp-find svg { display: block; }
.sticker-panel .sp-back { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f0f0f3; color: #18181b; font-size: 20px; cursor: pointer; }
.sticker-panel .sp-head-title { flex: 1; margin-right: 34px; text-align: center; font-size: 15px; }
.sticker-panel .sp-tabs { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.sticker-panel .sp-tabs::-webkit-scrollbar { display: none; }
.sticker-tab { flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 12px; display: grid; place-items: center; background: none; color: #18181b; font-size: 19px; cursor: pointer; scroll-snap-align: start; touch-action: manipulation; }
.sticker-tab svg { display: block; width: 32px; height: 33px; overflow: visible; }
.sticker-tab svg * { animation: none !important; }
.sticker-tab[aria-pressed="true"] { background: #f0f0f3; }
.sticker-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 12px; background: #f2f2f5; color: #8a8f98; }
.sticker-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 16px; color: #18181b; }
.sticker-search.is-make { background: #fff6dc; box-shadow: inset 0 0 0 1.5px #f2c94c; color: #8a6d12; }
.sticker-title { margin: 0; padding: 2px 16px 2px; color: #8a8f98; font-size: 12px; font-weight: 700; }
.sticker-title:empty { display: none; }
/* The stickers: whole rows, no names under them; the long scroll has a small header per character. */
.sticker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); grid-auto-rows: 90px; align-content: start;
  height: min(316px, 44vh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 2px 6px 8px;
}
.sticker-grid.is-all, .sticker-grid:has(.sp-set) { display: block; position: relative; }
.sticker-panel .sp-sec-title { position: sticky; top: 0; z-index: 2; margin: 0; padding: 6px 8px 3px; background: #fff; color: #8a8f98; font-size: 12px; font-weight: 800; }
.sticker-panel .sp-sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); grid-auto-rows: 90px; }
.sticker-panel .sp-sec.is-off svg * { animation-play-state: paused !important; }
.sticker-cell {
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 14px;
  background: none; cursor: pointer; touch-action: manipulation;
}
.sticker-cell svg { width: 70px; height: 85px; }
.sticker-cell:active { background: #f0f0f3; }
.sticker-cell.make-cell { gap: 0; align-content: center; margin: 4px; border: 2px dashed #d4d4da; color: #18181b; }
.make-cell span { font-size: 22px; line-height: 1; }
.make-cell b { font-size: 13px; }
.make-cell small { max-width: 64px; overflow: hidden; color: #8a8f98; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sticker-empty { grid-column: 1 / -1; margin: 0; padding: 40px 0; text-align: center; color: #8a8f98; font-size: 13px; }
/* ⚙ Settings: your color (with the six to see it), suggestions on/off, make your own. */
.sticker-panel .sp-set { display: grid; gap: 8px; padding: 6px 4px; }
.sticker-panel .sp-set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 10px 14px; border: 0; border-radius: 16px; background: #f7f7f9; font: inherit; color: #18181b; text-align: left; cursor: pointer; }
.sticker-panel .sp-set-row b { font-size: 14.5px; }
.sticker-panel .sp-set-row.is-colors { flex-direction: column; align-items: stretch; cursor: default; }
.sticker-panel .sp-preview { display: flex; justify-content: space-between; margin: 2px -4px 0; }
.sticker-panel .sp-preview span { flex: 1; display: grid; place-items: center; }
.sticker-panel .sp-preview svg { display: block; width: 46px; height: 48px; overflow: visible; }
.sticker-panel .sp-dots { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.sticker-color { flex: none; width: 26px; height: 26px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #d4d4da; cursor: pointer; }
.sticker-color[aria-pressed="true"] { box-shadow: 0 0 0 2.5px #18181b; }
.sticker-color.sp-any { background: conic-gradient(#ff6b6b, #f7c74b, #7fcf9b, #79c7ec, #a99be0, #ff6b9e, #ff6b6b); }
.sticker-color.sp-any[aria-pressed="true"] { background: var(--pick); }
.sticker-panel .sp-any-pick { display: grid; gap: 12px; padding: 6px 4px 2px; }
.sticker-panel .sp-any-pick input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; border-radius: 7px; outline: none; }
.sticker-panel .sp-hue { background: linear-gradient(90deg, hsl(0 62% 62%), hsl(60 62% 62%), hsl(120 62% 62%), hsl(180 62% 62%), hsl(240 62% 62%), hsl(300 62% 62%), hsl(359 62% 62%)); }
.sticker-panel .sp-lit { background: linear-gradient(90deg, hsl(var(--h) 62% 28%), hsl(var(--h) 62% 57%), hsl(var(--h) 62% 86%)); }
.sticker-panel .sp-any-pick input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #18181b; box-shadow: 0 1px 4px rgb(0 0 0 / .25); }
.sticker-panel .sp-any-pick input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #18181b; }
.sticker-panel .sp-mini { flex: none; display: flex; align-items: center; }
.sticker-panel .sp-mini i { position: relative; width: 34px; height: 20px; border-radius: 10px; background: #d4d4da; transition: background .2s; }
.sticker-panel .sp-mini i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: transform .2s; }
.sticker-panel [aria-checked="true"] .sp-mini i { background: #3f9b5a; }
.sticker-panel [aria-checked="true"] .sp-mini i::after { transform: translateX(14px); }
.sticker-panel .sp-plus { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #18181b; color: #fff; font-size: 18px; }
.sticker-panel .sp-set-note { margin: 2px 6px; color: #8a8f98; font-size: 12px; }

/* Typed a short word ("sorry", "okay", "love"): its Sixy pops up above the box, tap to send. */
.main.is-direct-chat .composer-dock { position: relative; }
.sticker-suggest[hidden], .main:not(.is-direct-chat) .sticker-suggest { display: none; }
.sticker-suggest {
  position: absolute; right: 54px; bottom: calc(100% + 8px); z-index: 5;
  display: flex; gap: 2px; padding: 4px 6px; border: 1px solid #ecece8; border-radius: 20px;
  background: rgba(255, 255, 255, .98); box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  animation: stickerSuggestIn .22s cubic-bezier(.3, 1.4, .5, 1);
}
.sticker-suggest-cell { width: 62px; height: 76px; padding: 0; border: 0; border-radius: 14px; background: none; cursor: pointer; touch-action: manipulation; }
.sticker-suggest-cell:active { background: #f0f0f3; }
.sticker-suggest-cell svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* × on the pop-up: hide it for this message. */
.sticker-suggest .sug-x { position: absolute; top: -9px; left: -9px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1px #d4d4da, 0 2px 6px rgb(0 0 0 / .12); color: #6b6f78; font-size: 14px; line-height: 1; cursor: pointer; }
@keyframes stickerSuggestIn { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }

/* A chat quiet for a week: Sixy asleep where the › was (tap it to say hi). */
.chat-nap { display: block; width: 50px; height: 52px; margin: -8px -8px -12px 0; cursor: pointer; touch-action: manipulation; }
.chat-nap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chat-nap.is-deep { filter: saturate(.5); opacity: .85; }
