/* ==================== 聊天表情 / 快捷语组件 ==================== */

/* 触发按钮 */
.ce-btn {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border: none; border-radius: 50%;
    background: var(--n-100);
    font-size: 19px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    transition: background .15s, transform .15s;
    -webkit-tap-highlight-color: transparent;
}
.ce-btn:hover { background: #e9eefb; }
.ce-btn:active { transform: scale(.92); }
.ce-btn.active { background: linear-gradient(135deg, var(--indigo-400), var(--v-600)); }
.ce-btn.active::after { content: ''; }

/* 浮层面板（fixed 挂载 body，避免被弹层裁剪） */
.ce-panel {
    display: none;
    position: fixed;
    z-index: 9999;
    background: var(--c-surface);
    border: 1px solid var(--n-200);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
    overflow: hidden;
    flex-direction: column;
    font-size: 14px;
    animation: ceIn .16s ease-out;
}
.ce-panel.open { display: flex; }
@keyframes ceIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ce-tabs {
    display: flex; gap: 4px; padding: 8px 10px 0;
    border-bottom: 1px solid #eef2f7; background: var(--c-surface);
}
.ce-tab {
    border: none; background: transparent; cursor: pointer;
    padding: 6px 12px 9px; font-size: 13px; font-weight: 700; color: var(--n-500);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ce-tab.active { color: #6d5efc; border-bottom-color: #6d5efc; }

.ce-body { max-height: 250px; overflow-y: auto; padding: 8px 10px 10px; -webkit-overflow-scrolling: touch; }
.ce-group + .ce-group { margin-top: 8px; }
.ce-group-title { font-size: 11px; color: var(--n-400); font-weight: 700; margin: 4px 2px 6px; }

.ce-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ce-emoji {
    border: none; background: transparent; cursor: pointer;
    height: 36px; font-size: 22px; line-height: 1; border-radius: 8px; padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.ce-emoji:hover { background: var(--n-100); }
.ce-emoji:active { background: #e9eefb; transform: scale(.9); }

.ce-jump { display: flex; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #eef2f7; }
.ce-jump-btn {
    flex: 1; border: none; background: var(--n-50); border-radius: 8px; height: 30px;
    font-size: 17px; cursor: pointer;
}
.ce-jump-btn.active { background: var(--v-100); }

/* 快捷语 */
.ce-phrases { display: flex; flex-direction: column; gap: 6px; }
.ce-phrase {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px; border-radius: 10px; background: var(--n-50);
    border: 1px solid #eef2f7; cursor: pointer;
}
.ce-phrase:hover { background: #f1f5fb; border-color: #dbe3f0; }
.ce-phrase-text { flex: 1; font-size: 13px; color: var(--n-700); line-height: 1.45; }
.ce-phrase-send {
    flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--c-surface);
    background: linear-gradient(135deg, var(--indigo-400), var(--v-600));
    padding: 4px 10px; border-radius: 12px; white-space: nowrap;
}
.ce-phrase-send:active { transform: scale(.94); }

@media (max-width: 420px) {
    .ce-grid { grid-template-columns: repeat(7, 1fr); }
    .ce-emoji { height: 34px; font-size: 21px; }
    .ce-body { max-height: 210px; }
}
