@import url(https://fonts.googleapis.com/css?family=Inter:100,200,300,regular,500,600,700,800,900);

.chatbot-toggler{
    position: fixed;
    right: 40px;
    bottom: 35px;
    height: 50px;
    width: 50px;
    background: rgb(23, 23, 69);
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-chatbot .chatbot-toggler{
    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{
    background: #fff;
    width: 420px;
    right: 40px;
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    position: fixed;
    bottom: 100px;
    border-radius: 15px;
    transform-origin: bottom right ;
    box-shadow: 0 0 128px rgba(0,0,0,0.1),
                0 32px 64px -48px rgba(0,0,0,0.5);
    transition: all 0.1s ease; 
    font-family: "Poppins", sans-serif;

}

.show-chatbot .chatbot{
    transform: scale(1); 
    opacity: 1;
    pointer-events: auto;
}

.chatbot .chatbot-header{
    background: rgb(23, 23, 69);
    padding: 16px 0;
    text-align: center;
    position: relative;
}

.chatbot .chatbot-header h2{
color: #fff;
font-size: 1.4rem;
}

.chatbot .chatbot-header span{
    position: absolute;
    right: 20px;
    top: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    transform: translateY(-50%);
}

.chatbot .chatbox{
    height: 510px;
    overflow-y: auto;
    padding: 30px 20px 100px;
}

.chatbox .chat{
    display: flex;
}

.chatbox .incoming span{
    height: 32px;
    width: 32px;
    background:rgb(23, 23, 69);
    color: #fff;
    align-self: flex-end;
    text-align: center;
    line-height: 32px;
    border-radius: 4px;
    margin: 0 10px 7px 0;
}

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

.chatbox .chat p.error{
    color: rgb(152, 16, 16);
    background: #f2f2f2;
}

.chatbox .chat p{
    background: rgb(23, 23, 69) ;
    max-width: 75%;
    white-space: pre-wrap;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    font-size: 0.95rem;
}

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

.chatbot .chat-input{
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    display: flex;
    gap: 5px;
    padding: 5px 20px;
    border-top: 1px solid #ccc;
}
.chat-input textarea{
    height: 55px;
    width: 100%;
    border: none;
    outline: none;
    max-height: 180px;
    font-size:0.95rem;
    resize: 0;
    padding: 16px 15px 16px 0;
}

.chat-input span{
    align-self: flex-end;
    height: 55px;
    line-height: 55px;
    color: rgb(23, 23, 69);
    font-size: 1.35rem;
    cursor: pointer;
    visibility: hidden;
}
/*the upload button only becomes visible when something is typed*/

.chat-input textarea:valid ~ span{
    visibility: visible;
}


@media (max-width: 490px)  {
    .chatbot{
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    .chatbot .chatbox{
        height: 90%;

    }
    .chatbot .chatbot-header span{
        display: block;
    }
} 



