
@font-face {
    font-family: "apple";
    src: url(./assets/fonts/SF-Pro.ttf);
}

*{
    border:0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "apple";
}
body{
    color: var(--notutility);
    background-color: var(--main);
    transition-duration: 0.5s;
}
:root{
    --main:white;
    --divider: white;
    --accent:#dfe0e0;
    --header:#f2f3f3;
    --border: #3c3c3d;
    --message:#e9e9eb;
    --sent:#218cff;
    --utility:white;
    --notutility:black;
    --icon: grey;
    --dropdown:rgba(223, 224, 224, 0.3);
    --highlight:#eceeee;
    transition: --main 0.2s, --accent 0.2s, --header 0.2s, --border 0.2s, --notutility 0.2s, --utility 0.2s;
    
}
#chatArea{
    display: flex;
    flex-direction: row;
    height: 100svh;
}
#divider{
    padding: 1px;
    background-color: var(--divider);
    height: 100svh;
}

#divider:hover{
    cursor:ew-resize;
}

.chat{
    gap: 10px;
    user-select: none;
    height: 4.0rem;
    display: flex;
    flex-direction: row;
    font-weight: 750;
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    border-radius: 5px;
}
.groupIcon{
    background-color: var(--icon);
    border-radius: 50%;
    padding: 5px 10px ;
    margin-right: 10px;
}
.chatParent{
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.chatsIcon,.userIcon{
    color: white;
    /* Remove this above for more effect */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 16px;
    border-radius: 50%;
    /* background: linear-gradient(to bottom, var(--icon), var(--main)); */
    background-color: var(--icon);
}
.userIcon{
    font-size: 1rem;
    padding: 1.1rem;
}

.userIcon span{
    position: absolute;
}
.chatAttributes{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.chat span,.lastMessage{
    font-weight: 400;
    font-size: 0.75rem;
}

.chat *{ /*Stop selecting or the clicking of the child first*/
    pointer-events: none;
}


/* 
.chat:not(.selectedChat):hover{
    background-color:#7bbbff;
} */

.chat:not(.selectedChat):hover{
    cursor: pointer;
    background-color: var(--highlight);
}
.selectedChat{
    background-color: var(--sent);
    color: white;
}  

#utility *:hover{
    cursor: pointer;
}

#utility{
    display: flex;
    flex-direction: row;
    gap: 0.7rem;
}
#centerChat{
    align-self: center;
    justify-self: center;
    margin-bottom: 35vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

#centerText{
    font-size: 1.5rem;
}
#centerChat img{
    width: 10vw;
}
#chatsHeader{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap:10px;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.6rem 0.5rem;

}
#allSenders{
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#revealChats{
    filter: invert(100%);
    display: none;
    height: 1.5rem;
    margin-right: 10px;
}
#chatsContainer{
    padding: 0px 5px;
    overflow: scroll;
    display: flex;
    flex-direction: column;
    background-color: var(--accent);
    width: 30svw;
    transition: width;
    transition-duration: 0.5s;
}

#chatHeader{
    align-items: center;
    background-color: var(--header);
    display: flex;
    flex-direction: row;
    padding: 0.8rem;
    font-weight: 700;
    font-size: 1.2rem;
}

#chatContainer{
    width: 100%;
    display: flex;
    flex-direction: column;
}
/* #cont{
    height: 100%;
    display: flex;
    overflow: scroll;
    flex-direction: column;
    justify-content: flex-end;
} */
#messageContainer{
    overflow: scroll;
    background-color: var(--main);    
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    gap: 3px;
    /* justify-content: flex-end;  */
    padding: 10px;
}
.messages {
    display: flex;
    flex-direction: row;
    align-items: end;
    margin-left: 12px;
}
.sent{
    margin-left: 0;
    margin-right: 12px;
}

.message{
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 20px;
    display: flex;
    background-color: var(--message);
    max-width: fit-content;
    padding: 7px 15px;
    color: var(--notutility);
    max-width: 75%;
    width: fit-content;
    /* align-self: flex-start; */
    /* margin-right: auto; */
}
.messages img{
    height: 0.7rem;
}
.messages .receivePoint{
    display: none;
    position: relative;
    transform: translateX(7px) translateY(7px);
    aspect-ratio: 1/1;
}

