﻿
.floatWhatsapp {
    position: fixed;
    height: 60px;
    bottom: 40px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    z-index: 100;
    align-items: center;
    display: flex;
    justify-content: center;
}

    .floatWhatsapp:hover {
        color: #fff !important;
    }

    .floatWhatsapp:active {
        color: #fff !important;
    }

    .floatWhatsapp:focus {
        color: #fff !important;
    }

.my-float-Whatsapp {
    margin: 7px 0 0 3px;
    font-size: 1.5em;
}

.me {
    background-image: url('../images/myWhatsapp/carrinho_gpt2.png');
    background-size: cover;
}



.contatos {
    background: #DEDBDF;
    border-radius: 16px;
    height: 60px;
    overflow: hidden;
    position: relative;
    width: 60px;
    -webkit-tap-highlight-color: transparent;
    transition: width 300ms cubic-bezier(0.4, 0.0, 0.2, 1), height 300ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0.0, 0.2, 1), border-radius 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

    .contatos:not(.expand) {
        cursor: pointer;
    }

        .contatos:not(.expand):hover {
            background: #C2C0C2;
        }

.from {
    position: absolute;
    transition: opacity 200ms 100ms cubic-bezier(0.0, 0.0, 0.2, 1);
}

.from-contents {
    display: flex;
    flex-direction: row;
    transform-origin: 0 0;
    transition: transform 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.to {
    opacity: 0;
    position: absolute;
    transition: opacity 100ms cubic-bezier(0.4, 0.0, 1, 1);
}

.to-contents {
    transform: scale(1);
    transform-origin: 0 0;
    transition: transform 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.avatar {
    border-radius: 12px;
    height: 44px;
    left: 6px;
    position: relative;
    top: 0px;
    width: 44px;
}

.name {
    font-size: 14px;
    line-height: 32px;
    margin-left: 10px;
}

.myWhatsapp-header {
    background: #009385;
    display: flex;
    flex-direction: row;
    height: 70px;
    transition: height 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 330px;
}

.avatar-large {
    height: 44px;
    margin-left: 12px;
    position: relative;
    top: 12px;
    width: 44px;
}

.name-large {
    color: #efd8ef;
    font-size: 18px;
    line-height: 70px;
    margin-left: 20px;
}

.x-touch {
    align-items: center;
    align-self: center;
    cursor: pointer;
    display: flex;
    height: 50px;
    justify-content: center;
    margin-left: auto;
    width: 50px;
}

.contatos.expand {
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.10), 0 6px 6px rgba(0,0,0,0.16);
    height: 820px;
    width: 325px;
}

.expand .from {
    opacity: 0;
    transition: opacity 100ms cubic-bezier(0.4, 0.0, 1, 1);
}

.expand .from-contents {
    transform: scale(1.91);
}

.expand .to {
    opacity: 1;
    transition: opacity 200ms 100ms cubic-bezier(0.0, 0.0, 0.2, 1);
}

.expand .to-contents {
    transform: scale(1);
}


/* Variables */
:root {
    --background-green: #009688;
    --background-beige: #d7dbd6;
    --sidebar-header: #ededed;
    --notifications-text-color: rgba(48, 48, 48, 0.96);
    --notifications-link-color: rgba(48, 48, 48, 0.85);
    --notifications-background-color: #9de1fe;
    --search-bar-bg: #f6f6f6;
    --white: #ffffff;
    --text-gray: #919191;
    --chat-border: #ededed;
    --whatsapp-green: #3ccc2f;
    --scrollbar-color: #cccccc;
    --chat-window-scrollbar-color: #bab3ae;
    --box-shadow-color: #d5d5d5;
    --chat-hover-color: #f5f5f5;
    --chat-active-color: #ebebeb;
    --chat-window-beige: #e5ddd5;
    --sender-message-green: #dcf8c6;
    --type-message-bar: #f0f0f0;
}

/* Chats */
.chats {
    height: 350px;
    overflow-y: scroll;
    overflow-x: hidden;
    font-size: 11px;
}

    .chats::-webkit-scrollbar {
        width: 0.7rem;
        height: 3rem;
    }

    .chats::-webkit-scrollbar-thumb {
        background-color: var(--scrollbar-color);
    }

.chat {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 5px 0 0 10px;
    cursor: pointer;
}

    .chat:hover {
        background: var(--chat-hover-color);
    }

        .chat:hover .chat-options {
            display: initial;
        }

.active-chat {
    background: var(--chat-active-color) !important;
}

.chat-left img {
    /*width: 5rem;*/
    height: 5rem;
    border-radius: 50%;
}

.chat-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    padding-right: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--chat-border);
}

.chat-right-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.contact-name {
    font-size: 1.7rem;
    color: black
}

.chat-message,
.chat-message-typing,
.chat-message-group {
    font-size: 1.5rem;
}

.chat-message,
.chat-message-group {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 28rem;
}

.chat-message {
    color: var(--text-gray);
}

.chat-message-group {
    font-weight: 500;
    color: inherit;
}

.chat-message-typing {
    color: var(--whatsapp-green);
    font-weight: 500;
}

.chat-date {
    font-size: 1.2rem;
    color: var(--text-gray);
}

.chat-right-bottom {
    display: flex;
}

.chat-right-bottom-left {
    display: flex;
    align-items: flex-end;
    flex: 1;
}

.chat-right-bottom-right {
    display: flex;
    align-items: center;
}

.unread-messages-number {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background: var(--whatsapp-green);
    color: var(--white);
    font-weight: 500;
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
}

.chat-options {
    display: none;
    margin-left: 0.5rem;
}

    .chat-options img {
        vertical-align: middle;
    }

