.modal.messages {
    display: block;
    width: auto;
    right: -522px;
    left: auto;
    position: fixed;
    overflow: visible;
    transition: right 0.6s ease-in-out;
}

.modal.messages.messages-open {
    right: 0;
}

.messages .modal-dialog-scrollable {
    width: 522px;
    max-width: 522px;
}

.messages .modal-dialog-scrollable .modal-content {
    height: 100%;
    position: relative;
    left: 0;
    overflow: hidden;
}

/*.messages .modal-dialog .modal-content::before {*/
/*    content: "";*/
/*    display: block;*/
/*    width: 1px;*/
/*    height: 100%;*/
/*    background-color: #5d87ff;*/
/*}*/

.messages .prev-detail-btn {
    display: flex;
    color: #5d87ff;
    background-color: #ffffff;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
    box-shadow: -15px 0px 15px rgba(0, 0, 0, 0.08);
    left: auto;
    right: 522px;
    z-index: 1;
    border: 1px solid #5d87ff;
    border-right: 0;
    position: absolute;
}

.messages .prev-detail-btn i {
    margin: auto;
    /*transform: rotateY(180deg);*/
    /*transform-origin: center;*/
}

.message-icon {
    text-align: center;
    cursor: pointer;
}

table.dataTable.no-footer tbody tr td.message-icon i {
    width: 1.3rem;
    height: 1.3rem;
    font-size: 1.3rem;
    vertical-align: middle;
    color: #5d87ff;
}

.messages .textarea-wrapper {
    width: calc(100% - 100px);
}

.messages textarea {
    resize: none;
}

.messages .downloadBtn {
    align-items: center;
    display: flex;
    line-height: 1rem;
    border: 1px solid #fff;
}

.messages .downloadBtn i {
    font-size: 1.2rem;
    margin-left: 0.2rem;
}

.messages #submitBtn {
    width: 100px;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.messages #submitBtn i {
    font-size: 1.4rem;
    transform: rotate(45deg);
    /*margin-bottom: 6px;*/
}

.messages .messages-input-wrapper {
    margin: 0;
    width: 100%;
}

.messages .modal-header {
    background-color: #5d87ff;
}

