@font-face {
  font-family: 'Twemoji Country Flags';
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
}

.emoji-tile, .emoji-composer-input, #recent-grid {
    font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

/* Premium Emoji Picker CSS */
.emoji-composer-card {
    background: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

.emoji-composer-input {
    font-size: 24px;
    min-height: 56px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    line-height: 1.4;
    word-break: break-all;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.emoji-composer-input:empty::before {
    content: attr(placeholder);
    color: #9ca3af;
    font-size: 14px;
    font-family: var(--bs-body-font-family);
}

.emoji-picker-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.emoji-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.emoji-search-input {
    height: 48px;
    padding-left: 45px;
    border-radius: 10px;
    font-size: 14px;
}

.emoji-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.emoji-categories {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.emoji-categories::-webkit-scrollbar {
    height: 4px;
}

.emoji-categories::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.emoji-cat-pill {
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #4b5563;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.emoji-cat-pill:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.emoji-cat-pill.active {
    background: var(--primary_color, #2584DC);
    color: #ffffff;
    border-color: var(--primary_color, #2584DC);
}

.emoji-grid-section {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.emoji-grid-section::-webkit-scrollbar {
    width: 6px;
}

.emoji-grid-section::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.emoji-grid-category {
    margin-bottom: 24px;
}

.emoji-category-title {
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 12px;
    text-align: left;
    border-left: 3px solid var(--primary_color, #2584DC);
    padding-left: 8px;
}

.emoji-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
}

.emoji-tile {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.1s ease, border-color 0.1s ease;
    position: relative;
}

.emoji-tile:hover {
    transform: scale(1.15);
    background: #eff6ff;
    border-color: rgba(37, 132, 220, 0.3);
    z-index: 10;
}

/* Floating copy bubble animation */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.7);
    }

    30% {
        opacity: 1;
        transform: translate(-50%, -24px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -40px) scale(0.9);
    }
}

.copy-bubble {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #22c55e;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    animation: floatUp 0.6s ease-out forwards;
    white-space: nowrap;
    z-index: 100;
}

.emoji-recent-box {
    margin-bottom: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
}