.single-check-mark,
.double-check-mark {
    margin-right: 0.2rem;
}

.single-check-mark {
    width: 1.4rem;
}

.double-check-mark {
    width: 2rem;
}

.image-icon,
.microphone-icon {
    margin-right: 0.3rem;
}


/* Sidebar search chat */
.search-chat {
    /*background: var(--search-bar-bg);*/
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.search-bar {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid var(--chat-border);
}

    .search-bar > img {
        width: 2.8rem;
        background: var(--white);
        border-top-left-radius: 2rem;
        border-bottom-left-radius: 2rem;
        padding-left: 1rem;
    }

    .search-bar input {
        outline: none;
        border: none;
        /*padding: 1rem 1rem 1rem 2rem;*/
        flex: 1;
        border-top-right-radius: 2rem;
        border-bottom-right-radius: 2rem;
        font-family: "Segoe UI";
    }

        .search-bar input::placeholder {
            color: var(--text-gray);
        }



/******
            * MAIN *
            *******/

.chat-main {
    grid-column: 2 / -1;
    background: var(--chat-window-beige);
    position: relative;
}

/* Main chat window header */
.chat-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 6rem;
    padding: 1rem 10px;
    background: var(--sidebar-header);
    cursor: pointer;
}

.chat-window-header-left {
    display: flex;
    align-items: center;
}

.contact-name-and-status-container {
    display: flex;
    flex-direction: column;
}

.chat-window-contact-image {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 1rem;
}

.chat-window-contact-name {
    font-size: 1.7rem;
    color: black;
    align-self: start;
}

.chat-window-contact-status {
    color: var(--text-gray);
    font-size: 1.3rem;
}

.chat-window-menu-icon {
    margin-left: 2rem;
}

    .chat-window-menu-icon:active {
        background: var(--box-shadow-color);
        border-radius: 50%;
        box-shadow: 0 0 1px 8px var(--box-shadow-color);
    }

/* Chat window */

.chat-window {
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 285px;
    overflow: scroll;
    overflow-x: hidden;
    background: url('../images/myWhatsapp/bg-chat.png');
    background-repeat: repeat;
}

    .chat-window::-webkit-scrollbar {
        width: 0.7rem;
        height: 3rem;
    }

    .chat-window::-webkit-scrollbar-track {
        background: var(--chat-window-beige);
    }

    .chat-window::-webkit-scrollbar-thumb {
        background: var(--chat-window-scrollbar-color);
    }

.sender,
.receiver {
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    margin-bottom: 0.3rem;
    position: relative;
}

.sender {
    background: var(--sender-message-green);
    align-self: flex-end;
}

.receiver {
    background: var(--white);
    align-self: flex-start;
    font-size: 1.4rem;
    color: black;
}

.sender-message,
.receiver-message {
    font-size: 1.4rem;
    margin-right: 5px;
    color: black;
}

.message-time,
.audio-message-length {
    color: var(--text-gray);
    font-size: 1.08rem;
    margin-left: 5px;
}

.message-status img {
    vertical-align: bottom;
}

.image-message {
    width: 33rem;
    height: 33rem;
    position: relative;
    padding: 0.5rem;
    cursor: pointer;
}

    .image-message img {
        width: 100%;
        height: 100%;
    }

    .image-message .receiver-message {
        margin-right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .image-message .message-time {
        position: absolute;
        bottom: 1rem;
        right: 2rem;
        color: var(--white);
    }

.receiver-message-tail,
.sender-message-tail {
    width: 0.8rem;
    height: 1.3rem;
    position: absolute;
    top: 0;
}

.receiver-message-tail {
    left: -0.5rem;
}

.sender-message-tail {
    right: -0.5rem;
}

.receiver-audio-message {
    width: 33rem;
}

.audio-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.audio-message-left {
    cursor: pointer;
}

.audio-message-center {
    position: relative;
    margin: 0 1.5rem;
    flex: 1;
}

/* Reset input range styles */
input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #30b6b6;
    cursor: pointer;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 50%;
}

input[type="range"] {
    background: #d8d8d8;
    width: 100%;
    height: 0.5rem;
    -webkit-appearance: none;
    border-radius: 1rem;
}

.audio-message-bar {
    width: 75%;
    background: #30b6f6;
    position: absolute;
    left: 0;
    height: 0.5rem;
    z-index: 1;
}

.audio-message-center-top {
    display: flex;
}

.audio-message-center-bottom {
    position: absolute;
    top: 1.5rem;
    width: 100%;
}

.audio-message-bottom {
    display: flex;
    justify-content: space-between;
}

.audio-message-right {
    position: relative;
}

.audio-message-contact-image {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
}

.audio-message-microphone {
    width: 2rem;
    position: absolute;
    bottom: 0;
    left: -1rem;
}

/* Type message bar */
.type-message-bar {
    /* position: absolute; */
    flex-direction: row;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    background: var(--type-message-bar);
    padding: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
}

    .type-message-bar img {
        cursor: pointer;
    }

.type-message-bar-left img:nth-of-type(2) {
    margin: 0 2rem;
}

.type-message-bar-center {
    flex: 1;
}

    .type-message-bar-center input {
        width: 100%;
        outline: none;
        border: none;
        padding: 1rem 1rem 1rem 2rem;
        flex: 1;
        border-radius: 2rem;
        font-family: "Segoe UI";
        background: white;
    }

        .type-message-bar-center input::-webkit-input-placeholder {
            font-size: 1.5rem;
        }

.type-message-bar-right {
    margin-left: 2rem;
}

@keyframes blink {
    50% {
        opacity: 0.0;
    }
}

.blink {
    animation: blink 0.5s step-start 0s 10;
}
