/*list chats*/
html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
.light-chat-wrap, .light-chats_item {
    display: flex;
}
.light-chat-wrap {
    background-color: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;

}
.light-chats {
    /*min-width: 300px;*/
    border-right: 1px solid #E5E7EB;
}
.light-chats_item {
    width: 300px;
    background-color: #F7F8FA;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #000;
}
.light-chats_item:hover {
    color: #000;
}
.light-chats_item.active {
    background-color: #F5ECE2;
}
.light-chats_item.active:hover {
    cursor: default;
}
.light-chats_cover {
    width: 56px;
    height: 56px;
    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;
    align-items: center;
    /*word-break: break-word;*/
}
.light-chats_item_last_message {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 24px;
    align-self: flex-start;
}
.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;
    min-width: 27px;
    min-height: 27px;
    color: #fff;
    font-size:70%
}
.light-chats_item_unread_mention {
    margin-left: 7px;
}
.light-chats_item_unread_mention img {
    min-width: 27px;
    min-height: 27px;
}
/*chat*/
#light-chat {
    width: 100%;
    background-color: #F7F8FA;
    overflow: hidden;
    border-radius: 10px;
}
.light-chat_header {
    display: flex;
    align-items: center;
    background-color: #fff;
    text-align: center;
    padding: 15px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom: 1px solid #E5E7EB;
    height: 89px;
}
.light-chat_title_wrap {
    display: flex;
    flex-direction: column;
    align-items: baseline;
}
.light-chat_title {
    font-size: 14px;
    font-weight: 700;
    line-height: 14px;
    margin-bottom: 5px;
    -webkit-font-smoothing: subpixel-antialiased;
    font-smooth: subpixel-antialiased;
}
.light-chat_members_title {
    line-height: 12px;
    -webkit-font-smoothing: subpixel-antialiased;
    font-smooth: subpixel-antialiased;
}
a.light-chat_list_users {
    font-size: 12px;
    color: #38394c;
    text-decoration: none;
}
a.light-chat_list_users:hover {
    text-decoration: underline;
}
.light-chat_messages {
    display: flex;
    flex-direction: column;
    height: 500px;
    margin-top: auto;
    padding: 20px 20px 30px 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: #5DCE591A;
}
.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, .light-chat_message_pin_title:hover {
    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 20px;
}
.message-input-buttons {
    display: flex;
    align-items: center;
    margin-bottom: 13px;
}
.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;
    flex-grow: 1;
}
.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 {
    margin-left: 10px;
    margin-right: 13px;
    margin-bottom: 3px;
}
.message-input-send {
}
.message-input-emoji div {
    width: 14px;
    height: 14px;
}
.message-input-send div {
    width: 34px;
    height: 34px;
}
.message-input-emoji img:hover {
    cursor: pointer;
}
.message-input-send div {

}
.light-chat_message_bottom {
    display: flex;
    margin-top: 10px;
}
.light-chat_message_bottom .light-chat_message_delete, .light-chat_message_bottom .light-chat_message_pin {
    text-decoration: none;
    color: #6D6D6D;
    opacity: 0;
}
.light-chat_message_pin {
    opacity: 0;
    margin-left: 14px;
}
.light-chat_message_bottom .light-chat_message_delete img {
    width: 16px;
}
.light-chat_message_delete_title, .light-chat_message_pin_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,
.light-chat_message:hover .light-chat_message_bottom .light-chat_message_pin {
    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, #chat-locked {
    padding: 0 20px;
    background-color: #fff;
    border-top: 1px solid #E5E7EB;
}
#chat-form .jq-file__browse {
    display: none;
}
#chat-form .jq-file__name {
    font-size: 12px;
}
#chat-form .jq-file {
    margin-bottom: 6px;
    display: inline-block;
    margin-left: 22px;
}
#chat-form .jq-file:not(.changed) {
    opacity: 0;
    width: 1px;
    display: none;
}
#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;
    }
}
.light-chat_message_user_name {
    display: flex;
    align-items: center;
}
.light-chat_message_user_name_text {
    margin-right: 8px;
}
.light-chat_message_user_name_role {
    background-color: #0772A0;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 12px;
    color: #fff;
    font-weight: normal;
    white-space: nowrap;
}
.light-chats-header {
    padding: 20px 15px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 30px;
    height: 72px;
}
.light-chats-header-text {
    font-size: 24px;
}
.light-chat-container {
    padding: 0 15px;
}
.light-chat_title_buttons {
    margin-left: auto;
}
#chat-locked {
    padding: 20px 10px;
}
#chat-locked .chat_locked_text {
    width: 100%;
    font-size: 12px;
    text-align: center;
    background-color: #F3F4F6;
    border-radius: 10px;
    padding: 10px 0;
}
.light-chat-pinned-block, .light-chat-mentions-block {
    background-color: #FAF3CD;
    border-bottom: 1px solid #E5E7EB;
    height: 74px;
    padding: 15px;
}
.light-chat-mentions-block {
    background-color: #0772A01A;
}
.light-chat-pinned-row {
    display: flex;
    align-items: center;
}
.light-chat-pinned-icon {
    margin-right: 14px;
    margin-left: 9px;
}
.light-chat-pinned-content, .light-chat-mentions-content {
    max-width: 80%;
}
.light-chat-pinned-title, .light-chat-mentions-title {
    color: #D6A76D;
    font-weight: bold;
    font-size: 14px;
}
.light-chat-mentions-title {
    color: #0772A0;
}
.light-chat-pinned-msg, .light-chat-mentions-msg {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-size: 14px;
}
.light-chat-mentions-msg-username, .light-chat-pinned-msg-username {
    color: #373A4C;
}
.light-chat-pinned-buttons, .light-chat-mentions-buttons {
    display: flex;
    margin-left: auto;
    align-items: center;
}
.light-chat-mentions-count {
    line-height: 20px;
    letter-spacing: 2px;
    margin-right: 10px;
    font-size: 14px;
}
.light-chat-pinned-button {
    margin-right: 10px;
    transition: 0.2s ease-out;
    cursor: pointer;
}
.light-chat-pinned-button:hover {
    transform: scale(0.90);
}
@media screen and (max-width: 600px) {
    .light-chat-pinned-content {
        max-width: 70%;
    }
}
@media screen and (max-width: 500px) {
    .light-chat-pinned-block {
        font-size: 12px;
        height: auto;
    }
}
@media screen and (max-width: 420px) {
    .light-chat-pinned-block {
        padding: 5px;
    }
    .light-chat-pinned-icon {
        margin: 0 4px;
    }
}
.light-chat_message {
    position: relative;
}
/* Псевдоэлемент для анимации */
.highlight-pinned::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -500px;
    width: 10000%;
    height: 110%;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.07);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.065);
    animation: pinnedFlash 2s ease-in-out infinite;
    pointer-events: none; /* не мешает кликам */
    z-index: 1;
}

