﻿.chats-section {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.contacts-container {
    display: flex;
    flex-flow: column;
    gap: 10px;
    width: 25%;
    height: 100%;
    background: var(--background-light);
    padding: 12px;
    z-index: 3;
    box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.1);
}

.contact-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    background: var(--background-light);
    padding: 12px;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    transition: 300ms all ease-in-out;
}

.contact-container:hover {
    cursor: pointer;
    background: var(--background-dark);
    color: var(--background-light);
}

.contact-profile-picture {
    width: 60px;
    height: 60px;
    border-radius: 100%;
    overflow: hidden;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.chat-container {
    position: relative;
    width: 75%;
    height: 100%;
    background: var(--background-light);
    display: flex;
    flex-flow: column;
    gap: 10px;
    align-items: center;
}

.chat-form {
    position: absolute;
    top: 92%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.chat-input {
    height: 100%;
    width: 300px;
    padding: 8px 12px;
}

.chat-button {
    padding: 8px 12px;
    border: none;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    background: transparent;
    border-radius: 20px;
    height: 100%;
    width: 80px;
    transition: 200ms all ease-in-out;
}

.chat-button:hover {
    background: var(--accent);
    color: var(--background-light);
}

#chat-contact-info-container {
    width: 100%;
    height: 80px;
    background: var(--accent);
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: var(--background-light);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-messages-container{
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    gap: 10px;
    padding: 24px;
    max-width: 600px;
}

.chat-message-container{
    display: inline;
    flex-flow: column;
    padding: 8px 12px;
    border-radius: 12px;
    align-items: end;
    justify-content: center;
    width: fit-content;
}

    .chat-message-container.sender {
        background: var(--accent);
        color: var(--text-light);
        border-top-right-radius: 0;
        align-self: flex-end;
    }

    .chat-message-container.receiver {
        background: var(--grey-light);
        color: var(--text-dark);
        border-top-left-radius: 0;
        align-self: flex-start;
    }

.chat-message__content{
    font-size: 1rem;
    text-align: right;
}

.chat-message__time{
    font-size: 0.8rem;
    text-align: right;
}

@media (max-width: 768px) {
    .contacts-container {
        height: auto;
        width: 100%;
        display: flex;
        flex-flow: row;
        overflow-x: scroll;
    }

    .chat-container {
        width: 100%;
    }

    .chat-form {
        width: 90%;
    }

    .chat-input {
        width: 100%;
    }

    #chat-contact-info-container {
        width: 100%;
        justify-content: end;
        padding: 6px 24px;
    }

    .chats-section{
        flex-flow: column;
    }
    
    .contact-contianer{
        width: fit-content !important;
    }
}