/* Emoji Picker Overlay */
.emoji-picker-overlay {
    display: none;
    position: absolute;
    background: #1f1f1f;
    border: 1px solid #444;
    border-radius: 8px;
    width: 300px;
    height: 350px;
    /* High Z-Index to stay on top of everything */
    z-index: 100000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
}

.emoji-header {
    display: flex;
    border-bottom: 1px solid #333;
    background: #111;
    flex-shrink: 0;
    height: 40px;
}

.emoji-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    color: #888;
    font-size: 0.9em;
    font-weight: bold;
    user-select: none;
    line-height: 20px;
}

.emoji-tab.active {
    color: #00ff00;
    border-bottom: 2px solid #00ff00;
    background: #2a2a2a;
}

.emoji-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    gap: 5px;
}

/* Scrollbar styling */
.emoji-body::-webkit-scrollbar { width: 8px; }
.emoji-body::-webkit-scrollbar-track { background: #111; }
.emoji-body::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }

/* Emoji Items */
.emoji-item {
    font-size: 1.4em;
    cursor: pointer;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
    color: #fff;
    user-select: none;
}

.emoji-item:hover {
    background: #333;
}

.custom-emoji-item {
    width: 32px;
    height: 32px;
    object-fit: contain;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
}

.custom-emoji-item:hover {
    background: #444;
}