/* IMPORTING GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

* {
    font-family: "Inter", serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 24px; 
}



body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(#d2b48c, #8B4513);
}

.chatbot-popup{
    position: relative;
    width: 80%; 
    height: 650px; 
    background: #fff;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 128px rgba(0, 0, 0, 0.1),
    0 32px 64px -48px rgba(0, 0, 0, 0.5);
}

.chat-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #915B40;
    padding: 15px 22px;
}

.chat-header .header-info{
    display: flex;
    align-items: center;
    gap: 10px;   
}

.header-info .rex-logo{
    height: 50px;
    width: 50px;
    background: #FAF3E0;
    padding: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.header-info .logo-text{
    color: #FAF3E0;
    font-size: 1.31rem;
    font-weight: 600;
}

.chat-header #close-chatbot{
    border: none;
    color: #fff;
    height: 40px;
    width: 40px;
    font-size: 1.9rem;
    margin-right: -10px;
    padding-top: 2px;
    cursor: pointer;
    border-radius: 50%;
    background: none;
    transition: 0.2s ease;
} 

.chat-header #close-chatbot:hover{
    background: #784632;
}

.chat-body{
    padding: 25px 22px;
    display: flex;
    gap: 20px;
    height: calc(100% - 150px); 
    margin-bottom: 82px;
    overflow-y: auto;
    flex-direction: column;
}

.chat-body .message{
    display: flex;
    gap: 11px;
    align-items: center;
}

.chat-body .bot-message .bot-avatar{
    display: flex;
    gap: 11px;
    align-items: center;
    height: 50px;
    width: 50px;
    background: #FAF3E0;
    padding: 4px;
    border-radius: 50%;
    flex-shrink: 0;
    align-self: flex-end;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.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;
    background: #FEFBF0;
}

.chat-body .bot-message.thinking .message-text{
    padding: 2px 16px;

}

.chat-body .bot-message .message-text{
    background: #FEFBF0;;
    border-radius: 13px 13px 13px 13px;
}

.chat-body .user-message .message-text{
    color: #FAFAFA;
    border-radius: 13px 13px 3px 13px;
    background: #915B40;
}

.chat-body .bot-message .thinking-indicator{
    display: flex;
    gap: 4px;
    padding-block: 15px;
}

.chat-body .bot-message .thinking-indicator .dot{
    height: 7px;
    width: 7px;
    background: #915B40;
    border-radius: 50%;
    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: #fff;
    padding: 20px 22px; 
}

.chat-footer .chat-form{
    display: flex;
    align-items: center;
    background: #fff;
    outline: 1px solid #d2b48c;
    border-radius: 32px;
}

.chat-footer .chat-form:focus-within{
    outline: 2px solid #9e7a6b;
}

.chat-form .message-input{
    border: none;
    outline: none;
    height: 47px;
    width: 100%;
    resize: none;
    font-size: 0.95rem;
    padding: 14px 0 13px 18px;
    border-radius: inherit;
}

.chat-form .chat-controls{
    display: flex;
    align-self: flex-end;
    align-items: center;
    padding-right: 6px;
    height: 47px;
    gap: 3px;

}

.chat-form .chat-controls button{
    height: 35px;
    width: 35px;
    border:none;
    cursor:pointer;
    color: #915B40;
    background: #FEFBF0;
    border-radius: 50%;
    font-size: 1.15rem;
    transition: 0.2s ease
}

.chat-form .chat-controls #send-message{
    background: #8B4513;
    color: #fff;
    display: none;
}

.chat-form .message-input:valid~ .chat-controls #send-message{
    display: block;
}

.chat-form .chat-controls #send-message:hover{
    background: #B06030 ;
}

.chat-form .chat-controls button:hover{
    background: #F2E8D9
}
