/* ============================================================
   TECLADO DE EMOJIS, EMOTES Y COMPETITIVOS · v3.1
   ============================================================ */

.teclado-emojis-overlay {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    max-width: 400px;
    background: rgba(15, 25, 40, 0.98);
    border: 1px solid var(--cyan, #00E5FF);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
    box-sizing: border-box;
}

.teclado-emojis-overlay.show {
    display: flex;
}

.teclado-emojis-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.teclado-emojis-tab {
    background: transparent;
    border: none;
    color: #8aa8b8;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.teclado-emojis-tab.active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--cyan, #00E5FF);
}

.teclado-emojis-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.teclado-emojis-grid::-webkit-scrollbar {
    width: 4px;
}

.teclado-emojis-grid::-webkit-scrollbar-thumb {
    background: var(--cyan, #00E5FF);
    border-radius: 4px;
}

.teclado-emojis-vacio {
    grid-column: 1 / -1;
    text-align: center;
    color: #8aa8b8;
    font-size: 0.75rem;
    padding: 12px;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.emoji-item:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--cyan, #00E5FF);
    transform: scale(1.1);
}

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

/* Emotes anchos (desafío): ocupan dos columnas y se ven completos */
.emoji-item.badge {
    grid-column: span 2;
    aspect-ratio: auto;
    height: 44px;
    padding: 4px;
}

.emoji-item.badge img {
    width: 100%;
    height: 100%;
}

/* Render de emotes dentro de los mensajes del chat */
img.emote-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
}

img.emote-img.emote-badge {
    width: auto;
    height: 32px;
    max-width: 96px;
}