@import url( "https://fonts.googleapis.com/css2?family=Poppins&display=swap");
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins",sans-serif;
    
}
body{
    background:rgb(190, 207, 232)
}
.chatbot-toggler{
    position: fixed;
    right: 40px;
    bottom: 35px;
    width: 50px;
    height: 50px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    background: #724ae8;
    border-radius: 50%;
    cursor: pointer;
    transition : all 0.2s ease;

}
.show-chatbot .chatbot-toggler{
    transform: rotate(90deg);  /*show hide box rotate toggle  animation*/
}
.chatbot-toggler span{
    position: absolute;
}
.show-chatbot .chatbot-toggler span:first-child,.chatbot-toggler span:last-child{
    opacity: 0;
}
.show-chatbot .chatbot-toggler span:last-child{
    opacity: 1;
}
.chatbot{
    width: 420px;
    right:40px;
    bottom: 100px;
    position: fixed;
    background: white;
    border-radius: 15px;
    box-shadow: 0 0 128px rgba(0, 0, 0, 0.1),
                0 32px 64px -48px rgba(0, 0, 0,0.5);
    overflow: hidden;        
    transform: scale(0.5);
    opacity: 0;
    transform-origin: bottom right;
    pointer-events: none;    
    transition : all 0.1s ease;
}
.show-chatbot .chatbot{
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;  
      
}


.chatbot header{
    background: rgb(135, 45, 237);
    padding: 16px 0;
    text-align: center;
    position: relative;

}
.chatbot header span{
    position: absolute;
    right: 20px;
    top: 50%;
    color: white;
    cursor: pointer;
    display: none;
    transform: transalateY(-50%);
}
.chatbot header h2{
    color: white;
    font-size:25px ;
}
.chatbot .chatbox{
    height: 510px;
    overflow-y: auto;
    padding: 30px 20px 100px;
}
.chatbox .chat{
    display: flex;
}
.chatbox .incoming span{
    height: 32px;
    width: 32px;
    color: white;
    background: rgb(142, 73, 232) ;
    text-align: center;
    line-height: 32px;
    border-radius: 4px;
    margin: 0 10px 7px 0;
    align-self: flex-end;
}
.chatbox .outgoing{
    margin: 20px 0;
    justify-content: flex-end;
}
.chatbox .chat p{
    color: white;
    max-width: 75%;
    font-size: 14px;
    white-space: pre-wrap;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    background: rgb(151, 75, 244);
}
.chatbox .chat p.error{
    color: maroon;
    background:rgba(237, 197, 197, 0.916);
}
.chatbox .incoming p{
    color: black;
    background: rgba(243, 238, 238, 0.916);
    border-radius: 10px 10px 0 10px;
}
.chatbot .chat-input{
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
    padding: 5px 20px;
    border-top: 1px solid grey;
    display: flex;
    gap: 5px;
}

.chat-input textarea{
    border: none;
    outline: none;
    height: 55px;
    width: 100%;
    max-height: 180px;
    font-size: 15px;
    resize: none;
    padding: 16px 15px 16px 0;
}
.chat-input span{
    align-self: flex-end;
    height: 55px;
    line-height: 55px;
    color: #724ae8;
    font-size: 1.35rem;
    cursor: pointer;
    visibility: hidden;
}
.chat-input textarea:valid~ span{
    visibility: visible;
}
/* **********mobile-view************ */
@media(max-width:490px)
{
    .chatbot{
        right: 0;
        bottom: 0;
        height: 100%;
        width: 100%;
        border-radius: 0;
    }
    .chatbot .chatbox{
        height: 90%;
    }
    .chatbot header span{
        display: block;
    }
}
