.chats_menu {
    position: fixed;
    width: 300px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: 10px;
    border-radius: 0 15px 15px 0;
    z-index: 5;
    transition: all 0.3s ease;
}

.chat, .chat_noHover {
    width: calc(100% - 20px);
    height: 70px !important;
    overflow-x: visible;
    display: flex;
    align-items: center;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    margin-block: 5px;
}

.chat_noHover {
    cursor: auto;
}

.chat:hover, .chat.active {
    box-shadow: 0 10px 20px rgba(123, 233, 164, 0.3);
    background-color: rgb(123, 233, 164);
    outline: 2px solid rgb(123, 233, 164);
    color: #000;
}

.talker {
    width: 145%;
    height: 145%;
    transform: translate(-15%, -15%);
    object-fit: cover;
    border-radius: 50%;
}

.avatar_container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    outline: 2px solid rgba(0, 0, 0, 0.3);
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    flex-shrink: 0;
    position: relative;
}

.avatar_container_mid {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    outline: 2px solid rgba(0, 0, 0, 0.3);
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    flex-shrink: 0;
    position: relative;
}

.avatar-upload-container {
    position: relative;
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.avatar-upload-container:hover .avatar_container_mid {
    outline-color: rgb(123, 233, 164);
    box-shadow: 0 5px 20px rgba(123, 233, 164, 0.4);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: rgb(123, 233, 164);
}

.avatar-upload-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay span {
    font-size: 12px;
    font-weight: 600;
}

.avatar_container_small {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    outline: 2px solid rgba(0, 0, 0, 0.3);
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    flex-shrink: 0;
    position: relative;
}

.avatar_container_big {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    outline: 2px solid rgba(0, 0, 0, 0.3);
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    flex-shrink: 0;
    position: relative;
}

.talker_name, .last_messege {
    overflow: hidden;
    max-width: calc(100% - 10px);
    height: 18px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chat_info {
    width: calc(100% - 50px);
    position: relative;
    left: 5px;
}

.no_chats {
    position: absolute;
    text-align: center;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 19px;
}

.btn {
    display: flex;
    align-items: center;
}

.chat_content {
    position: fixed;
    right: -100%;
    top: 0;
    width: calc(100% - 300px);
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 15px 0 0 15px;
    transition: right 0.3s ease, width 0.3s ease;
    overflow-y: hidden;
    z-index: 10;
    transform: translateZ(0);
}

.chat_content.active {
    right: -10px;
}

.chat_content.hide {
    width: calc(100% - 90px);
}

.chat_content.hide.active {
    right: -10px;
}

.hide_chats .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.hide_chats.hide .icon {
    top: 0;
    left: 0;
    margin-top: calc(50% - 9px);
    margin-left: calc(50% - 9px);
    transform: rotate(180deg);
}

.hide_chats.hide {
    position: absolute;
    left: 50%;
    transform: translate(-50%);
}

.chats_menu.hide {
    width: 90px;
}

.chats_menu.none {
    position: relative;
    transition: all 0.3s ease;
    transform: translate(-100%);
}

.user_info {
    width: 100%
}

.user_info .avatar_container {
    position: absolute;
    width: 50px;
    height: 50px;
}

.user_info_extra {
    color: #fff;
    margin-left: 5px;
    font-size: 10px;
    margin-left: 55px;
    width: calc(100% - 100px);
}

.user_info_extra.hide {
    display: none;
}

.chats {
    width: calc(100% + 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    left: -10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 160px);
}

.message {
    background: rgba(0, 0, 0, 0.2);
    outline: 2px solid rgba(0, 0, 0, 0.3);
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin-block: 10px;
    display: flex;
    align-items: start;
    color: #fff;
    width: fit-content;
    max-width: 70%;
    min-width: 200px;
    position: relative;
}

.message_content {
    margin-left: 10px;
}

.message_time {
    color: #999;
    position: absolute;
    right: 10px;
    bottom: 10px;
}

.upper_chat {
    color: #fff;
    display: flex;
    align-items: center;
    overflow-y: visible;
    padding: 20px 0;
    margin: 0;
    position: relative;
    background: transparent;
    position: fixed;
    top: 10px;
    left: 10px;
    width: calc(100% - 30px);
}

.messages {
    margin-top: 70px;
    padding: 10px;
    height: calc(100vh - 205px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

.close_chat {
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    margin-inline: 10px;
}

.close_chat .icon {
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    margin: 0;
}

.send_message_field {
    color: #fff;
    display: flex;
    align-items: center;
    overflow-y: visible;
    padding: 20px 0;
    margin: 0;
    position: relative;
    background: transparent;
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 30px);
    height: 80px;
}

.send_message_field.big {
    height: 180px;
    flex-direction: column;
    align-items: start;
}

.send_message_field.big form {
    position: absolute;
    bottom: 10px;
}

.images_preview {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    position: absolute;
    bottom: 70px;
    max-height: 100px;
}

.image_preview_container {
    background-color: rgba(0, 0, 0, 0.2);
    width: 70px;
    height: 70px;
    margin: 5px;
    border-radius: 15px;
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

.image_preview_container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.del_img_btn {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 1;
}

.send_message_field form {
    display: flex;
    align-items: center;
    flex-direction: row;
    position: absolute;
    width: 100%;
    padding: 10px;
}

.send_message_input {
    background-color: rgba(90, 90, 90, 0.2);
    outline: 2px solid rgba(90, 90, 90, 0.3);
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    border-radius: 25px;
    margin-right: 10px;
    width: calc(100% - 110px);
}

.send_message_input:focus {
    box-shadow: 0 10px 20px rgba(123, 233, 164, 0.3);
    background-color: rgb(123, 233, 164);
    outline: 2px solid rgb(123, 233, 164);
    color: #000;
}

.send_message_field form .btn {
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.send_message_field form .btn:hover {
    box-shadow: 0 10px 20px rgba(123, 233, 164, 0.3);
    background-color: rgb(123, 233, 164);
    outline: 2px solid rgb(123, 233, 164);
    color: #000;
}

.send_message_field form .icon {
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    margin: 0;
}

.settings {
    display: block;
}

.settings.hide {
    display: none;
}

.settings:hover .icon {
    left: 0;
    top: 0;
    margin-left: calc(50% - 9px);
    margin-top: calc(50% - 9px);
    transform: rotate(180deg);
}

.chat {
    transform: translateX(-50px);
    opacity: 0;
    animation: show-in 0.3s ease forwards;
}

.chat.no-animation {
    animation: none;
    transform: translateX(0);
    opacity: 1;
}


@keyframes show-in {
    to {
        transform: translateX(0);
        opacity: 100%;
    }    
}

.upper_chats_menu {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.upper_chats_menu .small {
    margin-inline: 3px;
}

.upper_chats_menu .small:nth-child(2) {
    margin: 0;
}

.search_chats {
    display: block;
}

.search_chats.hide {
    display: none;
}

.founded_element {
    width: 300px;
    padding: 10px;
    margin: 10px 0 10px 5px;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal_data {
    display: block;
    position: absolute;
    top: 0;
    left: calc(100% + 40px);
    width: calc(100% - 40px);
    z-index: 100;
    transition: left 0.3s ease;
}

.modal_data.show_modal_data {
    left: calc(100% + 40px);
}

.modal-content {
    position: relative;
    left: 0;
    transition: left 0.3s ease;
    overflow-x: visible;
}

.modal-content.show_modal_data {
    left: calc(-100% - 20px);
}

.message_images {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
}

.message_image_container {
    width: 400px;
    height: 400px;
    max-width: 800px;
    max-height: 800px;
    margin: 0 10px 20px 0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.message_image_container img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
}

.fullscreen_image_view {
    display: none;
}

.fullscreen_image_view.active {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: block;
}

.fullscreen_image_view img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    max-width: 80%;
    max-height: 80%;
}

.fullscreen_image_view .fiv_buttons {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    padding: 10px;
}

.context_menu {
    display: none;
    transition: none !important;
}

.context_menu.active {
    position: fixed;
    min-width: 150px;
    height: auto;
    display: block;
    z-index: 2000;
    transition: none !important;
    padding: 10px 5px;
}

.context_menu .btn {
    margin-block: 5px;
    padding: 5px 10px;
}

@keyframes showTop {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 100%;
    }
}

@keyframes showBottom {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 100%;
    }
}

.connection_status {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.connection_status.active {
    display: flex;
    align-items: center;
}

.connection_status p {
    color: #fff;
    margin: 0 0 0 10px;
}