html {
    scroll-behavior: smooth;
}

body{
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: Inter,sans-serif;
}

.brdr{
    border: 0px solid red;
}

main {
    display: grid;
    grid-template-columns: 450px 1fr;
    height: 100vh;
    max-height: 100vh;
    -moz-max-height : 100vh;
}

.chat-menu{
    display: grid;
    grid-template-rows: 60px 1fr;
}

.menu-header{
    background: #44c4b8;
    align-items: center;
    text-align: start;
    display: grid;
    grid-template-columns: 50px 80px 1fr;
    color: white;
    font-weight: 600;
    font-size: 26px;
    padding: 0 20px;
}

.menu-header span{
    cursor: pointer;
    width: fit-content;
}

.menu-header img{
    width: 35px;
    filter: invert(1);
    cursor: pointer;

}

.menu{
    display: flex;
    flex-direction: column;
    /* grid-template-rows: 75px 75px 1fr 75px; */
}

.menu .chats,
.menu .search,
.menu .new-chat{
    display: grid;
    align-items: center;
    padding: 0 25px;
    height: 75px;
}

.menu .chats{
    font-size: 22px;
    font-weight: 600;
}

.menu .search input{
    padding: 10px;
    font-size: 15px;
    border-radius: 8px;
    border: 2px solid rgba(201, 200, 200, 0.705);
    outline: none;
    transition: border-color .3s;
}

.menu .search input:focus{
    border-color: #26a69a;
}

.menu .chats-list{
    /* display: flex; */
    padding: 0 0px 10px;
    align-items: flex-start;
    overflow: hidden;
    height: 100%;
    border-color: teal;
    /* border-width: 3px; */
    
    /* height: max-content; */
    /* max-height: 460px; */

}

.chat-window ul::-webkit-scrollbar,
.chats-container::-webkit-scrollbar {
    width: 4px;
}

.chat-window ul::-webkit-scrollbar-thumb,
.chats-container::-webkit-scrollbar-thumb {
    transition: all 0.5s;
}

.chat-window ul:hover::-webkit-scrollbar-thumb{
    background: #aaa;
    border-radius: 10px;

}

.chats-container:hover::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 10px;
}

.menu .chats-list .chats-container{
    /* height: 500px; */
    min-height: 0;
    max-height: 460px;
    display: grid;
    overflow-y: scroll;

}

.menu .chat-item{
    height: 60px;
    margin: 10px 10px;
    /* margin-left: 20px; */
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    cursor: pointer;
    list-style: none;
}

.chat-item img{
    /* padding: 20px; */
    width: 40px;
    margin: auto;
}

.chat-item-info{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding-left: 5px;
}

.chat-item-info .chat-name{
    color: #3db4a8;
    font-weight: 600;
    font-size: 17px;
}

.chat-item-info .chat-name2{
    color: #000000;
    font-weight: 500;
    font-size: 17px;
}

.chat-item-info .chat-msg{
    color: #aaafaf;
    /* font-weight: 600; */
    height: 17px;
    overflow: hidden;
    font-size: 15px;
}

.chat-msg img{
    width: 15px;
    margin: 0px 5px ;
    opacity: 0.7;
}

.chat-item p {
    margin: 0;
}

.chat-item-info2{
    display: flex;
    flex-direction: column;
    /* justify-content: space-evenly; */
    align-items: center;
    padding: 5px;
}

.chat-item-info2 p{
    margin: 5px 5px 0;
}

.chat-num{
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #26a69a;
    color: white;
    padding: 5px;
    display: grid;
    text-align: center;
    font-size: 11px;
}

.chat-time{
    font-size: 12px;
    color: #26a69a;
}

.chat-time2{
    font-size: 12px;
    color: #555555;
}


.menu hr{
    margin: 0 auto ;
    border: 0;
    width: 95%;
    border-top: 1px solid #bebebe;
    border-bottom: 1px solid #fff;
}

.menu .new-chat{
    position: sticky;
    bottom: 0;
    background-color: white;
}

.menu .new-chat button {
    background: #44c4b8;
    outline: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .3s;
    color: white;
    font-size: 18px;
    padding: 15px;
    position: sticky;
    bottom: 0;
}

.menu .new-chat button:hover {
background: #26a69a;
}

.chat-main{
    display: grid;
    grid-template-rows: 60px 1fr;
}

.chat-header{
    background: #26a69a;
    display: grid;
    grid-template-columns: 60px 1fr 1fr 60px;

}



.chat-header .profile-1a,
.chat-header .profile-1b,
.chat-header .profile-2b,
.chat-header .profile-2a {
    display: grid;
    align-items: center;
    padding: 0 10px;
}

