/* src/EmojiPicker.css */
.ep-theme-light,
.ep-theme-auto {
  --ep-bg: #ffffff;
  --ep-bg-secondary: #f2f4f4;
  --ep-text: #2d3435;
  --ep-text-secondary: #5a6061;
  --ep-border: rgba(173, 179, 180, 0.4);
  --ep-hover: #ebeeef;
  --ep-active: #eff6ff;
  --ep-active-text: #1e3a8a;
  --ep-search-focus: #007aff;
  --ep-shadow: 0 12px 40px rgba(12, 15, 15, 0.06);
  --ep-empty-text: #9ca3af;
  --ep-arrow-bg: #ffffff;
  --ep-gradient-from: rgba(255,255,255,1);
  --ep-gradient-to: rgba(255,255,255,0);
}
.ep-theme-dark {
  --ep-bg: #1f2937;
  --ep-bg-secondary: #111827;
  --ep-text: #f9fafb;
  --ep-text-secondary: #9ca3af;
  --ep-border: rgba(55, 65, 81, 0.6);
  --ep-hover: #374151;
  --ep-active: #1e3a5f;
  --ep-active-text: #93c5fd;
  --ep-search-focus: #60a5fa;
  --ep-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
  --ep-empty-text: #6b7280;
  --ep-arrow-bg: #1f2937;
  --ep-gradient-from: rgba(31,41,55,1);
  --ep-gradient-to: rgba(31,41,55,0);
}
@media (prefers-color-scheme: dark) {
  .ep-theme-auto {
    --ep-bg: #1f2937;
    --ep-bg-secondary: #111827;
    --ep-text: #f9fafb;
    --ep-text-secondary: #9ca3af;
    --ep-border: rgba(55, 65, 81, 0.6);
    --ep-hover: #374151;
    --ep-active: #1e3a5f;
    --ep-active-text: #93c5fd;
    --ep-search-focus: #60a5fa;
    --ep-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
    --ep-empty-text: #6b7280;
    --ep-arrow-bg: #1f2937;
    --ep-gradient-from: rgba(31,41,55,1);
    --ep-gradient-to: rgba(31,41,55,0);
  }
}
.ep-container {
  display: flex;
  flex-direction: column;
  background: var(--ep-bg);
  border: 1px solid var(--ep-border);
  border-radius: 16px;
  box-shadow: var(--ep-shadow);
  color: var(--ep-text);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow: hidden;
  box-sizing: border-box;
  min-width: 260px;
  max-width: 100%;
}
.ep-container *,
.ep-container *::before,
.ep-container *::after {
  box-sizing: border-box;
}
.ep-container button {
  font-family: inherit;
  line-height: normal;
  margin: 0;
  text-transform: none;
  -webkit-appearance: none;
  appearance: none;
}
.ep-search-wrapper {
  padding: 16px 16px 0;
  flex-shrink: 0;
}
.ep-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--ep-border);
}
.ep-container .ep-search-icon {
  color: var(--ep-text-secondary);
  pointer-events: none;
  align-items: center;
  width: 16px;
  height: 16px;
  display: flex;
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-80%);
}
.ep-container .ep-search-input,
.ep-container .ep-search-input[type=text] {
  width: 100% !important;
  padding: 2px 8px 2px 28px !important;
  border: none !important;
  border-bottom: none !important;
  background: transparent !important;
  color: var(--ep-text) !important;
  font-size: 15px !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.ep-container .ep-search-input::placeholder {
  color: var(--ep-text-secondary);
}
.ep-tabs-wrapper {
  position: relative;
  border-bottom: 1px solid var(--ep-border);
  flex-shrink: 0;
}
.ep-tabs-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  display: flex;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}
.ep-tabs-arrow--left {
  left: 0;
  justify-content: flex-start;
  padding-left: 4px;
  background:
    linear-gradient(
      to right,
      var(--ep-gradient-from),
      var(--ep-gradient-to));
}
.ep-tabs-arrow--right {
  right: 0;
  justify-content: flex-end;
  padding-right: 4px;
  background:
    linear-gradient(
      to left,
      var(--ep-gradient-from),
      var(--ep-gradient-to));
}
.ep-tabs-arrow button {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ep-bg);
  border: 1px solid var(--ep-border);
  color: var(--ep-text-secondary);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: color 0.15s;
}
.ep-tabs-arrow button:hover {
  color: var(--ep-text);
}
.ep-category-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ep-category-tabs::-webkit-scrollbar {
  display: none;
}
.ep-category-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ep-text-secondary);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  padding: 0;
}
.ep-category-tab:hover {
  background: var(--ep-hover);
  color: var(--ep-text);
}
.ep-category-tab--active {
  background: var(--ep-active);
  color: var(--ep-active-text);
}
.ep-category-tab--active:hover {
  background: var(--ep-active);
  color: var(--ep-active-text);
}
.ep-category-label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-text-secondary);
  flex-shrink: 0;
  user-select: none;
}
.ep-category-label svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.ep-grid {
  display: grid;
  gap: 4px 2px;
  padding: 0 16px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ep-grid::-webkit-scrollbar {
  display: none;
}
.ep-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ep-text);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  padding: 4px;
  outline: none;
}
.ep-grid-item:hover {
  background: var(--ep-hover);
}
.ep-grid-item:focus-visible {
  outline: 2px solid var(--ep-search-focus);
  outline-offset: -2px;
}
.ep-grid-item:active {
  transform: scale(0.9);
}
.ep-grid-item--selected {
  background: var(--ep-active);
  color: var(--ep-active-text);
}
.ep-grid-item--selected:hover {
  background: var(--ep-active);
}
.ep-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  font-size: 13px;
  color: var(--ep-empty-text);
  user-select: none;
}
.ep-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--ep-border);
  background: var(--ep-bg-secondary);
  flex-shrink: 0;
  min-height: 48px;
}
.ep-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ep-active);
  color: var(--ep-active-text);
  flex-shrink: 0;
}
.ep-preview-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ep-preview-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-preview-category {
  font-size: 11px;
  color: var(--ep-text-secondary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-container--popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 1000;
  animation: ep-popover-in 0.15s ease-out;
}
@keyframes ep-popover-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ep-popover-arrow {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--ep-bg);
  border-right: 1px solid var(--ep-border);
  border-bottom: 1px solid var(--ep-border);
  border-radius: 1px;
  z-index: 20;
}
@media (max-width: 360px) {
  .ep-search-wrapper {
    padding: 12px 12px 0;
  }
  .ep-search-input {
    font-size: 14px;
  }
  .ep-category-tabs {
    padding: 6px 8px 8px;
  }
  .ep-category-tab {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
  }
  .ep-grid {
    padding: 0 12px 8px;
  }
  .ep-category-label {
    padding: 10px 12px 6px;
  }
  .ep-preview {
    padding: 8px 12px;
  }
}
@media (pointer: coarse) {
  .ep-grid-item {
    min-height: 40px;
  }
  .ep-category-tab {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
}
.ep-container--fill {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
