#ai-chat-button {

    position: fixed;

    right: 25px;
    bottom: 25px;

    width: 64px;
    height: 64px;

    border-radius: 50%;

    border: none;

    background: #2563eb;

    color: white;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 10px 25px rgba(0,0,0,.25);

    z-index: 99999;

    transition:
        transform .25s ease,
        opacity .25s ease;

}


#ai-chat-button:hover {

    transform: scale(1.08);

}


#ai-chat-button.hidden {

    opacity: 0;

    pointer-events: none;

}


#ai-chat-button i {

    font-size: 30px;
    
    line-height: 1;

}




/* Chat Window */

#ai-chat-window {

    position: fixed;

    right: 25px;

    bottom: 105px;


    width: 380px;

    height: 520px;


    background: white;


    border-radius: 20px;


    display: flex;

    flex-direction: column;


    overflow: hidden;


    box-shadow:
        0 15px 40px rgba(0,0,0,.25);


    opacity: 0;

    transform:
        translateY(30px)
        scale(.95);


    pointer-events: none;


    transition:

        opacity .3s ease,

        transform .3s ease;


    z-index: 99998;


    font-family:
        Arial,
        Helvetica,
        sans-serif;

}



#ai-chat-window.open {

    opacity: 1;

    transform:
        translateY(0)
        scale(1);


    pointer-events: auto;

}





/* Header */

#ai-chat-header {

    background: #2563eb;

    color:white;

    padding:16px;

    display:flex;

    align-items:center;

    justify-content:space-between;

}


.ai-header-title {

    display:flex;

    flex-direction:column;

}


.ai-header-title span {

    font-size:18px;

    font-weight:700;

}


.ai-header-title small {

    font-size:12px;

    opacity:.8;

}



#ai-close-button {

    border:none;

    background:none;

    color:white;

    font-size:28px;

    cursor:pointer;

    line-height:1;

}





/* Messages */

#ai-chat-messages {

    flex:1;

    padding:18px;

    overflow-y:auto;

    display:flex;

    flex-direction:column;

}





.ai-message,
.user-message {

    max-width:80%;

    padding:12px 15px;

    margin-bottom:12px;

    border-radius:18px;

    line-height:1.4;

    font-size:15px;

    animation:
        messageIn .2s ease;

}



@keyframes messageIn {

    from {

        opacity:0;

        transform:
            translateY(8px);

    }

    to {

        opacity:1;

        transform:
            translateY(0);

    }

}



.ai-message {

    background:#f1f5f9;

    color:#111827;

    align-self:flex-start;

}



.user-message {

    background:#2563eb;

    color:white;

    align-self:flex-end;

}






/* Typing dots */

.typing {

    display:flex;

    gap:5px;

    align-items:center;

    width:55px;

}


.typing span {

    width:8px;

    height:8px;

    background:#64748b;

    border-radius:50%;

    animation:
        typingBounce 1.4s infinite;

}


.typing span:nth-child(2){

    animation-delay:.2s;

}


.typing span:nth-child(3){

    animation-delay:.4s;

}



@keyframes typingBounce {


    0%,
    60%,
    100% {

        transform:translateY(0);

    }


    30% {

        transform:translateY(-5px);

    }

}





/* Footer */

#ai-chat-footer {

    display:flex;

    align-items:flex-end;

    padding:10px;

    border-top:1px solid #e5e7eb;

    gap:8px;

}



#ai-chat-input {

    flex:1;

    resize:none;

    max-height:120px;

    overflow-y:auto;


    border:1px solid #d1d5db;

    border-radius:12px;


    padding:10px;


    font-size:15px;


    outline:none;

    font-family:inherit;

}



#ai-chat-input:focus {

    border-color:#2563eb;

}





#ai-chat-send {

    width:42px;

    height:42px;


    border-radius:50%;


    border:none;


    background:#2563eb;

    color:white;


    display:flex;

    align-items:center;

    justify-content:center;


    cursor:pointer;

}



#ai-chat-send svg {

    width:22px;

    height:22px;

    fill:currentColor;

}





/* Mobile */

@media(max-width:600px){


    #ai-chat-window {


        width:100%;

        height:100%;


        right:0;

        bottom:0;


        border-radius:0;


    }



    #ai-chat-button {

        right:15px;

        bottom:15px;

        width:58px;

        height:58px;

    }



    #ai-chat-messages {

        padding:15px;

    }


}