@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;

}

body{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea, #764ba2)
}

.chatbot-popup{
    width: 420px;
    background: #282828;
    background-color: #f0f0f0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 
    0 32px 64px -48px rgba(0, 0, 0, 0.5);
    position: relative;

    @media (max-width: 420px){
        width: 95%;
        height: 95vh;
    }
}

.chat-header{
    padding: 15px 22px;
}

.chat-header .header-info{
display: flex;
gap: 10px;
align-items: center;
user-select: none;
}

.header-info .logo{
    height: 35px;
    width: 35px;
    padding: 6px;
    fill: #fff;
    background: #0044E9;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.header-info .logo-txt{
    color: #000000;
    font-size: 1.31rem;
    font-weight: bold;
}

.chat-body{
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 25px 22px;
    height: 460px;
    margin-bottom: 82px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ccccf5 transparent;
}

.chat-body .message{
    display: flex;
    gap: 11px;
    align-items: center;
}

.chat-body .bot-message .bot-avatar{
    height: 35px;
    width: 35px;
    padding: 6px;
    fill: #fff;
    background: #0044E9;
    border-radius: 50%;
    align-self: flex-end;
    margin-bottom: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.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;
    overflow-wrap: break-word; 

}

.chat-body .bot-message.loading .message-text{
    padding: 2px 16px;
}

.chat-body .bot-message .message-text{
    background: #E9EFF3;
    border-radius: 13px 13px 13px 3px;

}



.chat-body .user-message .message-text{
    color: #333333;
    background: #fff;
    border-radius: 13px 13px 3px 13px;
}

.chat-body .user-message .attachment{
    width: 50%;
    margin-top: -7px;
    border-radius: 13px;
}
.chat-body .bot-message .loading-animation{
    display: flex;
    gap: 4px;
    padding-block: 15px;
}

.chat-body .bot-message .loading-animation .dot{
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6f6bc2;
    opacity: 0.7;
    animation: 1.8s ease-in-out infinite dotsanima;
}

.chat-body .bot-message .loading-animation .dot:nth-child(1){
    animation-delay: 0.2s;
}

.chat-body .bot-message .loading-animation .dot:nth-child(2){
    animation-delay: 0.3s;
}

.chat-body .bot-message .loading-animation .dot:nth-child(3){
    animation-delay: 0.4s;
}
@keyframes dotsanima {
    0%, 44%{
       transform: translateY(0); 
    }

    28%{
        transform: translateY(-4px);
        opacity: 0.4;
    }

    44%{
        opacity: 0.2;
    }
}

.chat-footer{
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px 22px 20px;
}

.chat-footer .chat-form{
    display: flex;
    align-items: center;
    border-radius: 32px;
    outline: 1px solid #1744ad;
    position: relative;
}

.chat-footer .chat-form:focus-within{
    outline: 1px solid #0044E9;

}

.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;
    background: transparent;
    color: #000000;
    overflow: hidden;

}

.chat-form .chat-controls{
    display: flex;
    gap: 3px;
    align-items: center;
    align-self: flex-end;
    padding-right: 6px;
    height: 47px;
}

.chat-footer .chat-controls button{
    width: 35px;
    height: 35px;
    font-size: 1.15rem;
    border: none;
    outline: none;
    border-radius: 50%;
    background: none;
    color: #706db0;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.chat-footer .chat-controls button:hover{
background: #0044E9;
color: #fff;
}

.chat-footer .chat-controls #send-message{
    background: #0044E9;
    color: #fff;
    display: none;
    transition: 0.2s ease-in-out;
}

.chat-footer .message-input:valid~.chat-controls #send-message{
    display: block;
}

.chat-footer .chat-controls #send-message:hover{

    background: #2b4896;


}

.chat-footer .file-upload-wrapper{
    height: 35px;
    width: 35px;
    position: relative;
}

.chat-footer .file-upload-wrapper :where(img, button){
    position: absolute;

}

.chat-form .file-upload-wrapper img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-form .file-upload-wrapper #file-cancel{
    color: #ff0000;
    font-weight: bold;
    background: #fff;
}
.chat-footer .file-upload-wrapper :where(img, #file-cancel),
.chat-form .file-upload-wrapper.file-uploaded #file-upload{
    display: none;
}

.chat-form .file-upload-wrapper.file-uploaded img,
.chat-form .file-upload-wrapper.file-uploaded:hover #file-cancel  {
display: block;
}

em-emoji-picker{
    position: absolute;
    left: 50%;
    top: -360px;
    width: 100%;
    max-width: 350px;
    max-height: 350px;
    visibility: hidden;
    transform: translateX(-50%);
}

body.show-emoji-picker em-emoji-picker{
    visibility: visible;
}
