/* منتقي الإيموجي والملصقات */

.emoji_picker {
    z-index: 1050 !important;
    max-width: 13.8rem !important;
    max-height: none !important;
    overflow: hidden;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

.emoji_picker.public_messages {
    bottom: 2.35rem !important;
    left: 0.1rem !important;
}

.emoji_picker.private_messages {
    bottom: 2.45rem !important;
}

.emoji_picker.wall,
.emoji_picker.wall-comments {
    bottom: 2.2rem !important;
    height: auto !important;
}

.emoji_picker__tabs {
    display: flex;
    gap: 0;
    background: linear-gradient(180deg, #3d4f7c 0%, #2a3a63 100%);
    border-radius: 0.2083333333rem 0.2083333333rem 0 0;
    border: 0.0416666667rem solid #999;
    border-bottom: none;
}

.emoji_picker__tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    cursor: pointer;
    line-height: 1.2;
}

.emoji_picker__tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.emoji_picker__tab--active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 -2px 0 #8ab4ff;
}

.emoji_picker__panels {
    max-height: 8.2rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.15rem 0.1rem;
    background: #fefffc;
    border: 0.0416666667rem solid #999;
    border-top: none;
    border-radius: 0 0 0.2083333333rem 0.2083333333rem;
}

/* 6 إيموجي في كل سطر */
.emoji_picker__panel--faces {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.08rem;
    align-items: center;
    justify-items: center;
}

.emoji_picker__panel--faces .emoji_picker__item {
    display: block;
    width: 100%;
    max-width: 1.6rem;
    height: 22px;
    object-fit: contain;
    padding: 0.06rem;
    box-sizing: border-box;
}

/* الملصقات: 3 في السطر */
.emoji_picker__panel--stickers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    padding: 0.2rem;
}

.sticker_picker__item {
    width: 100%;
    max-width: 3.5rem;
    height: auto;
    max-height: 3.5rem;
    object-fit: contain;
    padding: 0.15rem;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.25rem;
    box-sizing: border-box;
    cursor: pointer;
}

.emoji_picker__item:hover,
.sticker_picker__item:hover {
    transform: scale(1.06);
    background: rgba(0, 0, 0, 0.05);
}

.emoji_picker__empty {
    grid-column: 1 / -1;
    padding: 0.6rem 0.3rem;
    font-size: 0.55rem;
    color: #888;
    text-align: center;
}

.chat-sticker-img {
    display: inline-block;
    vertical-align: middle;
    max-width: 5.5rem;
    max-height: 5.5rem;
    width: auto;
    height: auto;
    margin: 0.1rem 0.15rem;
    border-radius: 0.25rem;
}

.public_message__content .chat-sticker-img,
.private_message__content .chat-sticker-img,
.wall_post__content .chat-sticker-img {
    max-width: 6rem;
    max-height: 6rem;
}

.sticker-admin-grid .sticker-admin-item img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

@media (max-width: 480px) {
    .emoji_picker {
        max-width: calc(100vw - 1.5rem) !important;
    }

    .emoji_picker__panel--faces {
        grid-template-columns: repeat(6, 1fr);
    }

    .chat-sticker-img {
        max-width: 4.5rem;
        max-height: 4.5rem;
    }
}