.messages .modal-header .modal-title {
    color: #ffffff;
    max-width: calc(100% - 10rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
}

.messages .select-wrapper {
    padding: 0px;
    box-sizing: border-box;
    border-right: 1px solid #ebf1f6;
    flex-direction: row;
    flex-wrap: nowrap;
    display: flex;
    width: 100%;
}

.messages .form-control.select2 {
    border: none;
    /*background: #f8faff;*/
    background-color: #ffffff;
    height: 100% !important;
}

.messages .standardBtn {
    border-bottom: 1px solid #ebf1f6;
    width: calc(100% - 120px);
    border-radius: 0;
    background-color: #ffffff;
}

.messages .standardBtn:first-of-type {
    width: 120px;
    border-right: 1px solid #ebf1f6;
    box-sizing: border-box;
}

.messages .modal-body {
    background-color: #f9fbff;
    padding-bottom: 0;
    padding-top: 0;
}

.messages .modal-footer form {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
}

.messages .msg-bubble-list {
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    box-sizing: border-box;
    padding-bottom: 1rem;
    padding-top: 1rem;
    margin-bottom: 0;
}

.messages .msg-bubble-list .msg-bubble {
    display: flex;
    box-sizing: border-box;
    height: auto;
    position: relative;
    margin-bottom: 1rem;
    max-width: calc(0.8 * 520px);
    flex-direction: column;
    margin-right: auto;
}

.messages .msg-bubble-list .msg-bubble:last-of-type {
    margin-bottom: 0;
}


.messages .msg-bubble-list .msg-bubble.my .msg-container,
.messages .msg-bubble-list .msg-bubble .msg-container {
    display: block;
    width: 100%;
    background-color: #eeeeee;
    padding: 1rem;
    box-sizing: border-box;
    height: auto;
    word-break: keep-all;
    white-space: wrap;
    border-radius: 1rem;
    overflow: hidden;
    border: 3px solid transparent;
}

.messages .msg-bubble-list .msg-bubble .msg-container.type1 {
    background-color: #ffe1e1;
}

.messages .msg-container.type1 .target-user-info {
    border-bottom-color: #f1b5b5;
}

.messages .msg-bubble-list .msg-bubble .msg-container.type2 {
    background-color: #e6d7ff;
}

.messages .msg-container.type2 .target-user-info {
    border-bottom-color: #c7a7ff;
}

.messages .msg-bubble-list .msg-bubble .msg-container.type3 {
    background-color: #bff3ee;
}

.messages .msg-container.type3 .target-user-info {
    border-bottom-color: #59b9b0;
}

.messages .msg-bubble-list .msg-bubble .msg-container .msg-content {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    word-wrap: break-word;
}

.messages .msg-bubble-list .msg-bubble .msg-container .msg-content a {
    display: block;
    width: 100%;
}

.messages .msg-bubble-list .msg-bubble.my {
    margin-left: auto;
    margin-right: 0;
}

.messages .msg-bubble-list .msg-bubble.my .msg-container {
    background-color: #d9e7ff;
}

.messages .msg-bubble-list .msg-bubble .msg-container .msg-info-wrapper {
    margin-bottom: 0.4rem;
}

.messages .date-info-wrapper {
    font-size: 0.8rem;
    color: #92a2be;
}

.messages .chat-info-wrapper {
    background-color: #d9e7ff;
    padding: 8px 16px;
    box-sizing: border-box;
    display: none;
    word-break: keep-all;
}

.messages .user-info-wrapper {
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.messages .msg-container .target-user-info,
.messages .my .msg-container .target-user-info {
    /*color: #5d87ff;*/
    border-bottom: 1px solid #cedaef;
    padding-bottom: 8px;
    font-size: 0.8rem;

}

.messages .info-btn-wrapper {
    opacity: 0;
    margin-bottom: 2px;
    transition: opacity 0.3s ease-in-out;
    flex-direction: row;
    display: flex;
}

.messages .info-btn-wrapper .btn {
    padding: 0px 3px;
    line-height: 18px;
}

.messages .info-btn-wrapper .btn:hover {
    background: #7eabfb;
    color: #fff;
}

.messages .msg-bubble:hover .info-btn-wrapper {
    opacity: 1;
}

.messages .info-btn-wrapper .btn i {
    font-size: 18px;
}

.messages .info-btn-wrapper .cancel-reply-btn {
    display: none;
}

.messages .this-replying-message .info-btn-wrapper .cancel-reply-btn {
    display: block;
}

.messages .this-replying-message .info-btn-wrapper .cancel-reply-btn:hover {
    background-color: transparent;
}

.messages .this-replying-message .info-btn-wrapper .reply {
    display: none;
}

.messages .info-btn-wrapper .cancel-reply-btn i {
    color: #ffb256;
}

table.dataTable.no-footer tbody tr.message-row td {
    background-color: #defeff;
}

.messages .reply-info-wrapper {
    padding: 0px;
    text-align: left;
    margin: 0.8rem 0;
}

.messages .reply-item-container {
    background-color: #e4e4e4;
    padding: 1rem;
    box-sizing: border-box;
    border-radius: 0.8rem;
    box-shadow: 2px 4px 3px 0px rgba(0, 0, 0, 0.04);
}

.messages .reply-item-container.type1 {
    background-color: #fccece;
}

.messages .reply-item-container.type2 {
    background-color: #d8c0ff;
}

.messages .reply-item-container.type3 {
    background-color: #9fe3dd;
}

.messages .my .reply-item-container {
    background-color: #c5d7f7;
}

.messages .reply-user-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #7a92bc;
    margin-bottom: 0.4rem;
}

.messages .type1 .reply-user-info {
    color: rgba(0, 0, 0, 0.52);
}

.messages .reply-content {
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.messages .msg-bubble-list .msg-bubble [name*=focusMsg] {
    width: 0;
    height: 0;

}

.messages .reply-user-name {
    margin-right: 0.6rem;
}

.messages .msg-bubble-list .msg-bubble [name*=focusMsg]:focus + .msg-container {
    animation: blinkBorder ease-in-out 3s;
    /*border: 1px solid #ff5d5d;*/
}

.messages .msg-bubble-list .msg-bubble.this-replying-message .msg-container {
    /*position: absolute;*/
    /*padding: 0.4rem 0.6rem;*/
    /*box-sizing: border-box;*/
    /*display: block;*/
    /*background-color: lightblue;*/
    /*border-radius: 0.4rem;*/
    /*left: -4rem;*/
    border: 3px solid #ffb256;
}

@keyframes blinkBorder {
    0% {
        border: 3px solid #ffb256;
    }
    70% {
        border: 3px solid #ffb256;
    }
    100% {
        border: 3px solid transparent;
    }
}