/* ---------- Popup ---------- */
.chat-emoticons-popup {
    background: #fff;
   
    overflow: hidden;
}

/* ---------- Buscador ---------- */
.chat-emoticons-search {
    padding: 8px 10px;
    background: #fafbfc;
    border-bottom: 1px solid #eef1f4;
}
.chat-emoticons-search .form-control {
    height: 32px;
    border-radius: 20px;
    font-size: 12px;
    background: #fff;
    border: 1px solid #e1e8ed;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.chat-emoticons-search .form-control:focus {
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, .15);
}

/* ---------- Tabs con flechas ---------- */
.chat-emoticons-tabs-wrapper {
    display: flex;
    align-items: center;
    background: #fafbfc;
    border-bottom: 1px solid #eef1f4;
    padding: 0 2px;
    position: relative;
}
.chat-emoticons-nav {
    flex: 0 0 22px;
    width: 22px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #8899a6;
    font-size: 12px;                /* antes 22px porque era texto; ahora 12px para el icono */
    line-height: 1;
    cursor: pointer;
    padding: 0;
    user-select: none;
    display: inline-flex;           /* centra el icono */
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s, transform .15s;
    border-radius: 6px;
}
.chat-emoticons-nav i { pointer-events: none; }
.chat-emoticons-nav:hover  { color: #1da1f2; background: rgba(29,161,242,.08); }
.chat-emoticons-nav:active { transform: scale(.9); }

.chat-emoticons-tabs {
    flex: 1 1 auto;
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.chat-emoticons-tabs::-webkit-scrollbar { display: none; }

.chat-emoticons-tab {
    flex: 0 0 auto;
    height: 38px;
    min-width: 40px;
    border: 0;
    background: transparent;
    padding: 0 6px;
    font-size: 20px;
    line-height: 1;
    color: #66757f;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid transparent;
    transition: transform .15s, border-color .15s;
}
.chat-emoticons-tab:hover  { transform: scale(1.15); }
.chat-emoticons-tab.active { border-bottom-color: #1da1f2; }
.chat-emoticons-tab img {
    height: 20px;
    width: 20px;
    object-fit: contain;
    pointer-events: none;
}

/* ---------- Paneles ---------- */
.chat-emoticons-panes {
    max-height: 200px;
    min-height: 150px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: #ccd6dd transparent;
}
.chat-emoticons-panes::-webkit-scrollbar { width: 6px; }
.chat-emoticons-panes::-webkit-scrollbar-thumb {
    background: #ccd6dd;
    border-radius: 3px;
}

.chat-emoticons-pane {
    display: none;
    flex-wrap: wrap;
    gap: 2px;
    animation: emotFade .18s ease;
}
.chat-emoticons-pane.active { display: flex; }

@keyframes emotFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Botón emoji ---------- */
.chat-emoticon-option {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    padding: 3px 4px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    transition: transform .12s, background .12s;
}
.chat-emoticon-option:hover  { background: #e8f5fe; transform: scale(1.2); }
.chat-emoticon-option:active { transform: scale(.95); }

.chat-emoticon-option img {
    max-height: 20px;
    max-width: 100%;
    pointer-events: none;
}

/* Modo búsqueda: el panel activo se muestra aunque estemos filtrando */
.chat-emoticons-panes.searching .chat-emoticons-pane {
    display: flex;
}
