/* 表情选择器容器 */
.emoji-picker {
  position: absolute;
  bottom: 60px;
  left: 12px;
  width: 360px;
  max-height: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  animation: emojiPickerSlideUp 0.2s ease-out;
}

@keyframes emojiPickerSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 表情选择器头部 */
.emoji-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.emoji-picker-tabs {
  display: flex;
  gap: 8px;
}

.emoji-tab {
  padding: 6px 12px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.emoji-tab:hover {
  background: #f3f4f6;
  color: #374151;
}

.emoji-tab-active {
  background: #eef2ff;
  color: #4f46e5;
}

.emoji-picker-close {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.2s;
}

.emoji-picker-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* 表情选择器内容 */
.emoji-picker-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.emoji-picker-content::-webkit-scrollbar {
  width: 6px;
}

.emoji-picker-content::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.emoji-picker-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.emoji-picker-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

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

.emoji-item {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.emoji-item:hover {
  background: #f3f4f6;
  transform: scale(1.2);
}

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

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

.emoji-image-item {
  aspect-ratio: 1;
  border: 2px solid transparent;
  background: #f9fafb;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-image-item:hover {
  background: #f3f4f6;
  border-color: #4f46e5;
  transform: scale(1.05);
}

.emoji-image-item:active {
  transform: scale(0.98);
}

.emoji-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .emoji-picker {
    width: calc(100vw - 24px);
    max-width: 360px;
  }
  
  .emoji-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .emoji-image-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
