/* google fonts*/
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body{
   display: flex;
   align-items: center;
   justify-content: center; 
   min-height: 100vh;
   background: linear-gradient(#f6f6f6,#C8C7FF);
}

.language-selection{
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    text-decoration: none;

}

.chatbot-popup{
    position: relative;
    width: 420px;
    box-shadow: 0 0 128px 0 rgba(0,0,0,0.15), 0 32px 64px -48px rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.chat-header{
    background: #41a3fe;
    color: #fff;
    padding: 16px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header .header-info{
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-info .chatbot-logo{
    height: 35px;
    width: 35px ;
    padding:6px;
    fill: #5350C4;
    background: #efcb01;
    flex-shrink: 0;
    border-radius: 50%;
}

.header-info .logo-text{
    color: #fff;
    font-size: 1.31rem;
    font-weight: 600;
}   

.chat-header #close-chatbot{
    background: #41a3fe;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.9rem;
    width: 45px;
    height: 40px;
    margin-right: -10px;
    padding-top: 2px ;
    cursor: pointer;
}

.chat-header #close-chatbot:hover{
    background: #41a3fe;  
    color:#efcb01

}

.chat-body{
    padding: 25px 22px;
    display: flex;
    gap: 20px;
    height: 460px;
    overflow-y: auto;
    flex-direction: column;
    margin-bottom: 82px;
}

.chat-body .message{
    display: flex;
    gap: 11px;
    align-items: center;
}

.chat-body .bot-message .bot-avatar{
    height: 35px;
    width: 35px ;
    padding:6px;
    fill: #b61f05;
    background: #efcb01;
    flex-shrink: 0;
    border-radius: 50%;
    margin-bottom: 2px;
    align-self: flex-end;
}

.chat-body .user-message {
    flex-direction: column;
    align-items: flex-end;
}   

.chat-body .message .message-text {
    padding: 12px 16px;
    max-width: 75%;
    font-size: 0.95rem;
}

.chat-body .bot-message.thinking .message-text{
    padding: 2px 16px;
}

/* Bot and User message styles */
.chat-body .bot-message .message-text {
    background:#d9d9d9;
    border-radius: 13px 13px 13px 3px;
}

.chat-body .user-message .message-text {
    color: #040404;
    background: #a2e9c8;
    border-radius: 13px 13px 3px 13px;
}
/* Thinking indicator styles */

.chat-body .bot-message .thinking-indicator{
    display: flex;
    padding-block: 15px;
    gap: 4px;
}

.chat-body .bot-message .thinking-indicator .dot{
height: 7px;
width: 7px;
border-radius: 50%;
opacity: 0.7;
background:#5350C4;
animation: dotPulse 1.8s ease-in-out infinite;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(1){
    animation-delay: 0.2s;
}
.chat-body .bot-message .thinking-indicator .dot:nth-child(2){
    animation-delay: 0.3s;
}
.chat-body .bot-message .thinking-indicator .dot:nth-child(3){
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 44% {
        transform: translateY(0);
    }
    28% {
        opacity: 0.4;
        transform: translateY(-4px);
    }
    44% {
        opacity: 0.2;
    }
}

.chat-footer{
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #fff;
    padding: 15px 22px 20px;;
}

.chat-footer .chat-form{
    display: flex;
    align-items: center;
    background:#fff;
    border-radius: 32px;
    outline: 1px solid #ccc;
}

.chat-footer .chat-form:focus-within{
    outline: 2px solid #831805;
}

.chat-form .message-input{

    border: none;
    outline: none;
    height: 47px;
    width: 100%;
    resize: none;
    font-size:0.95rem;
    border-radius: inherit;
    padding: 14px 0 13px 18px
}

.chat-form .chat-controls{
    display:flex;
    height: 47px;
    align-items: center;
    align-self: flex-end;
    padding-right: 6px;
}

.chat-form .chat-controls button{
    height: 35px;
    width: 35px;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    color: #5350C4;
    background: none;
    border-radius: 50%;
    transition:  0.2s ease;
}   

.chat-form .chat-controls #send-message{
    background: #5350C4;
    color: #fff;
    display: none;
}   

.chat-form .message-input:valid~.chat-controls #send-message{
    display: block;
}


.chat-form .chat-controls #send-message:hover{
     background: #efcb01;
}

.chat-form .chat-controls button:hover{
    background: #efcb01;
}