/* Эмодзи-пикер SrepPortal */
.sp-emoji-btn { flex: 0 0 auto; width: 38px; height: 38px; margin: 0 4px; padding: 0; border: 0; border-radius: 12px; background: rgba(255,255,255,.06); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; transition: background .15s, transform .12s; display: inline-flex; align-items: center; justify-content: center; }
.sp-emoji-btn:hover { background: rgba(139,92,246,.25); transform: scale(1.06); }
.sp-emoji-btn[aria-expanded="true"] { background: rgba(139,92,246,.4); }
.sp-emoji-btn.is-textarea { margin: 6px 0 0; }
[data-theme="light"] .sp-emoji-btn { background: rgba(20,20,40,.06); }
.sp-emoji-pop { position: fixed; z-index: 2147483000; width: 340px; max-width: calc(100vw - 16px); background: #171523; color: #ecebf5; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.55); padding: 10px; animation: sp-emoji-in .14s ease both; }
.sp-emoji-pop[hidden] { display: none; }
[data-theme="light"] .sp-emoji-pop { background: #fff; color: #1b1a2b; border-color: rgba(20,20,40,.12); box-shadow: 0 20px 50px rgba(20,20,40,.2); }
@keyframes sp-emoji-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.sp-emoji-tabs { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.sp-emoji-tabs::-webkit-scrollbar { display: none; }
.sp-emoji-tab { flex: 0 0 auto; width: 36px; height: 34px; border: 0; border-radius: 10px; background: transparent; font-size: 18px; cursor: pointer; opacity: .6; }
.sp-emoji-tab:hover { opacity: 1; background: rgba(255,255,255,.07); }
.sp-emoji-tab.on { opacity: 1; background: rgba(139,92,246,.28); }
.sp-emoji-search { width: 100%; box-sizing: border-box; height: 34px; margin: 2px 0 6px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 14px; }
[data-theme="light"] .sp-emoji-search { border-color: rgba(20,20,40,.14); background: rgba(20,20,40,.04); }
.sp-emoji-name { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .55; margin: 2px 4px 4px; }
.sp-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 236px; overflow-y: auto; overscroll-behavior: contain; }
.sp-emoji-item { aspect-ratio: 1; border: 0; border-radius: 9px; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.sp-emoji-item:hover { background: rgba(139,92,246,.25); transform: scale(1.15); }
.sp-emoji-empty { grid-column: 1 / -1; padding: 28px 12px; text-align: center; font-size: 13px; opacity: .6; }
@media (max-width: 520px) {
  .sp-emoji-pop { left: 8px !important; right: 8px; width: auto; }
  .sp-emoji-grid { grid-template-columns: repeat(7, 1fr); max-height: 210px; }
}
/* поле ввода и кнопка в одной строке */
.comment-form, .message-form { align-items: center; }

/* ===== Эмодзи + стикеры в одном окне (кнопка рядом с 🎤) ===== */
.sp-emoji-pop [hidden] { display: none !important; }
.sp-emoji-btn.is-composer { margin: 0 2px; }
.sp-modes { display: flex; gap: 6px; padding: 0 0 8px; }
.sp-mode { flex: 1; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; opacity: .7; transition: background .15s, opacity .15s; }
.sp-mode:hover { opacity: 1; }
.sp-mode.on { opacity: 1; background: rgba(139,92,246,.35); }
[data-theme="light"] .sp-mode { background: rgba(20,20,40,.06); }
[data-theme="light"] .sp-mode.on { background: rgba(139,92,246,.22); }
.sp-emoji-pop.is-stickers { width: 360px; }
.sp-stk-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.sp-stk-tabs::-webkit-scrollbar { display: none; }
.sp-stk-tab { flex: 0 0 auto; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; opacity: .7; white-space: nowrap; }
.sp-stk-tab.on { opacity: 1; background: rgba(139,92,246,.35); }
[data-theme="light"] .sp-stk-tab { background: rgba(20,20,40,.06); }
.sp-stk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.sp-stk-cell { position: relative; aspect-ratio: 1; }
.sp-stk-item { width: 100%; height: 100%; padding: 4px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; transition: background .15s, transform .12s; }
.sp-stk-item:hover { background: rgba(139,92,246,.22); transform: scale(1.04); }
.sp-stk-item img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.sp-stk-fav { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.sp-stk-cell:hover .sp-stk-fav, .sp-stk-fav.on { opacity: 1; }
.sp-stk-fav.on { color: #ffc93c; }
@media (hover: none) { .sp-stk-fav { opacity: .85; } }
.sp-stk-foot { display: block; margin-top: 8px; padding: 8px; text-align: center; border-radius: 10px; background: rgba(255,255,255,.06); color: inherit; font-size: 13px; font-weight: 600; text-decoration: none; }
.sp-stk-foot:hover { background: rgba(139,92,246,.25); }
@media (max-width: 520px) {
  .sp-emoji-pop.is-stickers { width: auto; }
  .sp-stk-grid { grid-template-columns: repeat(3, 1fr); max-height: 230px; }
}
/* форма сообщения: кнопки одинакового размера в один ряд */
.message-form .attach-btn, .message-form .sp-emoji-btn.is-composer { flex: 0 0 auto; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
/* страница добавления стикеров (для админов): поля не обрезаются */
.add-sticker-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.add-sticker-form input[type="text"] { flex: 1 1 200px; min-width: 0; }
.add-sticker-form input[type="file"] { flex: 1 1 200px; min-width: 0; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.sticker-thumb { width: 100%; aspect-ratio: 1; object-fit: contain; }