.messages .sendPoint{
    display: none;
    position: relative;
    aspect-ratio: 1/1;
    transform: translateX(-8px) translateY(7px);
}
.sentMessage {
    /* align-self: flex-end; */
    color: white;
    background-color: var(--sent);
    margin-right: 0;
    margin-left: auto;
}

.time{
    margin-right: auto;
    margin-left: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.7rem;
}

#dropDown,#newChatDropdown{
    position: absolute;
    z-index: 99;
    font-weight: 300;
    background-color: var(--dropdown);
    backdrop-filter: blur(5px);
    padding: 10px 5px;
    border-radius: 10px;
  
}

#newChatDropdown{
    max-height: 25vh;
    overflow-y: scroll;
    background-color: var(--dropdown);
    color: #35c057;
    /* color: #1075dd; */
    top: 3.1rem;
    transform: translateX(1.7rem);
    box-shadow:  5px 1px 22px #000000,
    -1px 12px 52px #000000;
}

.user{
    border-radius: 10px;
    user-select: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-weight: 650;
    font-size: 0.85rem;
    padding: 5px 20px 5px 5px;
}


.user:hover{
    background-color: var(--sent);
    color: white;
    cursor:pointer;
}
.dropMenuItem{
    border-radius: 5px;
    padding: 3px 10px;
}

.dropMenuItem:hover{
    background-color: var(--main);
}
#messageControls{
    background-color: var(--main);
    display: flex;
    flex-direction: row;
    gap: 5px;
    /* background-color: rgba(194, 94, 186, 0.863); */
    padding: 10px;
}
#messageTextBox{
    border: 0.75px var(--border) solid;
    background-color: var(--main);
    color: var(--notutility);
    height: 2.0rem;
    outline: none;
    width: 100%;
    font-size: 1rem;
    padding: 5px 15px;
    border-radius: 25px;
}
#sendMessageButton{
    padding: 5px 20px;
    font-size: 1rem;
    outline: none;
    border-radius: 10px;
    height: 2rem;
    border-radius: 25px;

}
#chatIcon{
    display: none;
}

#senderName{
    display: flex;
    flex-direction: row;
    gap: 10px;
}
#blurryDiv{
    transition: opacity 0.4s ease;
    opacity: 0;
    backdrop-filter: blur(3px);
    position: absolute;
    z-index: -99;
    right: 0;
    top: 3.1rem;
    height: calc(100% - 6.1rem);
    width: 76.58%;
}
#senderName input{
    background-color: var(--header);
    color: var(--notutility);
    font-size: 1.1rem;
    font-weight: 500;
    outline: none;
    border: none;
}













@media only screen and (max-width:450px) {
    #blurryDiv{
        display: none;
    }
    #newChatDropdown{
        z-index: 999;
        position: absolute;
        left: 20px;
        top: 4rem;
    }
    #chatsContainer,#divider{
        display: none;
    }

    #chatsHeader{
        font-size: 2rem;
    }

    .chat{
        font-size: 1.4rem;
        height: auto;
        background-color: var(--highlight);
    }

    .chatAttributes span,.lastMessage{
        font-size: 1rem;
    }

    .chatsIcon{
        font-size: 1.9rem;
        padding: 12px 20px;
    }

    #dropDown{
        transform: translateX(-100px);
        font-size: 1.5rem;
    }

    #revealChats{
        display: block;
        height: 2.4rem;
        position: absolute;
        top: 10px;
        left: 10px;
    }

    #messageTextBox,#sendMessageButton{
        height: 2.5rem;
        font-size: 1.3rem;
    }
    .message{
        font-size: 1.2rem;
    }
    .messages img{
        z-index: 3;
        height: 0.8rem;
    }
    #chatHeader{
        /* display: flex; */
        justify-content: center;
        gap: 10px;
        padding: 0.4rem;
        position: fixed;
        /* position: -webkit-sticky; */
        z-index: 10;
        top: -10;
        width: 100%;
    }

    #messageControls{
        position: fixed;
        width: 100%;
        bottom: 0;
        z-index: 10;
    }
    #chatIcon{
        display: block;
        color: white;
        /* Remove this above for more effect */
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.7rem;
        padding: 0.5rem 1rem;
        border-radius: 50%;
        /* background: linear-gradient(to bottom, var(--icon), var(--header)); */
        background-color: var(--icon);
    }
    #senderName{
        font-size: 1.5rem;
        font-weight: 600;
    }

    #messageContainer{
        padding: 4rem 0rem;
    }

   .time{
        font-size: 0.9rem;
   }
}