/* Community chatbox: layout comes from assets/css/style.css (#top_chat, .t_c-*). */

#top_chat .t_c-chatlist {
    overflow-x: hidden;
    overflow-y: auto;
}

#top_chat .t_c-chatlist .item.is-pending {
    opacity: .55;
}

#top_chat .t_c-chatlist .item.chat-flash > div.detail {
    background-color: rgba(255, 255, 255, .28);
}

#top_chat .t_c-chatlist .user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#top_chat .t_c-chatlist .is-wrap .item > div.detail .options .btn {
    cursor: pointer;
}

/* Staff controls are always rendered and revealed after auth/state resolves. */
#top_chat:not(.hi-chat-staff) .options,
#top_chat:not(.hi-chat-staff) .unpin {
    display: none !important;
}

#top_chat .chat-empty {
    padding: 1rem;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

#top_chat .new-chat {
    white-space: nowrap;
}

#top_chat .dropdown-menu-emo {
    display: none;
    width: 18rem;
    min-width: 0;
    max-width: calc(100vw - 2rem);
    max-height: none;
    padding: 0;
    overflow: visible;
}

#top_chat .is-emo.show .dropdown-menu-emo {
    display: block;
}

#top_chat .dropdown-menu-emo emoji-picker {
    --border-radius: 10px;
    --border-color: transparent;
    --num-columns: 7;
    display: block;
    width: 100%;
    height: 20rem;
}

@media (hover: none) {
    #top_chat .t_c-chatlist .is-wrap .item > div.detail .is-info > div,
    #top_chat .t_c-chatlist .is-wrap .item > div.detail .options .btn {
        opacity: 1;
    }
}

/* The theme's .btn colour is dark; keep the toggle readable on the dark panel. */
#top_chat .t_c-close a,
#top_chat .t_c-close a:hover {
    color: #fff;
}
