#mw-chatbot-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 72px;
    height: 72px;
    background: #0F7FD0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform .35s ease, opacity .35s ease;
    z-index: 99999;
}

#mw-chatbot-bubble svg {
    width: 34px;
    height: 34px;
    fill: #FFFFFF;
}

/* CHAT WINDOW */

#mw-chatbot-window {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 360px;
    height: 520px;
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid #F2F4F7;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
    display: flex;
    flex-direction: column;
    z-index: 99998;
}

/* Show window */

#mw-chatbot-wrapper.open #mw-chatbot-window {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* HEADER */

#mw-chatbot-header {
    background: #0F7FD0;
    color: white;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

#mw-chatbot-subheader {
    background: #E9F2FF;
    text-align: center;
    padding: 12px 10px;
    font-size: 15px;
    color: #0F395F;
}

/* CONTENT */

#mw-chatbot-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* BUBBLES */

.mw-msg-bot {background: #E9F2FF;}

.mw-msg-user {background: #F0F4F9;}

.mw-msg-bot, .mw-msg-user {
    max-width: 80%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.4;
    color: #0F395F;
}

.mw-msg-user {
    align-self: flex-end;
}

/* INPUT BAR */

.mw-chat-input {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border-top: 1px solid #F2F4F7;
}

/* INPUT FIELD */

.mw-chat-textarea {
    flex: 1;
    border: 1px solid #DCE4EF;
    border-radius: 12px;
    padding: 12px 12px;
    font-size: 15px;
    outline: none;
}

/* UPDATED SEND BUTTON (smaller + cleaner) */

.mw-chat-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0F7FD0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    transition: transform .2s ease;
}

.mw-chat-send:hover {
    transform: scale(1.08);
}

.mw-chat-send svg {
    width: 20px;
    height: 20px;
    fill: #FFFFFF;
}

/* TYPING INDICATOR */

.typing {
    width: 28px;
    height: 10px;
    display: flex;
    justify-content: space-between;
}

.typing div {
    width: 6px;
    height: 6px;
    background: #0F395F;
    border-radius: 50%;
    animation: blink 1.2s infinite ease-in-out alternate;
}

.typing div:nth-child(2) { animation-delay: .2s; }
.typing div:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
    from { opacity: .3; }
    to { opacity: 1; }
}

/* --- ANDROID RESPONSIVE FIX (FINAL) --- */

@media screen and (max-width: 480px) {

    #mw-chatbot-window {
        width: auto !important; /* reset old width */
        max-width: 92vw !important; 
        left: 4vw !important;
        right: 4vw !important;
        bottom: 90px !important;
        box-sizing: border-box !important;
        border-radius: 16px;
        transform: translateZ(0); /* forces Android reflow */
    }

    #mw-chatbot-bubble {
        right: 20px !important;
        bottom: 20px !important;
        width: 64px;
        height: 64px;
    }
}
