/*list chats*/
.light-chat-wrap, .light-chats_item {
    display: flex;
}
.light-chats {
    /*min-width: 300px;*/
}
.light-chats_item {
    width: 300px;
    background-color: #F7F8FA;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
}
.light-chats_item.active {
    background-color: #F5ECE2;
}
.light-chats_item.active:hover {
    cursor: default;
}
.light-chats_cover {
    width: 64px;
    height: 64px;
    margin-right: 15px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
#light-chat .light-chats_cover {
    width: 48px;
    height: 48px;
}
.light-chats_cover img {
    flex-grow: 1;
    object-fit: cover;
    border-radius: 10px;
}
.light-chats_item_left + .light-chats_item_right {
    margin-top: 4px;
}
.light-chats_item_title_wrap {
    display: flex;
    align-items: center;
    margin-bottom: 7px;
}
.light-chats_item_title {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    white-space: nowrap;
    display: inline-block;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    color: #000;
}
.light-chats_item_title:hover {
    color: #000;
}
.light-chats_item_last_message_wrap {
    display: flex;
    /*word-break: break-word;*/
}
.light-chats_item_last_message {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 16px;
}
.light-chats_item_last_message_time {
    margin-left: 7px;
    font-size: 12px;
}
.light-chats_item_count_messages {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 7px;
    background-color: #0772A0;
    width: 20px;
    height: 20px;
    color: #fff;
}

/*chat*/
#light-chat {
    width: 100%;
    margin-left: 40px;
    background-color: rgba(253, 247, 242, 1);
    border-radius: 10px;
    overflow: hidden;
}
.light-chat_header {
    display: flex;
    align-items: center;
    background-color: rgba(245, 236, 226, 1);
    text-align: center;
    padding: 15px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom: 1px solid #F3BA96;
}
.light-chat_title_wrap {
    display: flex;
    flex-direction: column;
    align-items: baseline;
}
.light-chat_title {
    font-size: 14px;
    font-weight: 700;
}
a.light-chat_list_users {
    font-size: 12px;
}
.light-chat_messages {
    display: flex;
    flex-direction: column;
    height: 500px;
    margin-top: auto;
    padding: 0 20px 0 20px;
}
.light-chat_message {
    display: flex;
    width: 100%;
    max-width: 420px;
    font-size: 12px;
}
.light-chat_message.own-message {
    margin-left: auto;
    flex-flow: row-reverse;
}
.light-chat_message + .light-chat_message {
    margin-top: 15px;
}

.light-chat_message:first-child {
    margin-top: auto;
}
.light-chat_message_user_avatar {
    line-height: 1;
    margin-top: auto;
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 15px;
}
.light-chat_message.own-message .light-chat_message_user_avatar {
    margin-left: 10px;
}
.light-chat_message:not(.own-message) .light-chat_message_user_avatar {
    margin-right: 10px;
}
.light-chat_message_user_avatar img {
    width: 100%!important;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}
.light-chat_message_text_wrap {
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px 20px;
}
.light-chat_message.own-message .light-chat_message_text_wrap {
    background-color: rgba(93, 206, 89, 0.1);
}
.light-chat_message_text_top {
    display: flex;
    width: 100%;
}
.light-chat_message_user_name {
    font-weight: 700;
    word-break: break-word;
    margin-bottom: 10px;
    width: calc(100% - 79px);
}
.light-chat_message_user_name + .message-input-text_reply {
    /*margin-top: 10px;*/
}
.light-chat_message_text_options{
    margin-left: auto;
    position: relative;
}

.light-chat_message_time {
    text-align: right;
    margin-left: auto;
}
.light-chat_message_text {
    word-break: break-word;
    line-height: 1.5;
}
.light-chat_message_reply, .light-chat_message_edit {
    position: absolute;
    right: 0;
    text-decoration: none;
    opacity: 0;
    color: #6D6D6D;
}
.light-chat_message_reply:hover,
.light-chat_message_edit:hover,
.light-chat_message_delete:hover .light-chat_message_delete_title {
    color: #0772A0;
}

