/*
 * 通用表情面板样式：chat 与 admin 共用同一套表情入口和贴纸渲染。
 * 作者: @ccfork
 */
.emoji-drawer {
    margin-bottom: 10px;
    border: 1px solid #ffd1df;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(241, 147, 177, 0.18);
    overflow: hidden;
}

.emoji-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 46px;
    padding: 8px;
    border-bottom: 1px dashed #ffcfdf;
}

.emoji-tabs {
    display: flex;
    min-width: 0;
    flex: 1;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.emoji-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid #ffd1df;
    border-radius: 50%;
    color: #c26483;
    background: #fff7fa;
    cursor: pointer;
}

.emoji-tab {
    height: 32px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #bc6f8c;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.emoji-tab.active {
    border-color: #ffc1d4;
    color: #b35573;
    background: #ffeef4;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 6px;
    max-height: 230px;
    overflow-y: auto;
    padding: 10px;
}

.emoji-tabs::-webkit-scrollbar,
.emoji-grid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.emoji-tabs::-webkit-scrollbar-track,
.emoji-grid::-webkit-scrollbar-track {
    background: #fff4f8;
}

.emoji-tabs::-webkit-scrollbar-thumb,
.emoji-grid::-webkit-scrollbar-thumb {
    border-width: 1px;
}

.emoji-grid.faces {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
}

.emoji-btn,
.sticker-btn {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #fff7fa;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.emoji-btn {
    font-size: 22px;
}

.sticker-btn img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.emoji-btn:active,
.sticker-btn:active {
    transform: scale(0.96);
}

.emoji-btn:hover,
.sticker-btn:hover {
    border-color: #ffc1d4;
    background: #fff;
}

.message-sticker {
    display: block;
    width: min(112px, 32vw);
    max-height: 112px;
    object-fit: contain;
}

.message-sticker.inline-sticker {
    display: inline-block;
    width: 28px;
    height: 28px;
    max-height: 28px;
    margin: 0 2px;
    vertical-align: -7px;
}

.message-bubble.has-sticker {
    padding: 8px;
    background: #fff;
}
