.chatBubbleDiv {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
}


/* Floating chat button */
.chat-btn {
    position: relative;
    right: 0px;
    bottom: 0px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 999;
    /* above most content */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.chat-btn:active {
    transform: scale(.98);
}

/* Unread badge */
.chat-badge {
    position: absolute !important;
    top: 0px !important;
    right: 0px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 18px;
    border-radius: 999px;
}

.chat-badge-bak {
    position: absolute !important;
    top: -5px !important;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 18px;
    border-radius: 999px;
}

/* Chat panel */
.chat-panel {
    position: fixed;
    right: 1.5rem;
    bottom: calc(1.5rem + 80px);
    /* above the button */
    width: 480px;
    max-width: calc(100vw - 3rem);
    z-index: 1060;
    display: flex;
    visibility: visible;
    /* toggled by JS */
}

/* chatMsgBody */
.chat-msg-body {
    position: relative;
    min-height: 250px;
    max-height: 55vh;
    overflow: auto;
}

.chat-msg-body>div:last-child {
    margin-bottom: 0px !important;
}

.messageFile,
.messageFile a {
    background: inherit !important;
}

.messageFile>*:last-child {
    margin-right: 0px !important;
}

.messageFileThumbnail {
    max-width: 80px;
    max-height: 80px;
    margin-right: 10px;
    margin-bottom: 10px;
    position: relative;
    height: fit-content;
    background: inherit;
}

.messageFileThumbnail img {
    max-width: 80px;
    max-height: 80px;
}

.chatMsgDiv {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.chatMsgBtn {
    padding: 0.12rem 0.75rem;
    margin-left: 5px;
}

.filePreview {
    flex-basis: 100%;
    display: flex;
    position: relative;
}

.filePreview .filePreviewThumbnail {
    margin-bottom: 10px;
    margin-right: 20px;
    position: relative;
}

.filePreview>div>.chatFileRemove {
    position: absolute;
    right: -8px;
    top: -8px;
    border-radius: 999px;
    background: #EE0000;
    color: #FFFFFF;
    padding: 0px 5px;
    font-weight: bold;
    cursor: pointer;
    border: 0px;
}

.filePreview .filePreviewThumbnail>img {
    max-width: 55px;
    max-height: 55px;
}

@media (max-width: 576px),
(max-height: 576px) {
    .chat-panel {
        width: 100%;
        max-width: unset;
        left: 0;
        top: var(--app-banner-height, 0px);

        display: flex;
        flex-direction: column;
        height: calc(100dvh - var(--app-banner-height, 0px));
    }

    .chat-msg-body {
        position: relative;
        min-height: unset;
        max-height: unset;

        flex: 1;
        overflow: auto;
    }
}