/* kt-emoji.css - 自定义表情选择器样式 */

/* 表情按钮：与评论框tabs垂直居中 */
.gitment-editor-header {
    display: flex;
    align-items: center;
}

.kt-emoji {
    margin-left: 12px;
    flex-shrink: 0;
}

.kt-emoji :hover {
    cursor: pointer;
    color: #ffbf55 !important;
}

/* 表情弹窗 */
.kt-emoji-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    width: 336px;
    max-height: 380px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

/* 头部区域 */
.kt-emoji-header {
    border-bottom: 1px solid #e8e8e8;
}

/* 搜索框 */
.kt-emoji-search-box {
    padding: 8px 10px 4px;
}

.kt-emoji-search {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e3e8f7;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.kt-emoji-search:focus {
    border-color: #0288bb;
}

.kt-emoji-search::placeholder {
    color: #999;
}

/* 分类标签栏 */
.kt-emoji-tabs {
    display: flex;
    overflow-x: auto;
    padding: 4px 6px 6px;
    gap: 2px;
    scrollbar-width: none;
}

.kt-emoji-tabs::-webkit-scrollbar {
    display: none;
}

.kt-emoji-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    flex-shrink: 0;
    user-select: none;
    min-width: 32px;
}

.kt-emoji-tab:hover {
    background-color: #f0f0f0;
}

.kt-emoji-tab.active {
    background-color: #e0f4ff;
}

.kt-emoji-tab-icon {
    font-size: 16px;
    line-height: 1.2;
}

.kt-emoji-tab-name {
    font-size: 9px;
    color: #666;
    white-space: nowrap;
    margin-top: 1px;
}

.kt-emoji-tab.active .kt-emoji-tab-name {
    color: #0288bb;
    font-weight: 500;
}

/* 表情网格区域 */
.kt-emoji-body {
    overflow-y: auto;
    max-height: 280px;
    padding: 6px 8px;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f8f8;
}

.kt-emoji-body::-webkit-scrollbar {
    width: 6px;
}

.kt-emoji-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}

.kt-emoji-body::-webkit-scrollbar-track {
    background-color: #f8f8f8;
}

/* 表情网格 */
.kt-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

/* 单个表情 */
.kt-emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 22px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.12s, transform 0.12s;
    user-select: none;
}

.kt-emoji-item:hover {
    background-color: #f0f0f0;
    transform: scale(1.15);
}

.kt-emoji-item:active {
    transform: scale(0.95);
}

/* 空状态 */
.kt-emoji-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

/* 自定义tooltip */
.kt-emoji-tooltip {
    position: fixed;
    background: #333;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100000;
    pointer-events: none;
    text-align: center;
    transform: translateX(-50%);
}

/* 移动端适配 */
@media screen and (max-width: 500px) {
    .kt-emoji-popup {
        width: 300px;
    }

    .kt-emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .kt-emoji-item {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}
