@import url('https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


*{
    font-family: 'Urbanist',sans-serif;
    box-sizing: border-box;
}
body{
    display: flex;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.container{
    position: absolute;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    /*position: fixed;*/
    top: 0;
    bottom: 0;
    right: auto;
    left: auto;
    width: 800px;
    background-color: rgb(243, 241, 241);
}

.header{
    width: 800px;
    position: fixed;
    top: 0;
    margin-bottom: 5px;
    background-color: #425983;
    z-index: 1;
  
}

.title{
  display: inline-block;
  margin: 10px auto 10px 20px;
  font-size: 2em;
  font-weight: 700;
  color: #fff;
}
.state{
    float: right;
    margin: 15px 20px 10px auto;
    height: 30px;
    padding: 5px;
    background-color: #fff;
    border-radius: 10px;
    font-weight: 700;
}

.state input{
    cursor: pointer;
}
#display{
    display: flex;
    flex-direction: column;
    height: 80%;
    width: 90%;
    /*margin-top: 50px;*/
    margin: auto;
    padding: 40px 10px 10px 10px; 
    overflow: scroll;
}

.left-chat{
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.right-chat{
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    margin-bottom: 10px;
    
}
.right-chat .chat-text{
    background-color: rgb(194, 194, 196);
}
.time{
    float: right;
    margin-left: 10px;
    margin-right: 5px;
    font-size: 1em;
    font-weight: 700;
    opacity: 0.6;
    color: rgb(9, 51, 129);
}
.avatar{
    height: 35px;
    width: 35px;
    background-color: #1233;
    border-radius: 50%;
}

.avatar img{
    border-radius: 50%;
}
.avatar img{
    height: 35px;
    width: 35px;
}

.chat-text{
    background-color: #fff;
    font-size: 0.9em;
    padding: 5px;
    word-wrap: break-word;
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0.5px 0.5px 3px rgb(80, 80, 80);
    cursor: default;
}

.footer{
    display: flex;
    justify-content: center;
    padding: 10px;
    background-color: #123;
    padding-bottom: 10px;
}

#text-input{
    display: inline-block;
    min-width: 60%;
    min-height: 40px;
    height: 50px;
    word-wrap: wrap;
    padding: 5px 20px 5px 20px;
    border: none;
    border-radius: 30px;
    overflow: visible;
    background: none;
    outline: none;
    color: #fff;
    border: 2px solid rgb(0, 132, 255);
}

#btn-send{
    display: inline-block;
    margin-top: 10px;
    margin-left: 10px;
    height: 30px;
    width: 70px;
    border: none;
    border-radius: 10px;
    background-color: royalblue;
    color: #fff;
    outline: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
}

#btn-send:hover{
    background-color: salmon;
}


/* MEDIA /////////////////////////////////////*/



@media screen and (max-width: 800px) {
    
    .container{
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }

    .header{
        width: 100%;
    }

    #text-input{
        min-width: 60%;
    }


}

@media screen and (max-width : 550px) {
    .chat-text{
        max-width: 300px;
    }

}

@media screen and (max-width : 450px) {
    .title{
        margin: 10px auto 10px 20px;
        font-size: 1.4em;
        font-weight: 700;
    }

    #display{
        padding-top: 40px;
    }

    .state{
        height: 25px;
        padding: 3px;
        font-size: 0.8em;
        margin-top: 10px;
    }
    #text-input
    {
        min-height: 30px;
    }

    #btn-send{
        height: 30px;

    }
}




@media screen and (max-width : 400px) {
    .chat-text{
        max-width: 200px;
    }

}