.chat-header .profile-1a img,
.chat-header .profile-2a img{
    width: 40px;
    cursor: pointer;
}

.chat-header .profile-1b,
.chat-header .profile-2b{

    font-size: 14px;
    color: rgb(240, 238, 238);
}

.chat-header .profile-1b p:hover,
.chat-header .profile-2b p:hover{
    color: white;
}
.chat-header .profile-1b p,
.chat-header .profile-2b p{
cursor: pointer;
width: fit-content;
    transition: color .2s
}

.chat-header .profile-2b p{
    margin-left: auto;
}

.chat{
    background: #dddddd;
    display: grid;
    grid-template-rows: 1fr 125px;
}

.chat-window{
    overflow: hidden;
    position: relative;
}

.chat-window ul{
    padding: 0;
    margin: 0;
    height: 75vh;
    overflow-y: scroll;
}

.msg-text-right{
    margin-left: auto;
    width: fit-content;
}

.msg-text-center{
    margin: auto;
    width: fit-content;
    width: -moz-fit-content;
}

.msg-text-left{
    margin-right: auto;
    width: fit-content;
}

.msg-message-right{
    background: #2a2a2a;
    color: white;
    border-radius: 5px;
    padding: 12px 10px;
    font-size: 14px;
    width: fit-content;
    max-width: 600px;
    margin-left: 15px;
    margin-bottom: 7px;
}

.msg-message-left{
    background: #fff;
    color: black;
    border-radius: 5px;
    padding: 12px 10px;
    font-size: 14px;
    width: fit-content;
    max-width: 600px;
    margin-right: 15px;
    margin-bottom: 7px;
}

.msg-message-left img,
.msg-message-right img{
    width: 350px;
}

.msg-message-c{
    background: #fff;
    color: black;
    border-radius: 55px;
    padding: 7px 10px;
    font-size: 11px;
    width: fit-content;
    max-width: 600px;
}

.msg-delivery,
.msg-delivery-left{
    font-size: 13px;
    color: #333;
    margin: 1px;
    margin-left: auto;
    width: fit-content;
    margin-right: 5px;
}

.msg-delivery-left{
    margin-right: 18px;
}

.msg-delivery span{
    color: rgb(14, 151, 185);
}

.msg-right{
    display: grid;
    grid-template-columns: 1fr 70px;
}


.msg-left{
    display: grid;
    grid-template-columns: 70px 1fr ;
}

.profile-right img{
    width: 40px;
    margin: 12px;
}

.chat .chat-window ul li{
    list-style: none;

}

.chat .chat-input{
    display: grid;
    position: sticky;
    bottom: 0;
    background: #DDDDDD;
    padding: 25px;
}

.chat .input-box{
    background: white;
    border-radius: 10px;
    display: grid;
    padding: 0 20px;
    grid-gap: 20px;
    grid-template-columns: 50px 1fr 50px 50px 50px;
}

.chat .input-box .input-child{
    display: grid;
    align-items: center;
}

.chat .input-box .input-child button{
    height: 40px;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    border: none;
    background: #dddddd;   
}

.chat .input-box .input-child button.send{
    background: #44c4b8;
    transition: background .3s;

}

.chat .input-box .input-child button:hover {
    background: #aaa;
}

.chat .input-box .input-child button.send:hover {
background: #26a69a;
}

.input-child img{
    margin: auto;
    padding: 10px;
    opacity: 0.7;
    height: 18px;
}

.send img{
    filter: invert(1);
    opacity: 1;
}




.chat .type {
    display: flex;
   align-items: center;
}

.chat .type input{
    width: 100%;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 14px;
    border-radius: 8px;
    border: 2px solid rgba(201, 200, 200, 0.705);
    outline: none;
    transition: border-color .3s;   
}

.chat .type input:focus{
    
    border-color: #26a69a;
}

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
}
  
.tooltip .tooltiptext {
    visibility: hidden;
    width: max-content;
    background-color: rgba(0, 0, 0, 0.712);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 15px;
    position: absolute;
    z-index: 1;
    bottom: 120%;
    left: 50%;
    margin-left: -32px;    
    /* Fade in tooltip - takes 1 second to go from 0% to 100% opac: */
    opacity: 0;
    transition: opacity 0.4s;
}

.files.tooltip .tooltiptext{
    margin-left: -40px; 
}

.voice.tooltip .tooltiptext{
    margin-left: -70px; 
}


.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.712) transparent transparent transparent;
  }
  
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 920px){
    main{
        grid-template-columns: 1fr;

    }

    .chat-main{
        display: none;
    }
}