.light-chat_message:hover .light-chat_message_reply,.light-chat_message:hover .light-chat_message_edit  {
    opacity: 1;
}
.message-input-block {
    display: flex;
    align-items: self-end;
    padding: 20px 0 10px;
}
.message-input-buttons {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.message-input-attach {
    margin-bottom: 10px;
    margin-right: 10px;
    width: 14px;
}
.message-input-attach:hover {
    cursor: pointer;
}
.message-input-text {
    width: 100%;
    background-color: #fff;
    padding: 10px 20px 10px 20px;
    border-radius: 5px;
    border: 0.5px solid #B1B1B1;
    min-height: 40px;
    font-size: 12px;
}
.message-input-text textarea {
    /*height: 40px;*/
    /*padding-right: 48px;*/
}
#message_text {
    width: 100%;
    word-break: break-word;
}
#message_text:empty:before {
    content: "Введите сообщение";
    color: #b1b1b1;
}
.message-input-send {
    height: 24px;
    line-height: 1;
}
.message-input-send:hover {
    cursor: pointer;
}
#message-form {
    margin-top: 10px;
    display: flex;
}
.message-input-emoji, .message-input-send {
    position: relative;
}
.message-input-emoji div, .message-input-send div {
    position: absolute;
    width: 14px;
    height: 14px;
    left: -57px;
    top: -16px;
}
.message-input-emoji img:hover {
    cursor: pointer
}
.message-input-send div {
    left: -35px;
    top: 0px;
}
.light-chat_message_bottom {
    display: flex;
    margin-top: 10px;
}
.light-chat_message_bottom .light-chat_message_delete {
    text-decoration: none;
    color: #6D6D6D;
    opacity: 0;
}
.light-chat_message_bottom .light-chat_message_delete img {
    width: 16px;
}
.light-chat_message_delete_title {
    margin-left: 7px;
}
.light-chat_message .light-chat_message_file_wrap:hover .light-chat_attach_delete,
.light-chat_message .light-chat_message_img_wrap:hover .light-chat_attach_delete,
.light-chat_message:hover .light-chat_message_bottom .light-chat_message_delete {
    opacity: 1;
}
.light-chat_message_attach {
    /*position: relative;*/
}
.light-chat_message_img_wrap {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-right: -18px;
    padding-right: 18px;
}
.light-chat_message .light-chat_message_attach .light-chat_attach_delete {
    position: absolute;
    bottom: -1px;
    right: 0;
    opacity: 0;
    color: #6D6D6D;
}
.light-chat_message .light-chat_message_attach .light-chat_attach_delete img {
    width: 14px;
}

/*reply, edit*/
.message-input-text_reply,.message-input-text_edit {
    background-color: rgba(93, 206, 89, 0.2);
    padding: 5px 10px 5px 7px;
    border-radius: 5px;
    margin-bottom: 5px;
}
.message-input-text_reply {
    border-left: 3px solid #5DCE5933;
}
.message-input-text_edit {
    padding-left: 10px;
}
.message-input-text_reply_title, .message-input-text_edit_title {
    font-weight: bold;
    margin-bottom: 5px;
    word-break: break-word;
    line-height: 18px;
}
.light-chat_message .message-input-text_reply {
    /*background-color: rgba(93, 206, 89, 0.2);*/
}
.light-chat_message .message-input-text_reply_text {
    overflow: clip;
    text-overflow: ellipsis;
}
.message-input-text_edit_text {
    white-space: nowrap;
    overflow: clip;
    text-overflow: ellipsis;
    line-height: 18px;
}
.message-input-text_reply, .message-input-text_edit {
    position: relative;
}
.message-input-text_reply_close, .message-input-text_edit_close {
    position: absolute;
    width: 15px;
    height: 15px;
    right: 5px;
    top: 5px;
}

/*attachments*/
.light-chat_message_file_wrap {
    padding-right: 18px;
    position: relative;
    margin-right: -18px;
}
.light-chat_message_file {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #0772A033;
    border-radius: 5px;
    padding: 5px 10px 5px 15px;
    color: #000;
    text-decoration: none;
}
.light-chat_message_file:hover {
    color: #000;
}
.light-chat_message_file:before {
    content: '';
    width: 14px;
    height: 14px;
    background: url('../images/attach_download_icon.svg') 100% 100% no-repeat;
    background-size: contain;
    margin-right: 7px;
}
.light-chat_message_file_wrap + audio {
    margin-top: 10px;
}
.light-chat_message_attach audio {
    width: 100%;
}
.light-chat_message_img img {
    border-radius: 5px;
}
.light-chat_message_img_wrap + .light-chat_message_img_wrap,
.light-chat_message_img_wrap + .light-chat_message_file_wrap,
.light-chat_message_text + .light-chat_message_attach {
    margin-top: 10px;
}

#chat-form {
    padding: 0 20px;
}
#chat-form .jq-file__browse {
    display: none;
}
#chat-form .jq-file__name {
    font-size: 12px;
}
#chat-form .jq-file:not(.changed) {
    opacity: 0;
    width: 1px;
}
#chat-form .jq-file {
    margin-bottom: 6px;
    display: inline-block;
    margin-left: 22px;
}
#chat-form .jq-file input {
    display: none;
}
#chat-form .msg-error + .jq-file {
    display: none;
}
#chat-form .msg-error {
    overflow: hidden;
    display: inline-block;
    color: #E04265;
    font-size: 12px;
    margin-left: 22px;
    margin-bottom: 6px;
}
.scrollbar {
    overflow-x: hidden;
    overflow-y: auto;
}
.scrollbar::-webkit-scrollbar {
    width: 3px;
}
.scrollbar::-webkit-scrollbar-track {
    background: none;
}
.scrollbar::-webkit-scrollbar-thumb {
    background-color: #B1B1B1;
}
/*common*/
.hidden {
    display: none;
}
.content-wrap {
    padding: 30px 0;
}

#chat_emoji_wrapper {
    z-index: 999999;
}
 #content #light_chat_page {
     position: static;
}
@media screen and (max-width: 767px) {
    .light-chat-wrap {
        flex-direction: column;
        align-items: center;
    }
    .light-chats {
        width: 100%;
        margin-bottom: 20px;
    }
    .light-chats_item {
        width: 100%;
    }
    #light-chat {
        margin-left: 0;
    }
}