const p = {
  all: {
    name: "All",
    emojis: [
      /* Symbols */
      "❤️",
      "💔",
      "💙",
      "💚",
      "💛",
      "🖤",
      "🤍",
      "🤎",
      "✔️",
      "❌",
      "☑️",
      "❗",
      "❓",
      "⚠️",
      "💯",
      "➕",
      "➖",
      "✖️",
      "➗",
      "♻️",
      "⚡",
      "🔥",
      "✨",
      "⭐",
      "⭕",
      "🚫",
      /* People */
      "😀",
      "😃",
      "😄",
      "😁",
      "😆",
      "😅",
      "😂",
      "🤣",
      "😊",
      "😇",
      "🙂",
      "🙃",
      "😉",
      "😍",
      "😘",
      "😎",
      "🤓",
      "😐",
      "😑",
      "😬",
      "🙄",
      "😏",
      "😌",
      "🤩",
      "🥳",
      "🤔",
      "😴",
      "😭",
      "😢",
      "😡",
      "🤯",
      "👍",
      "👎",
      "👌",
      "✌️",
      "🤞",
      "🙏",
      "👏",
      "🙌",
      "💪",
      /* Animals & Nature */
      "🐶",
      "🐱",
      "🐭",
      "🐹",
      "🐰",
      "🦊",
      "🐻",
      "🐼",
      "🐨",
      "🐯",
      "🦁",
      "🐮",
      "🐷",
      "🐸",
      "🐵",
      "🐔",
      "🐧",
      "🐦",
      "🦆",
      "🦅",
      "🦄",
      "🐝",
      "🦋",
      "🌲",
      "🌳",
      "🌴",
      "🌵",
      "🌸",
      "🌼",
      "🌻",
      "☀️",
      "🌙",
      "⭐",
      "🌈",
      "🌧️",
      "❄️",
      "🌊",
      /* Food & Drink */
      "🍎",
      "🍌",
      "🍉",
      "🍇",
      "🍓",
      "🍒",
      "🍍",
      "🥭",
      "🍐",
      "🍊",
      "🍋",
      "🍑",
      "🥝",
      "🥑",
      "🍔",
      "🍟",
      "🍕",
      "🌭",
      "🥪",
      "🌮",
      "🌯",
      "🍣",
      "🍜",
      "🍰",
      "🧁",
      "🍩",
      "🍪",
      "🍫",
      "☕",
      "🍵",
      "🥤",
      "🍺",
      "🍷",
      "🍸",
      "🍹",
      "🥂",
      /* Activity */
      "⚽",
      "🏀",
      "🏈",
      "⚾",
      "🎾",
      "🏐",
      "🏉",
      "🎮",
      "🎯",
      "🎳",
      "🎲",
      "♟️",
      "🏃",
      "🚴",
      "🏊",
      "🏋️",
      "🧘",
      "🎸",
      "🎹",
      "🥁",
      "🎺",
      "🎤",
      "🏆",
      "🥇",
      /* Travel & Places */
      "🚗",
      "🚕",
      "🚌",
      "🚎",
      "🚓",
      "🚑",
      "🚒",
      "✈️",
      "🚀",
      "🚁",
      "🚤",
      "🛳️",
      "🚢",
      "🏠",
      "🏢",
      "🏬",
      "🏫",
      "🏥",
      "🏰",
      "🗼",
      "🗽",
      "⛩️",
      "🕌",
      "🌍",
      "🌎",
      "🌏",
      "🏖️",
      "🏝️",
      /* Objects */
      "📱",
      "💻",
      "🖥️",
      "⌨️",
      "🖱️",
      "📷",
      "📸",
      "🎥",
      "📹",
      "📚",
      "📖",
      "📝",
      "📄",
      "📂",
      "🔒",
      "🔑",
      "🗝️",
      "💡",
      "🔦",
      "🕯️",
      "🧰",
      "🛠️",
      "🔧",
      "⚙️",
      "📦",
      "💳",
      "💰",
      "🔋",
      "🔌",
      /* Flags */
      "🇮🇳",
      "🇺🇸",
      "🇬🇧",
      "🇨🇦",
      "🇦🇺",
      "🇩🇪",
      "🇫🇷",
      "🇪🇸",
      "🇮🇹",
      "🇯🇵",
      "🇰🇷",
      "🇨🇳",
      "🇧🇷",
      "🇲🇽",
      "🇷🇺",
      "🇿🇦",
      "🇳🇿"
    ]
  },
  symbols: {
    name: "Symbols",
    emojis: [
      "❤️",
      "💔",
      "💙",
      "💚",
      "💛",
      "🖤",
      "🤍",
      "🤎",
      "✔️",
      "❌",
      "☑️",
      "❗",
      "❓",
      "⚠️",
      "💯",
      "➕",
      "➖",
      "✖️",
      "➗",
      "♻️",
      "⚡",
      "🔥",
      "✨",
      "⭐",
      "⭕",
      "🚫",
      "⬆️",
      "⬇️",
      "⬅️",
      "➡️",
      "🔄",
      "🔁",
      "🔀",
      "🔔",
      "🔕",
      "⏰",
      "⌛",
      "⏳"
    ]
  },
  people: {
    name: "People",
    emojis: [
      "😀",
      "😃",
      "😄",
      "😁",
      "😆",
      "😅",
      "😂",
      "🤣",
      "😊",
      "😇",
      "🙂",
      "🙃",
      "😉",
      "😍",
      "😘",
      "😎",
      "🤓",
      "😐",
      "😑",
      "😬",
      "🙄",
      "😏",
      "😌",
      "🤩",
      "🥳",
      "🤔",
      "😴",
      "😭",
      "😢",
      "😡",
      "🤯",
      "👍",
      "👎",
      "👌",
      "✌️",
      "🤞",
      "🙏",
      "👏",
      "🙌",
      "💪"
    ]
  },
  "animals-nature": {
    name: "Animals & Nature",
    emojis: [
      "🐶",
      "🐱",
      "🐭",
      "🐹",
      "🐰",
      "🦊",
      "🐻",
      "🐼",
      "🐨",
      "🐯",
      "🦁",
      "🐮",
      "🐷",
      "🐸",
      "🐵",
      "🐔",
      "🐧",
      "🐦",
      "🦆",
      "🦅",
      "🦄",
      "🐝",
      "🦋",
      "🌲",
      "🌳",
      "🌴",
      "🌵",
      "🌸",
      "🌼",
      "🌻",
      "☀️",
      "🌙",
      "⭐",
      "🌈",
      "🌧️",
      "❄️",
      "🌊"
    ]
  },
  "food-drink": {
    name: "Food & Drink",
    emojis: [
      "🍎",
      "🍌",
      "🍉",
      "🍇",
      "🍓",
      "🍒",
      "🍍",
      "🥭",
      "🍐",
      "🍊",
      "🍋",
      "🍑",
      "🥝",
      "🥑",
      "🍔",
      "🍟",
      "🍕",
      "🌭",
      "🥪",
      "🌮",
      "🌯",
      "🍣",
      "🍜",
      "🍰",
      "🧁",
      "🍩",
      "🍪",
      "🍫",
      "☕",
      "🍵",
      "🥤",
      "🍺",
      "🍷",
      "🍸",
      "🍹",
      "🥂"
    ]
  },
  activity: {
    name: "Activity",
    emojis: [
      "⚽",
      "🏀",
      "🏈",
      "⚾",
      "🎾",
      "🏐",
      "🏉",
      "🎮",
      "🎯",
      "🎳",
      "🎲",
      "♟️",
      "🏃",
      "🚴",
      "🏊",
      "🏋️",
      "🧘",
      "🎸",
      "🎹",
      "🥁",
      "🎺",
      "🎤",
      "🏆",
      "🥇",
      "🥈",
      "🥉"
    ]
  },
  "travel-places": {
    name: "Travel & Places",
    emojis: [
      "🚗",
      "🚕",
      "🚌",
      "🚎",
      "🚓",
      "🚑",
      "🚒",
      "✈️",
      "🚀",
      "🚁",
      "🚤",
      "🛳️",
      "🚢",
      "🏠",
      "🏢",
      "🏬",
      "🏫",
      "🏥",
      "🏰",
      "🗼",
      "🗽",
      "⛩️",
      "🕌",
      "🌍",
      "🌎",
      "🌏",
      "🏖️",
      "🏝️"
    ]
  },
  objects: {
    name: "Objects",
    emojis: [
      "📱",
      "💻",
      "🖥️",
      "⌨️",
      "🖱️",
      "📷",
      "📸",
      "🎥",
      "📹",
      "📚",
      "📖",
      "📝",
      "📄",
      "📂",
      "🔒",
      "🔑",
      "🗝️",
      "💡",
      "🔦",
      "🕯️",
      "🧰",
      "🛠️",
      "🔧",
      "⚙️",
      "📦",
      "💳",
      "💰",
      "🔋",
      "🔌"
    ]
  },
  flags: {
    name: "Flags",
    emojis: [
      "🇮🇳",
      "🇺🇸",
      "🇬🇧",
      "🇨🇦",
      "🇦🇺",
      "🇩🇪",
      "🇫🇷",
      "🇪🇸",
      "🇮🇹",
      "🇯🇵",
      "🇰🇷",
      "🇨🇳",
      "🇧🇷",
      "🇲🇽",
      "🇷🇺",
      "🇿🇦",
      "🇳🇿"
    ]
  }
}, x = {
  "💙": "blue heart",
  "💚": "green heart",
  "💛": "yellow heart",
  "🖤": "black heart",
  "🤍": "white heart",
  "🤎": "brown heart",
  "☑️": "check box with check",
  "🔴": "red circle",
  "🟢": "green circle",
  "🟡": "yellow circle",
  "🔵": "blue circle",
  "⬆️": "up arrow",
  "⬇️": "down arrow",
  "⬅️": "left arrow",
  "➡️": "right arrow",
  "🔄": "counterclockwise arrows",
  "🔁": "repeat button",
  "🔀": "shuffle tracks",
  "🔔": "bell",
  "🔕": "muted bell",
  "⏰": "alarm clock",
  "⏳": "hourglass not done",
  "⌛": "hourglass done",
  "♠️": "spade suit",
  "♥️": "heart suit",
  "♦️": "diamond suit",
  "♣️": "club suit",
  "🚫": "prohibited",
  "⭕": "hollow red circle",
  "❎": "cross mark button",
  "😐": "neutral face",
  "😑": "expressionless face",
  "😬": "grimacing face",
  "🙄": "face with rolling eyes",
  "😏": "smirking face",
  "😌": "relieved face",
  "🤩": "star struck",
  "😜": "winking face with tongue",
  "😝": "squinting face with tongue",
  "🤪": "zany face",
  "😢": "crying face",
  "😥": "sad but relieved face",
  "😓": "downcast face with sweat",
  "😱": "face screaming in fear",
  "😨": "fearful face",
  "🤗": "hugging face",
  "🤭": "face with hand over mouth",
  "🤫": "shushing face",
  "🤥": "lying face",
  "👌": "ok hand",
  "✌️": "victory hand",
  "🤞": "crossed fingers",
  "🙌": "raising hands",
  "💪": "flexed biceps",
  "🐔": "chicken",
  "🐧": "penguin",
  "🐦": "bird",
  "🐤": "baby chick",
  "🦆": "duck",
  "🦅": "eagle",
  "🐺": "wolf",
  "🦄": "unicorn",
  "🐝": "honeybee",
  "🐞": "lady beetle",
  "🦋": "butterfly",
  "🐢": "turtle",
  "🐍": "snake",
  "🦖": "t-rex",
  "🌿": "herb",
  "🍀": "four leaf clover",
  "🍁": "maple leaf",
  "🍂": "fallen leaf",
  "🌊": "water wave",
  "❄️": "snowflake",
  "☁️": "cloud",
  "⛈️": "cloud with lightning and rain",
  "🌪️": "tornado",
  "🍐": "pear",
  "🍊": "tangerine",
  "🍋": "lemon",
  "🍑": "peach",
  "🥝": "kiwi fruit",
  "🥑": "avocado",
  "🍆": "eggplant",
  "🌽": "ear of corn",
  "🥕": "carrot",
  "🥔": "potato",
  "🍞": "bread",
  "🥐": "croissant",
  "🥖": "baguette bread",
  "🧀": "cheese wedge",
  "🍖": "meat on bone",
  "🍗": "poultry leg",
  "🥩": "cut of meat",
  "🍦": "soft ice cream",
  "🍨": "ice cream",
  "🍫": "chocolate bar",
  "🍬": "candy",
  "🥛": "glass of milk",
  "🧃": "beverage box",
  "🍹": "tropical drink",
  "🥂": "clinking glasses",
  "🏓": "ping pong",
  "🥊": "boxing glove",
  "🥋": "martial arts uniform",
  "⛳": "flag in hole",
  "🏹": "bow and arrow",
  "🎿": "skis",
  "⛷️": "skier",
  "🏂": "snowboarder",
  "🎤": "microphone",
  "🎬": "clapper board",
  "🎨": "artist palette",
  "🧩": "puzzle piece",
  "🪀": "yo-yo",
  "🚇": "metro",
  "🚉": "station",
  "🚊": "tram",
  "🚝": "monorail",
  "🛻": "pickup truck",
  "🚐": "minibus",
  "🗺️": "world map",
  "🧭": "compass",
  "⛰️": "mountain",
  "🏔️": "snow capped mountain",
  "🌋": "volcano",
  "🏜️": "desert",
  "🏕️": "camping",
  "🏙️": "cityscape",
  "🌆": "city at dusk",
  "🌃": "night with stars",
  "📦": "package",
  "📫": "closed mailbox with raised flag",
  "📬": "open mailbox with raised flag",
  "📭": "open mailbox with lowered flag",
  "🧾": "receipt",
  "💳": "credit card",
  "💰": "money bag",
  "🪙": "coin",
  "🔋": "battery",
  "🔌": "electric plug",
  "🧯": "fire extinguisher",
  "🪜": "ladder",
  "🪞": "mirror",
  "🧹": "broom",
  "🧸": "teddy bear"
};
let g = null, s = "all", u = "", n = null, l = null, d = null;
const k = '[data-theme="dark"], .dark, .editora-theme-dark', A = () => ({
  name: "emojis",
  toolbar: [
    {
      label: "Insert Emoji",
      command: "openEmojiDialog",
      icon: '<svg width="24" height="24" focusable="false"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"></path></svg>',
      shortcut: "Mod-Shift-j",
      type: "button"
    }
  ],
  commands: {
    openEmojiDialog: (t, r) => {
      const e = r?.contentElement || b();
      return e ? (w(e), !0) : !1;
    },
    insertEmoji: (t, r) => {
      if (!t) return !1;
      const e = r?.contentElement || b();
      if (!e) return !1;
      try {
        return v(t, e), !0;
      } catch {
        return !1;
      }
    }
  },
  keymap: {
    "Mod-Shift-j": "openEmojiDialog"
  }
});
function w(t) {
  m(), s = "all", u = "";
  const r = window.getSelection();
  l = null, r && r.rangeCount > 0 && t.contains(r.anchorNode) && (l = r.getRangeAt(0).cloneRange());
  const e = document.createElement("div");
  e.className = "emojis-overlay", z(t) && e.classList.add("rte-ui-theme-dark"), e.onclick = m;
  const o = document.createElement("div");
  o.className = "emojis-dialog", o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "true"), o.onclick = (a) => a.stopPropagation();
  const i = Object.keys(p);
  o.innerHTML = `
    <div class="rte-dialog-header emojis-header">
      <h3>Insert Emojis</h3>
      <button class="rte-dialog-close emojis-close">×</button>
    </div>
    <div class="rte-dialog-body emojis-content">
      <div class="emojis-tabs">
        ${i.map((a) => `
          <button class="emojis-tab ${a === s ? "active" : ""}" data-category="${a}">
            ${p[a].name}
          </button>
        `).join("")}
      </div>
      <div class="emojis-main-content">
        <div class="emojis-search">
          <svg class="emojis-search-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
            <circle cx="11" cy="11" r="8"/>
            <path d="m21 21-4.35-4.35"/>
          </svg>
          <input 
            type="text" 
            placeholder="Search emojis..." 
            class="emojis-search-input"
            id="emoji-search-input"
          />
        </div>
        <div class="emojis-grid" id="emojis-grid">
          ${j(s, u)}
        </div>
      </div>
    </div>
  `, e.appendChild(o), document.body.appendChild(e), g = e, d = (a) => {
    a.key === "Escape" && (a.preventDefault(), a.stopPropagation(), m());
  }, document.addEventListener("keydown", d, !0), y(o, t), S(), requestAnimationFrame(() => {
    o.querySelector("#emoji-search-input")?.focus();
  });
}
function y(t, r) {
  t.querySelector(".emojis-close")?.addEventListener("click", m), t.querySelectorAll(".emojis-tab").forEach((i) => {
    i.addEventListener("click", (a) => {
      const c = a.target.getAttribute("data-category");
      c && E(t, c);
    });
  }), t.querySelector("#emoji-search-input")?.addEventListener("input", (i) => {
    u = i.target.value, n !== null && window.clearTimeout(n), n = window.setTimeout(() => {
      n = null, h(t);
    }, 90);
  }), t.querySelector("#emojis-grid")?.addEventListener("click", (i) => {
    const c = i.target.closest(".emojis-item");
    if (!c) return;
    const f = c.getAttribute("data-emoji") || c.textContent?.trim() || "";
    f && (v(f, r), m());
  });
}
function E(t, r) {
  s = r, t.querySelectorAll(".emojis-tab").forEach((e) => {
    e.classList.toggle("active", e.getAttribute("data-category") === r);
  }), h(t);
}
function h(t) {
  const r = t.querySelector("#emojis-grid");
  r && (r.innerHTML = j(s, u));
}
function j(t, r) {
  let e = p[t].emojis;
  return r.trim() && (e = e.filter((o) => o.toLowerCase().includes(r.toLowerCase()) ? !0 : (x[o] || "").toLowerCase().includes(r.toLowerCase()))), e.length === 0 && r.trim() ? `<div class="emojis-no-results">No emojis found for "${r}"</div>` : e.map((o, i) => `
    <button 
      class="emojis-item" 
      title="Insert ${o}"
      data-emoji="${o}"
    >
      ${o}
    </button>
  `).join("");
}
function m() {
  d && (document.removeEventListener("keydown", d, !0), d = null), n !== null && (window.clearTimeout(n), n = null), g && (g.remove(), g = null);
}
function v(t, r) {
  r.focus();
  let e = window.getSelection();
  if (l && (e?.removeAllRanges(), e?.addRange(l), l = null), e = window.getSelection(), e && e.rangeCount > 0) {
    const o = e.getRangeAt(0);
    o.deleteContents();
    const i = document.createTextNode(t);
    o.insertNode(i), o.setStartAfter(i), o.setEndAfter(i), e.removeAllRanges(), e.addRange(o);
  }
}
function b() {
  const t = window.getSelection();
  if (t && t.rangeCount > 0) {
    const e = t.anchorNode, i = (e instanceof HTMLElement ? e : e?.parentElement)?.closest(".editora-content, .rte-content");
    if (i) return i;
  }
  const r = document.activeElement;
  return r && (r.classList.contains("editora-content") || r.classList.contains("rte-content")) ? r : document.querySelector(".editora-content, .rte-content");
}
function z(t) {
  const r = t || b();
  return r ? !!r.closest(k) : !1;
}
function S() {
  if (document.getElementById("emojis-dialog-styles")) return;
  const t = document.createElement("style");
  t.id = "emojis-dialog-styles", t.textContent = `
    .emojis-overlay {
      --rte-emoji-overlay-bg: rgba(15, 23, 36, 0.56);
      --rte-emoji-dialog-bg: #ffffff;
      --rte-emoji-dialog-text: #101828;
      --rte-emoji-border: #d6dbe4;
      --rte-emoji-subtle-bg: #f7f9fc;
      --rte-emoji-subtle-hover: #eef2f7;
      --rte-emoji-muted-text: #5f6b7d;
      --rte-emoji-accent: #1f75fe;
      --rte-emoji-accent-strong: #165fd6;
      --rte-emoji-ring: rgba(31, 117, 254, 0.18);
      --rte-picker-dialog-width: min(640px, 96vw);
      --rte-picker-dialog-max-height: min(560px, 86vh);
      --rte-picker-dialog-radius: 12px;
      --rte-picker-search-wrap-padding: 12px;
      --rte-picker-search-height: 38px;
      --rte-picker-search-font-size: 13px;
      --rte-picker-search-radius: 8px;
      --rte-picker-tabs-width: 156px;
      --rte-picker-tab-padding-y: 10px;
      --rte-picker-tab-padding-x: 12px;
      --rte-picker-tab-font-size: 13px;
      --rte-picker-grid-padding: 12px;
      --rte-picker-grid-gap: 6px;
      --rte-picker-cell-size: 34px;
      --rte-picker-cell-font-size: 17px;
      --rte-picker-cell-radius: 7px;
      --rte-picker-mobile-tab-min-width: 82px;
      --rte-picker-mobile-cell-size: 32px;
      --rte-picker-mobile-grid-gap: 5px;
      --rte-picker-mobile-dialog-max-height: 88vh;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: var(--rte-emoji-overlay-bg);
      backdrop-filter: blur(2px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      padding: 16px;
      box-sizing: border-box;
    }

    .emojis-overlay.rte-ui-theme-dark {
      --rte-emoji-overlay-bg: rgba(2, 8, 20, 0.72);
      --rte-emoji-dialog-bg: #202938;
      --rte-emoji-dialog-text: #e8effc;
      --rte-emoji-border: #49566c;
      --rte-emoji-subtle-bg: #2a3444;
      --rte-emoji-subtle-hover: #344256;
      --rte-emoji-muted-text: #a5b1c5;
      --rte-emoji-accent: #58a6ff;
      --rte-emoji-accent-strong: #4598f4;
      --rte-emoji-ring: rgba(88, 166, 255, 0.22);
    }

    .emojis-dialog {
      background: var(--rte-emoji-dialog-bg);
      color: var(--rte-emoji-dialog-text);
      border: 1px solid var(--rte-emoji-border);
      border-radius: var(--rte-picker-dialog-radius);
      box-shadow: 0 24px 48px rgba(10, 15, 24, 0.28);
      width: var(--rte-picker-dialog-width);
      max-height: var(--rte-picker-dialog-max-height);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .emojis-header {
      border-bottom: 1px solid var(--rte-emoji-border);
      background: linear-gradient(180deg, rgba(127, 154, 195, 0.08) 0%, rgba(127, 154, 195, 0) 100%);
    }

    .emojis-header h3 {
      color: var(--rte-emoji-dialog-text);
    }

    .emojis-close {
      color: var(--rte-emoji-muted-text);
      border-radius: 8px;
      transition: background-color 0.16s ease, color 0.16s ease;
    }

    .emojis-close:hover {
      background-color: var(--rte-emoji-subtle-hover);
      color: var(--rte-emoji-dialog-text);
    }

    .emojis-content {
      display: flex;
      flex: 1;
      overflow: hidden;
      padding: 0;
    }

    .emojis-main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
    }

    .emojis-search {
      padding: var(--rte-picker-search-wrap-padding) var(--rte-picker-search-wrap-padding) 0 var(--rte-picker-search-wrap-padding);
      position: relative;
    }

    .emojis-search-icon {
      position: absolute;
      left: 24px;
      top: 22px;
      color: var(--rte-emoji-muted-text);
      pointer-events: none;
      z-index: 1;
    }

    .emojis-search-input {
      width: 100%;
      height: var(--rte-picker-search-height);
      padding: 8px 12px 8px 36px;
      border: 1px solid var(--rte-emoji-border);
      border-radius: var(--rte-picker-search-radius);
      font-size: var(--rte-picker-search-font-size);
      color: var(--rte-emoji-dialog-text);
      background-color: var(--rte-emoji-subtle-bg);
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
      box-sizing: border-box;
    }

    .emojis-search-input:focus {
      outline: none;
      border-color: var(--rte-emoji-accent);
      box-shadow: 0 0 0 3px var(--rte-emoji-ring);
    }

    .emojis-search:focus-within .emojis-search-icon {
      color: var(--rte-emoji-accent);
    }

    .emojis-search-input::placeholder {
      color: var(--rte-emoji-muted-text);
    }

    .emojis-tabs {
      display: flex;
      flex-direction: column;
      width: var(--rte-picker-tabs-width);
      border-right: 1px solid var(--rte-emoji-border);
      background-color: var(--rte-emoji-subtle-bg);
      overflow-y: auto;
    }

    .emojis-tab {
      padding: var(--rte-picker-tab-padding-y) var(--rte-picker-tab-padding-x);
      border: none;
      background: none;
      text-align: left;
      cursor: pointer;
      font-size: var(--rte-picker-tab-font-size);
      color: var(--rte-emoji-muted-text);
      border-bottom: 1px solid var(--rte-emoji-border);
      transition: all 0.2s ease;
      line-height: 1.25;
    }

    .emojis-tab:hover {
      background-color: var(--rte-emoji-subtle-hover);
      color: var(--rte-emoji-dialog-text);
    }

    .emojis-tab.active {
      background-color: var(--rte-emoji-accent);
      color: #fff;
      font-weight: 500;
    }

    .emojis-tab.active:hover {
      background-color: var(--rte-emoji-accent-strong);
    }

    .emojis-grid {
      padding: var(--rte-picker-grid-padding);
      overflow-y: auto;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(var(--rte-picker-cell-size), 1fr));
      gap: var(--rte-picker-grid-gap);
      contain: content;
    }

    .emojis-item {
      width: var(--rte-picker-cell-size);
      height: var(--rte-picker-cell-size);
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--rte-emoji-border);
      background: var(--rte-emoji-subtle-bg);
      border-radius: var(--rte-picker-cell-radius);
      cursor: pointer;
      font-size: var(--rte-picker-cell-font-size);
      transition: all 0.2s ease;
      color: var(--rte-emoji-dialog-text);
    }

    .emojis-item:hover {
      background-color: var(--rte-emoji-accent);
      border-color: var(--rte-emoji-accent);
      color: #fff;
      transform: scale(1.05);
    }

    .emojis-item:active {
      transform: scale(0.95);
    }

    .emojis-no-results {
      grid-column: 1 / -1;
      text-align: center;
      color: var(--rte-emoji-muted-text);
      font-size: 14px;
      padding: 40px 20px;
      background-color: var(--rte-emoji-subtle-bg);
      border-radius: 8px;
      border: 1px solid var(--rte-emoji-border);
    }

    /* Responsive design */
    @media (max-width: 768px) {
      .emojis-dialog {
        width: 96%;
        max-height: var(--rte-picker-mobile-dialog-max-height);
      }

      .emojis-content {
        flex-direction: column;
      }

      .emojis-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--rte-emoji-border);
        flex-direction: row;
        overflow-x: auto;
      }

      .emojis-tab {
        border-bottom: none;
        border-right: 1px solid var(--rte-emoji-border);
        white-space: nowrap;
        min-width: var(--rte-picker-mobile-tab-min-width);
      }

      .emojis-grid {
        grid-template-columns: repeat(auto-fill, minmax(var(--rte-picker-mobile-cell-size), 1fr));
        gap: var(--rte-picker-mobile-grid-gap);
      }

      .emojis-item {
        width: var(--rte-picker-mobile-cell-size);
        height: var(--rte-picker-mobile-cell-size);
        font-size: 16px;
      }
    }
  `, document.head.appendChild(t);
}
export {
  A as EmojisPlugin
};
