/* ═══════════════════════════════════════════════════════════════════════════════
   29. SELECTOR DE EMOJIS
   UI y comportamiento visual del picker de emojis del input de chat
   ═══════════════════════════════════════════════════════════════════════════════ */

.message-input-container {
    position: relative;
}

.emoji-picker {
    position: absolute;
    right: 12px;
    bottom: calc(100% + 8px);
    width: min(340px, calc(100vw - 24px));
    max-height: 380px;
    display: flex;
    flex-direction: column;
    background: #202c33;
    border: 1px solid #313d45;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    z-index: 120;
}

.emoji-picker[hidden] {
    display: none !important;
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: #e9edef;
    font-size: 14px;
    border-bottom: 1px solid #2a3942;
}

.emoji-picker-close {
    background: transparent;
    border: none;
    color: #aebac1;
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 6px;
}

.emoji-picker-close:hover {
    color: #e9edef;
    background: rgba(255, 255, 255, 0.08);
}

.emoji-search {
    padding: 10px 12px 8px;
}

.emoji-search input {
    width: 100%;
    border: 1px solid #3b4a54;
    border-radius: 8px;
    background: #111b21;
    color: #e9edef;
    padding: 8px 10px;
    outline: none;
    font-size: 13px;
}

.emoji-search input:focus {
    border-color: #00a884;
}

.emoji-tabs {
    display: flex;
    gap: 6px;
    padding: 0 12px 10px;
    overflow-x: auto;
}

.emoji-tab-btn {
    border: none;
    background: #2a3942;
    color: #aebac1;
    border-radius: 999px;
    padding: 6px 9px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.emoji-tab-btn.active {
    background: #00a884;
    color: #0b141a;
    font-weight: 600;
}

.emoji-grid {
    padding: 6px 12px 12px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}

.emoji-item {
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 6px;
}

.emoji-item:hover,
.emoji-item:focus-visible {
    background: #2a3942;
    outline: none;
}

.emoji-empty-state {
    color: #aebac1;
    text-align: center;
    font-size: 13px;
    padding: 16px 8px;
    grid-column: 1 / -1;
}

.emoji-btn.active {
    color: #00a884;
}

@media (max-width: 768px) {
    .emoji-picker {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: calc(100% + 6px);
        max-height: 320px;
    }
}
