/**
 * 统一表情选择器样式
 * 用于想法发布、私信、评论等场景
 */

/* 表情包装器 */
.uap-emoji-wrapper {
    position: relative;
    display: inline-block;
}

/* 表情选择器容器 */
.uap-emoji-picker {
    position: fixed;
    width: 300px;
    max-height: 220px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 100001;
}

/* 表情网格 */
.uap-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 滚动条样式 */
.uap-emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.uap-emoji-grid::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.uap-emoji-grid::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.uap-emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 表情项 */
.uap-emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    user-select: none;
}

.uap-emoji-item:hover {
    background: #f3f4f6;
}

.uap-emoji-item:active {
    background: #e5e7eb;
}

/* 表情包装器（用于相对定位） */
.uap-emoji-wrapper {
    position: relative;
    display: inline-block;
}

/* 移动端遮罩层 */
.uap-emoji-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
}

@media (max-width: 768px) {
    .uap-emoji-overlay {
        display: block;
    }
}

/* 表情选择器容器 - 使用固定定位 */
.uap-emoji-picker {
    position: fixed;
    width: 320px;
    max-height: 240px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 10000;
}

/* 响应式 */
@media (max-width: 768px) {
    .uap-emoji-picker {
        width: 300px;
        max-width: calc(100vw - 20px);
    }
}