@keyframes pinnedFlash {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


.mention-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 200px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    user-select: none;
    font-size: 12px;
    max-width: 300px;
}
.mention-item, .mention-empty {
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    height: 40px;
    align-items: center;
}
.mention-avatar {
    margin-right: 10px;
}
.mention-avatar img {
    width: 30px;
    min-width: 30px;
}
.mention-item:hover {
    background: #f8f8f8;
}
.mention-item:focus {
    background: #f2f2f2;
    outline: none; /* Убираем стандартную рамку фокуса */
}
.mention-item .mention-username {
    white-space: nowrap;
}
.mention {
    color: #0772A0; /* Синий текст */
    cursor: pointer;
}
.mention-missing {
    color: #a0073d;
}
.mention:before {
    content: "@";
}
.light-chat-mentions-msg-text .mention, .light-chats .mention, .light-chat-pinned-msg-text .mention {
    padding: 0;
    margin-right: 0;
    border: none;
    font-weight: bold;
}
#light-chat-info {
    min-width: 260px;
    border-left: 1px solid #E5E7EB;
}
#light-chat-info .light-chats-header {
    margin-bottom: 5px;
    padding: 15px;
}
#light-chat-info .light-chats-header-text {
    font-size: 14px;
    font-weight: bold;
    line-height: 40px;
}
.chat-info-tabs-wrapper {
    padding: 15px 15px 10px 15px;
}
.chat-info-tabs-list {
    background-color: #F3F5F7;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
}
.chat-info-tabs-list .chat-info-tab-btn:only-child {
    width: 100%;
    justify-content: center;
}
.chat-info-tab-btn {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: 0.2s;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 15px;
}
.chat-info-tab-btn:hover {
    color: #4c4c4c;
}
.chat-info-tab-btn.active {
    color: #000;
    background-color: #F8FCFC;
    border-radius: 5px;
}
.chat-info-tab-btn img {
    margin-right: 2px;
    width: 16px;
    height: 16px;
}
.chat-activity-log {
    padding: 10px;
    border-bottom: 1px solid #E5E7EB;
    display: flex; /* Используем flexbox для выравнивания */
    align-items: flex-start; /* Выравнивание по вертикали */
}
.chat-activity-log::before {
    content: " "; /* Юникод для маркера */
    margin-right: 8px;
    display: inline-block;
    line-height: 1;
    width: 5px;
    height: 5px;
    background-color: #0772A0;
    border-radius: 10px;
    position: relative;
    top: 5px;
}
.chat-activity-log:last-child {
    border-bottom: none;
}
.chat-info-tab-block {
    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 590px;
}
.activity-text {
    word-break: break-word;
    margin-bottom: 3px;
    font-size: 12px;
}
.activity-text b {
    display: block;
    margin-bottom: 3px;
}
.activity-time {
    word-break: break-word;
    font-size: 10px;
    color: #2e2e2e;
}
.chat-users-list-roles {
    display: flex;
    margin-top: 5px;
    margin-bottom: 15px;
}
.chat-users-list-role-btn {
    padding: 5px 15px;
    background-color: #F7F8FA;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    margin-right: 10px;
    font-size: 10px;
    -webkit-font-smoothing: subpixel-antialiased;
}
.chat-users-list-role-btn:hover {
    color: #000;
}
.chat-users-list-role-btn.active {
    color: #fff;
    background-color: #0772A0;
}
.chat-user-wrap {
    display: flex;
    align-items: center;
    min-height: 35px;
    overflow: hidden;
    margin-bottom: 15px;
}
.chat-user-wrap .chat-user-avatar {
    max-height: 32px;
    max-width: 32px;
    margin-right: 10px;
}
.chat-user-wrap .chat-user-name {
    line-height: 14px;
    margin-bottom: 5px;
    font-size: 12px;
}
.chat-user-wrap .chat-user-role {
    background-color: #0772A0;
    color: #fff;
    padding: 2px 10px;
    font-size: 10px;
    line-height: 14px;
    border-radius: 10px;
    -webkit-font-smoothing: subpixel-antialiased;
}
.dyn-btn {
    cursor: pointer;
}
.light-chats-sub-group {
    display: flex;
    align-items: center;
    border-top: 1px solid #E5E7EB;
    padding: 30px 15px 15px 15px;
}
.light-chats-sub-group img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}
.light-chats-sub-group-text {
    font-size: 24px;
    line-height: 32px;
}
.chat-user-name-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}