/* Emoji Pro: selector + efecte. Steagurile pentru Windows: Twemoji Country Flags (CC-BY 4.0, Twitter/Mozilla; polyfill MIT). */

/* ---------- selector ---------- */
.sme-host { padding: 0 !important; overflow: hidden !important; width: 340px !important; max-width: calc(100vw - 24px) !important; min-width: 0 !important; max-height: none !important; border-radius: 16px !important; border: 1px solid rgba(0,0,0,.08) !important; box-shadow: 0 12px 40px rgba(20,22,40,.22) !important; background: #fff !important; }
.sme-host.dropdown-menu { display: block; }
.sme-root { display: flex; flex-direction: column; height: 380px; max-height: 70vh; position: relative; color: #1c1c21; font-family: inherit; }
.sme-top { display: flex; gap: 8px; padding: 10px 10px 6px; position: relative; }
.sme-search { flex: 1; min-width: 0; height: 36px; border: 0; border-radius: 12px; background: #f1f2f6; padding: 0 12px; font-size: 14px; outline: none; box-shadow: none; }
.sme-search:focus { background: #e9eaf1; }
.sme-tone { width: 36px; height: 36px; border: 0; border-radius: 12px; background: #f1f2f6; font-size: 18px; cursor: pointer; line-height: 1; }
.sme-tone:hover { background: #e4e6ee; }
.sme-tonepop { position: absolute; right: 10px; top: 46px; z-index: 5; display: flex; gap: 2px; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.22); }
.sme-tonepop[hidden] { display: none; }
.sme-tonepop button { border: 0; background: transparent; font-size: 22px; padding: 4px 5px; border-radius: 10px; cursor: pointer; transition: transform .15s cubic-bezier(.34,1.56,.64,1); }
.sme-tonepop button:hover { background: #f1f2f6; transform: scale(1.25); }
.sme-top, .sme-tabs, .sme-foot { flex: 0 0 auto; }
.sme-tabs { display: flex; padding: 2px 6px 0; border-bottom: 1px solid #eef0f4; overflow-x: auto; scrollbar-width: none; }
.sme-tabs::-webkit-scrollbar { display: none; }
.sme-tab { flex: 1 0 auto; min-width: 34px; height: 34px; border: 0; background: transparent; font-size: 18px; cursor: pointer; border-radius: 10px; filter: grayscale(.85); opacity: .75; transition: filter .15s, opacity .15s, transform .2s cubic-bezier(.34,1.56,.64,1); }
.sme-tab:hover { filter: none; opacity: 1; transform: scale(1.18); }
.sme-body { flex: 1 1 auto; overflow-y: auto; padding: 0 8px 8px; overscroll-behavior: contain; outline: none; }
.sme-sec { content-visibility: auto; contain-intrinsic-size: auto 240px; }
.sme-sec h6 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 10px 4px 6px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: #8a8a94; background: rgba(255,255,255,.94); backdrop-filter: blur(4px); }
.sme-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; }
.sme-e { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 0; font-size: 24px; line-height: 1; border-radius: 10px; cursor: pointer; transition: transform .16s cubic-bezier(.34,1.56,.64,1), background .12s; -webkit-tap-highlight-color: transparent; font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.sme-e:hover, .sme-e:focus-visible { background: #f1f2f6; transform: scale(1.4); position: relative; z-index: 1; outline: none; }
.sme-e:active { transform: scale(1.1); }
.sme-empty { padding: 40px 10px; text-align: center; color: #8a8a94; font-size: 14px; }
.sme-empty span { display: block; font-size: 38px; margin-bottom: 6px; }
.sme-foot { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-top: 1px solid #eef0f4; min-height: 48px; background: #fafbfc; }
.sme-root .sme-prev { font-size: 28px !important; line-height: 1; display: inline-block; font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.sme-bounce { animation: sme-bounce .45s cubic-bezier(.34,1.56,.64,1); }
.sme-root .sme-name { font-size: 13px !important; font-weight: 500; color: #6d6d77; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sme-fly { position: fixed; z-index: 100002; pointer-events: none; font-size: 20px; line-height: 1; }
@keyframes sme-bounce { 0% { transform: scale(.5) rotate(-12deg); } 60% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }

/* contexte in care meniul este o lista/ul existenta */
ul.sme-host { margin: 0; list-style: none; }
.sme-host .sme-root, .sme-host .sme-root * { box-sizing: border-box; }
.messages-container .sme-host, .emo-message-container.sme-host { bottom: 100%; top: auto; }

@media (max-width: 992px) {
  /* Compositorul de mesaje: panou ancorat deasupra campului de scriere, pe toata latimea. */
  .emo-message-container.sme-host { position: fixed !important; left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)) !important; width: auto !important; margin: 0 !important; transform: none !important; z-index: 1100 !important; }
}
@media (max-width: 480px) {
  .sme-host { width: calc(100vw - 16px) !important; }
  .sme-grid { grid-template-columns: repeat(8, 1fr); }
  .sme-root { height: 340px; }
}

/* ---------- emoji singure marite ---------- */
.sme-solo { line-height: 1.15 !important; background: transparent !important; box-shadow: none !important; }
.sme-solo-1 { font-size: 56px !important; }
.sme-solo-2 { font-size: 44px !important; }
.sme-solo-3 { font-size: 36px !important; }
.sme-solo .twa { transform-origin: 50% 80%; }
.sme-solo-1 .twa { width: 56px !important; height: 56px !important; background-size: 56px 56px !important; }
.sme-solo-pop { animation: sme-solo-pop .7s cubic-bezier(.34,1.56,.64,1) both; transform-origin: 30% 90%; }
@keyframes sme-solo-pop { 0% { transform: scale(.2) rotate(-18deg); opacity: 0; } 55% { transform: scale(1.35) rotate(8deg); opacity: 1; } 78% { transform: scale(.92) rotate(-3deg); } 100% { transform: scale(1) rotate(0); } }
.message-text.sme-solo, .message.sme-solo-wrap { padding-top: 0 !important; padding-bottom: 0 !important; }
.sme-solo.message-text { background: transparent !important; }

/* ---------- efecte pe ecran ---------- */
.sme-layer { position: fixed; inset: 0; z-index: 100003; pointer-events: none; overflow: hidden; }
.sme-p { position: absolute; line-height: 1; will-change: transform, opacity; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

@media (prefers-reduced-motion: reduce) {
  .sme-solo-pop, .sme-bounce { animation: none; }
  .sme-e:hover, .sme-tab:hover { transform: none; }
}
