@import url('https://fonts.googleapis.com/css?family=Poppins:wght@400;500;600&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body{
    background-color: #E3F2FD;
}
.chatbot-toggler{
    position:  fixed;
    bottom: 35px;
    right: 40px;
    height: 50px;
    width: 50px;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    cursor: pointer;
    background-color: #724ae8;
    border-radius: 50%;
    transition: all 0.3s ease-in-out;
}
body.show-chatbot .chatbot-toggler{
    transform: rotate(90deg);
}
.chatbot-toggler span{
    color: #fff;
    position: absolute;
}
body.show-chatbot .chatbot-toggler span:first-child, .chatbot-toggler span:last-child{
    opacity: 0;
}
body.show-chatbot .chatbot-toggler span:last-child{
    opacity: 1;
}

.chatbot{
   position:fixed;
   right: 40px;
   bottom:100px;
    width: 420px;
    background-color: #fff;
    border-radius: 15px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    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);
    transition: all 0.3s ease-in-out;
    
}
body.show-chatbot .chatbot{
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.chatbot header{
   background:#724ae8;
   padding: 16px 0;
   text-align: center;
}

.chatbot header h2{
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
}
.chatbot header span{
      position: absolute;
        right: 15px;
        top: 19px;
        cursor: pointer;
        transform: translateY(-50%);
     
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar {
    width: 6px;
  }
  .chatbot :where(.chatbox, textarea)::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 25px;
  }
  .chatbot :where(.chatbox, textarea)::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 25px;
  }
  
.chatbot .chatbox{
    height: 510px;
    overflow-y: auto;
    padding: 30px 20px 70px;
}
.chatbox .chat {
    display: flex;
   
    /* flex-direction: column; */
}

.chatbox .incoming span:first-child{
    height: 32px;
    width: 32px;
    color: #fff;
    align-self: flex-end;
    background-color: #724ae8;
    text-align: center;
    line-height: 32px;
    border-radius: 4px;
    margin: 0 10px 7px 0;
    display: flex;
}

.chatbox .outgoing{
    justify-content: flex-end;
    margin: 20px 0;
}

.chat p{
    color: #fff;
    max-width: 75%;
    font-size: 0.9rem;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    background: #724ae8;
    white-space: pre-wrap;
}

.chatbox .incoming p{
    color:#000;
    background: #f2f2f2;
    border-radius: 10px 10px 10px 0;
}

.chat-input{
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    gap: 5px;
    background-color: #fff;
    padding: 5px 20px;
    border-top: 1px solid #ccc;
}

.chat-input input{
     width: 100%;
    height: 55px;
    border: none;
    outline: none;
    font-size: 0.95rem;
   resize: none;
    padding: 16px 15px 16px 0;
}

.chat-input button{
    align-self: flex-end;
    height: 55px;
    border: none;
    outline: none;
    color: #724ae8;
    font-size: 1.35rem;
    cursor: pointer;
    background-color: transparent;
    visibility: hidden;
}

.chat-input button.visible {
    visibility: visible;
}



.loader {
    display: flex;
    width: 56px;
    height: 26.9px;
    background: radial-gradient(circle closest-side,#6c47ff 90%,#0000) 0%   50%,
           radial-gradient(circle closest-side,#7847ff 90%,#0000) 50%  50%,
           radial-gradient(circle closest-side,#8a47ff 90%,#0000) 100% 50%;
    background-size: calc(100%/3) 13.4px;
    background-repeat: no-repeat;
    animation: dots-7ar3yq 1s infinite linear;
    display: none;
 }
 
 @keyframes dots-7ar3yq {
    20% {
       background-position: 0%   0%, 50%  50%,100%  50%;
    }
 
    40% {
       background-position: 0% 100%, 50%   0%,100%  50%;
    }
 
    60% {
       background-position: 0%  50%, 50% 100%,100%   0%;
    }
 
    80% {
       background-position: 0%  50%, 50%  50%,100% 100%;
    }
 }
 .loader.active{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
 }