/* 表情选择器容器 */
.emoji-picker-container {
  position: relative;
  display: inline-block;
}

/* 默认触发器按钮 */
.emoji-picker-trigger {
  background: none;
  font-size: 16px;
  padding: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 5px;
}

.emoji-picker-trigger:hover {
  background-color: #e9e9e9;
  border-color: #d0d0d0;
}

/* 表情选择器面板 */
.emoji-picker-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 1000;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 320px;
  max-height: 400px;
  overflow: hidden;
  margin-bottom: 4px;
}

/* 分类标签栏 */
.emoji-categories {
  display: flex;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 8px;
  gap: 4px;
}

.category-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex: 1;
  text-align: center;
}

.category-btn:hover {
  background-color: #e9ecef;
}

.category-btn.active {
  background-color: #007bff;
  color: white;
}

/* 表情网格 */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 12px;
  max-height: 280px;
  overflow-y: auto;
}

/* 表情项 */
.emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

.emoji-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* 空状态 */
.emoji-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

/* 滚动条样式 */
.emoji-grid::-webkit-scrollbar {
  width: 6px;
}

.emoji-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .emoji-picker-panel {
    width: 280px;
  }

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

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .emoji-picker-panel {
    background: #2d3748;
    border-color: #4a5568;
    color: white;
  }

  .emoji-categories {
    background-color: #1a202c;
    border-bottom-color: #4a5568;
  }

  .category-btn:hover {
    background-color: #4a5568;
  }

  .emoji-item:hover {
    background-color: #4a5568;
  }

  .emoji-picker-trigger {
    border-color: #4a5568;
    color: white;
  }

  .emoji-picker-trigger:hover {
    background-color: #4a5568;
  }
}
