.hdchat-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hdchat-view .hdchat-history {
    display: flex;
    flex-direction: column-reverse;
    height: calc(100% - 90px);
    overflow-y: auto;
}

.hdchat-view .hdchat-message {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.hdchat-view .hdchat-message .hdchat-message-body {
    align-self: flex-start;
    background: #F0F7FA;
    color: #4A5660;
    border-radius: 8px;
    padding: 1rem;
    max-width: 70%;
    font-weight: 600;
    word-break: break-word;
}

.hdchat-view .hdchat-message.customer .hdchat-message-body {
    align-self: flex-end;
    background: #00578E;
    color: #fefefe;
}

.hdchat-view .hdchat-message.third .hdchat-message-body {
    align-self: flex-end;
    background: #C43040;
    color: #fefefe;
}

.hdchat-view .hdchat-message .hdchat-message-header {
    font-size: 80%;
    color: #ccc;
    margin-top: 1px;
}

.hdchat-view .hdchat-message.customer .hdchat-message-header,
.hdchat-view .hdchat-message.third .hdchat-message-header {
    text-align: right;
}

.hdchat-view input::placeholder {
    color: #ccc;
}

.hdchat-view .hdchat-control {
    position: relative;
    padding-left: 46px;
}

.hdchat-view .hdchat-control div.mage-error {
    position: fixed;
    left: 0;
    bottom: 2px;
}

.hdchat-view .hdchat-control .image-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    text-indent: -9999px;
    cursor: pointer;
}

.hdchat-view .hdchat-control .image-icon.hdchat-icon-upload {
    left: 0;
    top: 8px;
    background: center / contain no-repeat url(../images/upload.png);
    opacity: 0.6;
}

.hdchat-view .hdchat-control .image-icon.hdchat-icon-send {
    right: 8px;
    top: 8px;
    background: center / contain no-repeat url(../images/send.png);
    opacity: 0.6;
}

.hdchat-view .hdchat-control .image-icon.hdchat-icon-send:disabled {
    opacity: 0.2;
}

.hdchat-upload-info {
    position: absolute;
    right: 0;
    bottom: 54px;
    font-size: 90%;
    background-color: rgba(255, 255, 255, 0.5);
}

.hdchat-chat-notify-wrapper {
    position: absolute;
    display: flex;
    margin-top: 4px;
}

.hdchat-chat-notify-wrapper label {
    font-size: 12px;
}

input.message {
    padding: 0 50px 0 9px;
}

@media (max-width: 767px) {
    .hdchat-view .hdchat-message {
        font-size: 14px;
    }
    .hdchat-view .hdchat-history {
        height: calc(100% - 80px);
        margin-bottom: 20px;
    }
}
.hdchat-view .hdchat-message .hdchat-message-header.from-email {
    background: no-repeat;
    background-image: url(../images/mail.png);
    background-size: contain;
    padding-right: 22px;
    background-position: right;
}
.hdchat-view .hdchat-message .hdchat-message-header.from-text {
    background: no-repeat;
    background-image: url(../images/message.png);
    background-size: contain;
    padding-right: 22px;
    background-position: right;
}
.hdchat-view .hdchat-message .hdchat-message-header.from-voice {
    background: no-repeat;
    background-image: url(../images/phone.png);
    background-size: contain;
    padding-left: 22px;
}
.hdchat-view .hdchat-message.user .hdchat-message-header.from-email,
.hdchat-view .hdchat-message.user .hdchat-message-header.from-text,
.hdchat-view .hdchat-message.user .hdchat-message-header.from-voice {
    padding-left: 22px;
    padding-right: 0;
    background-position: left;
}
.hdchat-view .hdchat-message.customer .hdchat-message-header.from-voice {
    padding-right: 22px;
    background-position: right;
}
.hdchat-view .hdchat-message .hdchat-message-body.voice {
    font-style: italic;
}
.hdchat-view .hdchat-message .hdchat-message-thumbnail {
    margin-top: 5px;
    font-style: italic;
    font-size: 80%;
}
#hdchat_message_container {
    display: flex;
    flex-direction: column-reverse;
}
.hdchat-pager {
    text-align: center;
}
#hdchat_load_more {
    font-size: 14px;
    color: var(--bs-primary);
}
