/* ==================== EMOJI PICKER DROPDOWN ==================== */

.emoji-picker-dropdown {
    position: absolute;
    width: 352px;
    background: #2b2d31;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    overflow: hidden;
}

/* Category Tabs */
.emoji-categories-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #242429;
    border-bottom: 1px solid #242429;
    overflow-x: auto;
    scrollbar-width: none;
}

.emoji-categories-tabs::-webkit-scrollbar {
    display: none;
}

.emoji-category-tab {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #b5bac1;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}

.emoji-category-tab:hover {
    background: #35373c;
    color: #dbdee1;
}

.emoji-category-tab.active {
    background: #5865f2;
    color: #fff;
}

/* Search Bar */
.emoji-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #242429;
    border-bottom: 1px solid #3a3a3f;
}

.emoji-search-bar i {
    color: #b5bac1;
    font-size: 14px;
}

.emoji-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #dbdee1;
    font-size: 14px;
    padding: 4px 0;
}

.emoji-search-bar input::placeholder {
    color: #6d6f78;
}

/* Emoji Grid Container */
.emoji-grid-container {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}

.emoji-grid-container::-webkit-scrollbar {
    width: 8px;
}

.emoji-grid-container::-webkit-scrollbar-track {
    background: transparent;
}

.emoji-grid-container::-webkit-scrollbar-thumb {
    background: #242429;
    border-radius: 4px;
}

.emoji-grid-container::-webkit-scrollbar-thumb:hover {
    background: #35373c;
}

/* Category Sections */
.emoji-category-section {
    margin-bottom: 8px;
}

.emoji-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #949ba4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 4px 4px;
}

/* Emoji Grid */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
    padding: 4px;
}

.emoji-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    position: relative;
}

.emoji-item:hover {
    background: #35373c;
    transform: scale(1.1);
}

.emoji-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.emoji-item.server-emoji {
    position: relative;
}

.emoji-item.server-emoji img {
    width: 28px;
    height: 28px;
}

/* Footer */
.emoji-picker-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #242429;
    border-top: 1px solid #3a3a3f;
    font-size: 13px;
    color: #949ba4;
}

.emoji-picker-footer i {
    font-size: 16px;
    color: #f1c40f;
}

.emoji-picker-footer span {
    flex: 1;
}

.emoji-preview {
    font-size: 20px;
    min-width: 24px;
    text-align: right;
}

/* Empty State */
.emoji-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6d6f78;
    font-size: 13px;
}

.emoji-empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.7;
}

.emoji-empty-state div:first-of-type {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.emoji-empty-state div:last-of-type {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Loading State */
.emoji-loading {
    text-align: center;
    padding: 32px 16px;
    color: #949ba4;
    font-size: 13px;
}

.emoji-loading i {
    font-size: 24px;
    margin-bottom: 12px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Twemoji Support */
.emoji-item img.twemoji {
    width: 22px;
    height: 22px;
}

/* Animations */
.emoji-picker-dropdown.show {
    animation: emojiDropdownShow 0.2s ease;
}

@keyframes emojiDropdownShow {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Custom Emojis Grid (larger) */
#emojiCustom .emoji-grid {
    grid-template-columns: repeat(8, 1fr);
}

#emojiCustom .emoji-item img {
    width: 32px;
    height: 32px;
}

/* Frequently Used */
#emojiRecent .emoji-grid {
    grid-template-columns: repeat(9, 1fr);
}
