/* Shared emoji picker + animated emoji glyphs. */
.nc-emoji-host { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 100; }
.nc-emoji-host[hidden] { display: none; }
.nc-emoji-picker {
  width: min(348px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--nc-color-line, var(--nc-line, #e2e8f0));
  border-radius: 16px;
  background: var(--nc-color-elevated, var(--nc-panel, #fff));
  color: var(--nc-color-ink, var(--nc-ink, #0f172a));
  box-shadow: 0 24px 60px -24px rgba(15, 23, 42, .35), 0 4px 12px rgba(15, 23, 42, .06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.nc-emoji-picker.nc-emoji-in { animation: nc-emoji-panel-in .18s cubic-bezier(.22,1,.36,1) both; }
.nc-emoji-picker-head { display: flex; align-items: center; gap: 6px; padding: 9px 9px 7px 11px; border-bottom: 1px solid var(--nc-color-line, var(--nc-line, #eef2f7)); }
.nc-emoji-search { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid var(--nc-color-line, var(--nc-line, #e2e8f0)); border-radius: 9px; background: var(--nc-color-fill, var(--nc-bg, #f8fafc)); }
.nc-emoji-search span { display: inline-flex; flex: 0 0 14px; opacity: .7; }
.nc-emoji-search svg { width: 14px; height: 14px; }
.nc-emoji-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; }
.nc-emoji-close { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; opacity: .65; }
.nc-emoji-close svg { width: 14px; height: 14px; }
.nc-emoji-close:hover { background: var(--nc-color-fill, var(--nc-bg, #f1f5f9)); opacity: 1; }
.nc-emoji-tabs { display: flex; gap: 2px; padding: 6px 8px; overflow-x: auto; border-bottom: 1px solid var(--nc-color-line, var(--nc-line, #eef2f7)); scrollbar-width: none; }
.nc-emoji-tabs::-webkit-scrollbar { display: none; }
.nc-emoji-tab { display: grid; place-items: center; width: 32px; height: 30px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; opacity: .65; transition: background .15s, opacity .15s, transform .15s; }
.nc-emoji-tab svg { width: 17px; height: 17px; }
.nc-emoji-tab:hover, .nc-emoji-tab[aria-selected="true"] { background: var(--nc-color-fill, var(--nc-bg, #f1f5f9)); opacity: 1; }
.nc-emoji-tab[aria-selected="true"] { transform: translateY(-1px); }
.nc-emoji-body { height: 232px; max-height: 232px; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.nc-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.nc-emoji-item { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 21px; line-height: 1; cursor: pointer; transform-origin: 50% 70%; transition: background .12s, transform .16s cubic-bezier(.22,1,.36,1); }
.nc-emoji-item:hover { background: var(--nc-color-fill, var(--nc-bg, #f1f5f9)); transform: scale(1.24) translateY(-2px); }
.nc-emoji-item:active { animation: nc-emoji-tap .3s cubic-bezier(.22,1,.36,1); }
.nc-emoji-empty { margin: 24px 0; text-align: center; font-size: 12px; opacity: .6; }
.nc-emoji-foot { display: flex; justify-content: space-between; gap: 8px; padding: 6px 11px 9px; border-top: 1px solid var(--nc-color-line, var(--nc-line, #eef2f7)); font-size: 10px; opacity: .55; }
.nc-emoji-glyph { display: inline-block; font-size: 1.12em; line-height: 1; transform-origin: 50% 65%; animation: nc-emoji-pop .42s cubic-bezier(.22,1,.36,1) both; }
.nc-emoji-glyph:hover { animation: nc-emoji-wiggle .45s cubic-bezier(.22,1,.36,1); }
.nc-emoji-only { font-size: 1.35em; letter-spacing: .06em; }
.nc-emoji-only .nc-emoji-glyph { font-size: 1.55em; animation: nc-emoji-pop .42s cubic-bezier(.22,1,.36,1) both, nc-emoji-glow 3s ease-in-out 1.2s infinite; }
@keyframes nc-emoji-panel-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nc-emoji-pop { 0% { opacity: 0; transform: scale(.55) rotate(-8deg); } 65% { opacity: 1; transform: scale(1.12) rotate(3deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes nc-emoji-wiggle { 0%, 100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.18) rotate(-8deg); } 75% { transform: scale(1.18) rotate(8deg); } }
@keyframes nc-emoji-tap { 0% { transform: scale(1); } 45% { transform: scale(.8); } 100% { transform: scale(1); } }
@keyframes nc-emoji-glow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px rgba(52, 199, 89, .35)); } }
@media (prefers-reduced-motion: reduce) { .nc-emoji-picker, .nc-emoji-glyph, .nc-emoji-item { animation: none !important; transition: none !important; } }
/* The legacy client panel is only a positioning host now. */
.nc-widget .nc-emoji-panel.nc-emoji-host { right: auto; padding: 0; border: 0; background: transparent; box-shadow: none; max-height: none; width: auto; overflow: visible; }
/* Solid surface for the widget so the chat text never shows through the picker. */
.nc-widget .nc-emoji-picker { background: var(--nc-color-bg, #fff); }

/* Admin form controls must not paint a second border inside the picker search. */
.nexchat-workspace .nc-emoji-search input,
.nexchat-widget .nc-emoji-search input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 30px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  font: inherit;
  font-size: 12px;
}
.nexchat-workspace .nc-emoji-search input:focus,
.nexchat-widget .nc-emoji-search input:focus {
  border: 0 !important;
  box-shadow: none !important;
}
.nexchat-workspace .nc-emoji-search,
.nexchat-widget .nc-emoji-search {
  height: 34px;
  padding: 0 10px;
}
.nexchat-workspace .nc-emoji-picker-head,
.nexchat-widget .nc-emoji-picker-head {
  align-items: center;
  gap: 8px;
}
.nexchat-workspace .nc-emoji-search input::-webkit-search-cancel-button,
.nexchat-widget .nc-emoji-search input::-webkit-search-cancel-button,
.nexchat-workspace .nc-emoji-search input::-webkit-search-decoration,
.nexchat-widget .nc-emoji-search input::-webkit-search-decoration{display:none}

/* Telegram-style live emoji pack: looping, lightweight CSS motion. */
.nc-emoji-item[data-animation],
.nc-emoji-glyph[data-animation]{display:inline-block;transform-origin:50% 70%;will-change:transform;animation-iteration-count:infinite;animation-timing-function:ease-in-out}
.nc-emoji-item[data-animation="heartbeat"],.nc-emoji-glyph[data-animation="heartbeat"]{animation-name:nc-emoji-heartbeat;animation-duration:1.6s}
.nc-emoji-item[data-animation="bounce"],.nc-emoji-glyph[data-animation="bounce"]{animation-name:nc-emoji-bounce;animation-duration:1.8s}
.nc-emoji-item[data-animation="flicker"],.nc-emoji-glyph[data-animation="flicker"]{animation-name:nc-emoji-flicker;animation-duration:1.4s}
.nc-emoji-item[data-animation="sparkle"],.nc-emoji-glyph[data-animation="sparkle"]{animation-name:nc-emoji-sparkle;animation-duration:2s}
.nc-emoji-item[data-animation="clap"],.nc-emoji-glyph[data-animation="clap"]{animation-name:nc-emoji-clap;animation-duration:1.8s}
.nc-emoji-item[data-animation="laugh"],.nc-emoji-glyph[data-animation="laugh"]{animation-name:nc-emoji-laugh;animation-duration:1.6s}
.nc-emoji-item[data-animation="rocket"],.nc-emoji-glyph[data-animation="rocket"]{animation-name:nc-emoji-rocket;animation-duration:2.4s}
.nc-emoji-item[data-animation="pop"],.nc-emoji-glyph[data-animation="pop"]{animation-name:nc-emoji-pulse;animation-duration:2s}
.nc-emoji-item[data-animation="shake"],.nc-emoji-glyph[data-animation="shake"]{animation-name:nc-emoji-shake;animation-duration:1.8s}
.nc-emoji-item[data-animation="confetti"],.nc-emoji-glyph[data-animation="confetti"]{animation-name:nc-emoji-confetti;animation-duration:1.8s}
@keyframes nc-emoji-heartbeat{0%,100%{transform:scale(1)}14%{transform:scale(1.22)}28%{transform:scale(1)}42%{transform:scale(1.14)}56%{transform:scale(1)}}
@keyframes nc-emoji-bounce{0%,100%{transform:translateY(0)}30%{transform:translateY(-4px) scale(1.05)}55%{transform:translateY(0) scale(.98)}70%{transform:translateY(-2px)}}
@keyframes nc-emoji-flicker{0%,100%{transform:scale(1) rotate(-2deg)}35%{transform:scale(1.08) rotate(3deg)}65%{transform:scale(.98) rotate(-1deg)}}
@keyframes nc-emoji-sparkle{0%,100%{transform:scale(1) rotate(0);filter:brightness(1)}50%{transform:scale(1.12) rotate(8deg);filter:brightness(1.2)}}
@keyframes nc-emoji-clap{0%,100%{transform:rotate(0) scale(1)}25%{transform:rotate(-12deg) scale(1.08)}55%{transform:rotate(10deg) scale(1.08)}75%{transform:rotate(-4deg) scale(1)}}
@keyframes nc-emoji-laugh{0%,100%{transform:rotate(0) scale(1)}30%{transform:rotate(-7deg) scale(1.08)}65%{transform:rotate(7deg) scale(1.08)}}
@keyframes nc-emoji-rocket{0%,100%{transform:translate(0,0) rotate(0)}35%{transform:translate(2px,-3px) rotate(8deg)}70%{transform:translate(-1px,1px) rotate(-4deg)}}
@keyframes nc-emoji-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}
@keyframes nc-emoji-shake{0%,100%{transform:rotate(0)}20%{transform:rotate(-8deg)}40%{transform:rotate(8deg)}60%{transform:rotate(-5deg)}80%{transform:rotate(5deg)}}
@keyframes nc-emoji-confetti{0%,100%{transform:rotate(-5deg) scale(1)}33%{transform:rotate(7deg) scale(1.08)}66%{transform:rotate(-3deg) scale(1.04)}}
