
.main-container{
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    grid-template-areas: "conversations pv";
    padding: 5px;
}
.conversations{
    grid-area: conversations;
}
.conversation-container{
    border: 1px solid lightgray;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 100px 1fr;
}
.top-conversation{
    grid-area: 1 / 1 / 2 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid lightgray;
    color: var(--color-black);
}
.bottom-conversation{
    grid-area: 2 / 1 / 3 / 2;
}
.bottom-conversation .search-conversation{
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bottom-conversation .search-conversation input{
    padding: 5px;
    border: none;
    font-family: raleway;
    width: 80%;
    border-radius: 5px;
    background-color: var(--color-light);
    color: var(--color-black);
    box-shadow: 0 0 2px 2px lightgray;
}
.bottom-conversation .search-conversation span{
    display: flex;
    align-items: center;
    cursor: pointer;
}
.bottom-conversation ul{
    width: 100%;
    height: 650px;
    overflow-y: auto;
    list-style: none;
    padding: 5px;
}
.bottom-conversation ul li{
    width: 100%;
    height: 70px;
    display: flex;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}
.bottom-conversation ul li:hover{
    background-color: var(--color-activeUser);
}
.bottom-conversation ul li::before{
    content: "";
    position: absolute;
    width: 0;
    height: 100%;
    background-color: var(--color-activeUser);
    z-index: 1;
    transition: 0.3s;
}
.bottom-conversation ul li.active::before{
    width: 100%;
}
.bottom-conversation ul li .img-conversation{
    width: 20%;
    height: 100%;   
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.bottom-conversation ul li img{
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.bottom-conversation ul li .info-conversation{
    display: flex;
    flex-direction: column;
    width: 80%;
    height: 100%;
    justify-content: center;
    gap: 5px;
    z-index: 2;
}
.bottom-conversation ul li .info-conversation .name-conversationalist{
    font-weight: bold;
    color: var(--color-black);
}
.bottom-conversation ul li .info-conversation .pre-text{
    font-size: small;
    color: gray;
    font-weight: 100;
}
.pv{
    grid-area: pv;
}
.pv-container{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 100px 700px;
    border: 1px solid lightgray;
}
.top-pv{
    grid-area: 1 / 1 / 2 / 2;
    display: flex;
    align-items: center;
    border-bottom: 1px solid lightgray;
}
.back-to-userList{
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    display: none;
}
.img-pv{
    width: 100px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-pv{
    display: flex;
    align-items: center;
    color: var(--color-black);
}
.img-pv img{
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.bottom-pv{
    grid-area: 2 / 1 / 3 / 2;
}
.chat-container{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.chat-section{
    width: 100%;
    height: 650px;
    border-bottom: 1px solid lightgray;
}
.chat-section ul{
    list-style: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    direction: ltr;
}
.chat-section ul li{
    padding: 5px;
    border-radius: 5px;
    width: 300px;
    margin: 10px 0;
}
.chat-section ul li.receiver{
    background-color: var(--color-light);
    border: 1px solid var(--color-gray);
}
.chat-section ul li.receiver span{
    font-size: small;
    color: rgb(138, 138, 138);
}
.chat-section ul li.receiver p{
    font-size: medium;
    color: var(--color-black);
    margin: 5px 0;
}
.chat-section ul li.sender{
    background-color: var(--color-blue);
    margin-left: 100%;
    transform: translateX(-100%);
}
.chat-section ul li.sender p {
    color: white;
    margin: 5px 0;
}
.chat-section ul li.sender span{
    font-size: small;
    color: lightgray;
}

.send-mail{
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.send-mail input{
    padding: 10px;
    font-family: raleway;
    border: none;
    border-radius: 5px;
    width: 90%;
    box-shadow: 0 0 2px 2px lightgray;
    background-color: var(--color-light);
    color: var(--color-black);
}
.send-mail button{
    padding: 5px;
    background-color: var(--color-blue);
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.send-mail button:hover{
    background-color:#1e5bf5;
}
@media screen and (max-width : 800px) {
    .main-container{
        grid-template-columns: 1fr;
        grid-template-areas: "conversations";
        overflow: hidden;
        position: relative;
    }
    .pv{
        position: absolute;
        width: 100%;
        height: 100%;
        transition: 0.5s;
        transform: translateX(100%);
        background-color: var(--color-light);
        z-index: 900;
        top: 0;
        left: 0;
    }
    .pv-container.enable .top-pv{
        position: fixed;
        width: 100%;
        height: 100px;
        z-index: 1000;
        grid-area: unset;
        background-color: var(--color-light);
        border-bottom: 1x solid white;
    }
    .pv.active{
        transform: translateX(0);
    }
    .back-to-userList{
        display: flex;
    }
}
.empty-chat{
    width: 100%;
    text-align: center;
    color: var(--color-black);
}