

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif
}
body{
    width: 100vw;
    height: 100vh;
    background:url("https://cdn.dribbble.com/userupload/16208758/file/original-abc43b22f0b350b94f4f631d7163e9a2.png?resize=1024x768");
    font-family: "Poppins", sans-serif
}
.chatbot-toggler{
    position: fixed;
    right: 40px;
    bottom: 25px;
    height: 50px;
    width: 50px;
    background: #422d51;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
}
.show-chatbot .chatbot-toggler{
    transform: rotate(90deg);
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
}
.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{
    position: fixed;
    right: 50px;
    bottom: 100px;
    background: #C8B0A4;
    width: 420px;
    border-radius: 15px;
    overflow: hidden;
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
    transform-origin: bottom right;
    box-shadow: 0 0 128px 0 rgba(0,0,0,0.1),    0 32px 64px -48px rgba(0,0,0,0.5);
    -webkit-transform: scale(0.5);
    -moz-transform: scale(0.5);
    -ms-transform: scale(0.5);
    -o-transform: scale(0.5);
    transition: all 0.1s ease;
    -webkit-transition: all 0.1s ease;
    -moz-transition: all 0.1s ease;
    -ms-transition: all 0.1s ease;
    -o-transition: all 0.1s ease;
    scrollbar-width: thin; 
    scrollbar-color: #422d51 transparent;
}



.show-chatbot .chatbot{
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
}
.chatbot header{
    background: #422d51;
    padding: 16px 0;
text-align:  center;
position:relative;
}
.chatbot header h2{
    color:#fff;
    font-size: 1.9rem;
}
.chatbot header span{
    position: absolute;
    right: 20px;
    top: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
}

.chatbot .chatbox{
    height: 450px;
   overflow-y: auto;
   padding: 30px 20px 100px;
}
.chatbox .chat{
    display: flex;
}
.chatbox .incoming span{
    height: 32px;
    width: 32px;
    color: #fff;
    text-align: center;
    line-height: 32px;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    margin: 0 10px 7px 0;
    align-self: flex-end;
}
.chatbox .incoming span i{
    color: #422d51;
}
.chatbox .outgoing
{
    margin: 20px 0;
justify-content: flex-end;
}
.chatbox .chat p{
    padding: 12px 16px;
    color: #fff;
    max-width: 75%;
    white-space: pre-wrap;
    background: #422d51;
    border-radius: 10px 10px 0 10px;
    -webkit-border-radius: 10px 10px 0 10px;
    -moz-border-radius: 10px 10px 0 10px;
    -ms-border-radius: 10px 10px 0 10px;
    -o-border-radius: 10px 10px 0 10px;
}
.chatbox .incoming p{
    color: #000;
    background: #f2f2f2;
    border-radius: 10px 10px 10px 0px;
    -webkit-border-radius: 10px 10px 10px 0px;
    -moz-border-radius: 10px 10px 10px 0px;
    -ms-border-radius: 10px 10px 10px 0px;
    -o-border-radius: 10px 10px 10px 0px;
}
.chatbot .chat-input{
    position: absolute;
    bottom: 0;
    gap: 5px;
    width: 100%;
    display: flex;
    background: #fff;
    padding: 5px 20px;
    border-top: 1px solid #ccc;
}
.chat-input textarea{
    width: 100%;
    height: 55px;
    border: none;
    outline: none;
    font-size: 0.9rem;
    resize: none;
    padding: 16px 15px 16px 0;
}
.chat-input span{
align-self: flex-end;
height: 55px;
line-height: 55px;
color: #422d51;
font-size: 1.35rem;
cursor: pointer;
visibility: hidden;
}
.chat-input textarea:valid ~ span{
    visibility: visible;
}
@media (max-width:490px) {
    .chatbot{
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        -webkit-border-radius: 0;
        -moz-border-radius: 0;
        -ms-border-radius: 0;
        -o-border-radius: 0;
}
    
    .chatbot .chatbox{
        height: 90%;
    }
    .chatbot header span{
        display: block;
    }
}