/*Стили мессенджера*/

.chat__wrapper {
    margin: 0 !important;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    height: 480px;
}

.chat__right-side,
.chat__left-side {
    max-height: 100%;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.chat__left-side {
    border-right: 1px solid #eee;
}

.chat__receiver-user {
    position: relative;
    margin-right: -2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    height: 72px;
    padding: 12px 15px 12px 12px;
    background-color: #f8f8f8;
    box-shadow: 0px 3px 20px -7px rgb(34 60 80 / 40%);
    z-index: 9;
}

.chat__receiver-user-img {
    display: block;
    flex: 0 0 45px;
    margin-right: 10px;
    width: 45px;
    height: 45px;
    border-radius: 5px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


.chat__receiver-user-name {
    width: 100%;
    font-size: 16px;
    line-height: 19px;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    overflow: hidden;
}

.chat__receiver-user-ad {
    width: 100%;
    font-size: 13px;
    line-height: 16px;
    color: #777;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    border: 0 !important;
}

.scrollbar-main.chat__messages-scrollbar-main::-webkit-scrollbar {
    width: 4px;
}

.scrollbar-main.chat__recent-list-scrollbar-main::-webkit-scrollbar-thumb {
    border-right: 2px solid #fff;
}

.chat__message {
    margin-bottom: 10px;
}

.chat__message.chat__message-date {
    position: relative;
    margin: 30px 0 15px;
    text-align: center;
}

/* .chat__message-date::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #dfdfdf;
    transform: translateY(-50%);
} */
.chat__message-date-value {
    position: relative;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 19px;
    background-color: #f5f5f5;
    color: #333;
}

.chat__message-user {
    text-align: right;
}

.chat__message-user-text {
    position: relative;
    display: inline-block;
    padding: 10px 40px 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 19px;
    background-color: #eaf5fe;
    color: #333;
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat__message-receiver .chat__message-user-text {
    background-color: #e8f5f3;
    color: #333;
    max-width: 100%;
}

.chat__message-user .chat__message-user-text {
    max-width: 80%;
    text-align: left;
}

.chat__btn {
    transform: translateX(-7px);
}

.chat__btn-svg {
    fill: rgb(18, 137, 108);
    width: 30px;
    height: 38px;
    transition: opacity .3s ease-in-out;
}

.chat__btn .preload::before {
    background-size: contain;
}

.chat__message-user-text-wrapper {
    padding-left: 0 !important;
}

.chat__message-receiver-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: gray;
}

.chat__message-time {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 11px;
    line-height: 13px;
    color: #777;
}

.chat__messages {
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: 338px;
    overflow: auto;
    padding-top: 20px;
    /* padding-bottom: 40px; */
    padding-bottom: 0;
    flex-wrap: nowrap !important;
}

.field-textarea.chat__field-textarea {
    height: 40px;
    padding: 10px 19px 0;
    border: 0;
    border-radius: 20px;
}

.chat__recent-list {
    overflow: auto;
    max-height: 100%;
}

.chat__recent {
    position: relative;
    margin-bottom: 4px;
    opacity: 1;
    transition: opacity .3s ease-in-out;
}

.profile__menu-item-messages {
    position: relative;
}

.chat__recent--hidden {
    opacity: 0;
}



.chat__recent--notseen::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #EB001B;
}

.chat__recent-link {
    display: flex;
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .3s ease-in-out;
}

.chat__recent.selected .chat__recent-link {
    background-color: #ecf6fe;
    border-radius: 0;
}

.chat__recent-img {
    display: block;
    flex: 0 0 50px;
    margin-right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 5px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.chat__recent-info {
    display: flex;
    flex-wrap: wrap;
    max-width: calc(100% - 70px);
}

.chat__recent-name {
    width: 100%;
    font-size: 15px;
    line-height: 18px;
    font-weight: 300;
    color: #333;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    overflow: hidden;
    transform: translateY(-3px);
}

.chat__recent-car {
    width: 100%;
    margin-bottom: 3px;
    font-size: 12px;
    line-height: 16px;
    color: #777;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    overflow: hidden;
}

.chat__recent-date {
    width: 100%;
    font-size: 12px;
    line-height: 16px;
    color: #cdcdcd;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    overflow: hidden;
}

.chat__recent-title {
    font-size: 36px;
    line-height: 38px;
    margin-top: 0;
    margin-bottom: 30px;
}

.chat__recent-text {
    display: block;
}

.chat__form-wrapper {
    padding: 14px 15px;
    margin-right: -2px;
    background-color: #f5f5f5;
}

.chat__form .textarea-block {
    margin-left: -2px;
}



.chat__dialog-hide.tooltip {
    position: absolute;
}

.chat__dialog-hide {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
}

.chat__dialog-hide .tooltip__item-content {
    min-width: 160px;
}

.chat__dialog-hide-svg {
    fill: rgb(119 119 119 / 40%);
    width: 100%;
    height: 100%;
    transition: fill .3s ease-in-out;
}

.chat__form .field-textarea:focus {
    box-shadow: 0 0 12px rgb(40 121 201 / 32%);
}

.chat__empty {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.chat__empty-img {
    width: 330px;
    height: 150px;
    margin-left: auto;
    margin-right: auto;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../img/personal/chat_pic.png');
    margin-bottom: 20px;
}

.chat__empty-text {
    font-size: 16px;
    line-height: 20px;
    text-align: center;
}

.chat__dialogs-img {
    width: 386px;
    height: 173px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../img/personal/chat_pic.png');
    margin-bottom: 20px;
}

.chat__dialogs-text h2 {
    margin-top: 0;
    font-size: 32px;
    line-height: 40px;
    color: #2B2D33;
}

.chat__dialogs-text p {
    margin-top: 0;
    font-size: 16px;
    line-height: 22px;
}

.chat__back {
    display: none;
    align-items: center;
    width: 42px;
    height: 40px;
    font-size: 0;
    line-height: 0;
}

.chat__under {
    display: none;
    padding: 6px 15px;
    margin-right: -1px;
    background-color: #e7e7e7;
}
.chat-detail--show-soc .chat__under {
    display: block;
}
.chat__other-contacts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.chat-detail--show-soc .chat__messages {
    height: 288px;
}

.chat__btn-show-soc {
    display: flex;
    padding: 4px;
    border-radius: 3px;
    background-color: #eaeaea;
}
.chat__btn-show-soc-svg {
    width: 15px;
    height: 15px;
    transition: transform .3s ease-in-out;
    fill: #606266;
    top: 1px;
}
.chat-detail--show-soc .chat__btn-show-soc-svg {
    transform: rotate(180deg);
}

.chat__form {
    display: flex;
    align-items: center;
}
.chat__btn-show-soc-wrapper {
    padding-left: 0;
}

@media (min-width: 1200px) {
    .chat__recent-link:hover {
        background-color: #f8f8f8;
    }

    .chat__dialog-hide:hover .chat__dialog-hide-svg {
        fill: red;
    }

    .chat__btn:hover .chat__btn-svg {
        opacity: .8;
    }

    .chat__btn-show-soc {
        opacity: .6;
        transition: opacity 0.3s ease-in-out;
    }

    .chat__btn-show-soc:hover {
        opacity: 1;
    }

}

@media (max-width: 1399.98px) {}
@media (max-width: 1199.98px) {}
@media (max-width: 991.98px) {}
@media (max-width: 767.98px) {

    .chat__dialogs-img{
        max-width: 100%;
        background-size: contain;
    }
    .chat-detail {
        margin-top: 15px;
    }
    .chat-detail .chat__recent-title {
        display: none;
    }
    .chat__wrapper {
        border: 0;
    }
    .chat__recent{
        border-bottom: 1px solid #eee;
    }
    .chat__recent:last-child {
        border: 0;
    }
    .chat__recent-link {
        padding-left: 0;
        padding-right: 0;
    }
    .chat__left-side {
        border: 0;
    }

    .chat-detail .chat__left-side,
    .chat:not(.chat-detail) .chat__right-side {
        display: none;
    }
    .chat__right-side {
        border: 1px solid #eee;
    }

    .chat__back {
        display: flex;
    }

    .chat__right-side {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: 64px;
        width: auto;
        border: 0;
    }
    .chat__form-wrapper {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }
    .chat__messages {
        height: calc(100% - 155px);
    }

    .chat-detail--show-soc .chat__form-wrapper{
        bottom: 41px;
    }

    .chat-detail--show-soc .chat__messages {
        height: calc(100% - 195px);

    }
    .chat__under {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin-right: 0;
    }
    /* .chat__other-contacts-arr {
        display: none;
    }
    .chat__other-contacts {
        justify-content: space-between;
    } */

}


@media (max-width: 575.98px) {
    .chat__recent-title {
        font-size: 26px;
        line-height: 35px;
        margin-bottom: 10px;
    }
    .chat-detail .text-block__alert {
        font-size: 12px;
    }
    .chat-detail .text-block__alert-y {
        margin: 0 13px 0 10px;
    }
}