/* Chat Buddy live room entry/exit and movement notices v1.2.0 */
.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice {
    margin: 5px 12px;
    padding: 0;
    opacity: .92;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice > .room_presence_inner {
    align-items: center;
    background: rgba(82, 103, 133, .10);
    border: 1px solid rgba(125, 151, 185, .16);
    border-radius: 12px;
    display: flex !important;
    gap: 9px;
    margin: 0 auto;
    max-width: 560px;
    min-height: 42px;
    padding: 7px 12px;
    width: auto;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 14px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_entered .room_presence_icon {
    background: rgba(41, 180, 125, .14);
    color: #2fc78d;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_left .room_presence_icon {
    background: rgba(139, 151, 169, .15);
    color: #aab6c8;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_moved .room_presence_icon {
    background: rgba(92, 126, 245, .15);
    color: #7f9cff;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_sentence {
    align-items: baseline;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0 5px;
    line-height: 1.35;
    margin: 0 !important;
    min-width: 0;
    padding: 0 !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_name {
    color: var(--chat-primary-text-color, #dfe7f2) !important;
    display: inline !important;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: normal;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_text {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--chat-secondary-text-color, #9ba9ba) !important;
    display: inline !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    max-height: none !important;
    padding: 0 !important;
}


.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_destination {
    color: var(--chat-link-color, #8da7ff) !important;
    display: inline !important;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.35 !important;
    margin: 0 !important;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 0 !important;
    text-decoration: none;
}

.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice a.room_presence_destination:hover,
.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice a.room_presence_destination:focus-visible {
    text-decoration: underline;
}

/* v1.0.0 used the ordinary message header/content layout. Hide any stale
   elements if an older notice remains in the DOM during a hot reload. */
.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_time,
.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice > div > .left,
.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice > div > .right > .header,
.main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice > div > .right > .content {
    display: none !important;
}

@media (max-width: 575.98px) {
    .main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice {
        margin-left: 8px;
        margin-right: 8px;
    }

    .main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice > .room_presence_inner {
        border-radius: 10px;
        min-height: 40px;
        padding: 6px 9px;
    }

    .main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_name,
    .main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_text,
    .main .chatbox > .contents > .chat_messages > ul > li.room_presence_notice .room_presence_destination {
        font-size: 12px !important;
    }
}
