/* ===========================
   TeamRise AI Chatbot
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,Helvetica,sans-serif;
}

/* Floating AI Button */

#chatButton{
    position:fixed;
    right:25px;
    bottom:25px;
    width:68px;
    height:68px;
    background:#ffffff;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    cursor:pointer;
    box-shadow:0 10px 30px rgba(0,0,0,.25);
    z-index:99999;
    transition:.3s;
}

#chatButton:hover{
    transform:scale(1.08);
}

#chatButton img{
    width:54px;
    height:54px;
    border-radius:50%;
    object-fit:contain;
}

#chatButton i{
    font-size:30px;
    color:#16a34a;
}

/* Chat Window */

#chatContainer{
    position:fixed;
    right:25px;
    bottom:105px;
    width:380px;
    max-width:95%;
    height:650px;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 15px 45px rgba(0,0,0,.25);
    display:none;
    flex-direction:column;
    overflow:hidden;
    z-index:99999;
}

/* Header */

.chat-header{
    background:#16a34a;
    color:#fff;
    padding:15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.bot-info{
    display:flex;
    align-items:center;
}

.bot-info img{
    width:48px;
    height:48px;
    margin-right:12px;
    border-radius:50%;
    background:#fff;
    object-fit:contain;
}

.bot-info h3{
    font-size:20px;
    margin-bottom:2px;
}

.bot-info span{
    font-size:13px;
    opacity:.9;
}

#closeChat{
    width:38px;
    height:38px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.18);
    color:#fff;
    font-size:26px;
    font-weight:bold;
    display:flex;
    justify-content:center;
    align-items:center;
    cursor:pointer;
}

#closeChat:hover{
    background:rgba(255,255,255,.25);
    transform:rotate(90deg);
}

#closeChat i{
    pointer-events:none;
}

/* Messages */

#chatMessages{
    flex:1;
    overflow-y:auto;
    padding:18px;
    background:#f7f7f7;
}

/* Bot */

.bot-message{
    background:#fff;
    color:#333;
    padding:14px 16px;
    border-radius:16px;
    margin-bottom:15px;
    width:90%;
    line-height:1.6;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

/* User */

.user-message{
    margin-left:auto;
    background:#16a34a;
    color:#fff;
    padding:14px 16px;
    border-radius:16px;
    width:90%;
    margin-bottom:15px;
    line-height:1.6;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

/* Lists */

.bot-message ul{
    margin-top:10px;
    margin-left:18px;
}

.bot-message li{
    margin-bottom:5px;
}

/* Language */

.language-box{
    background:#fff;
    border-top:1px solid #eee;
    padding:10px;
}

.language-box select{
    width:100%;
    height:46px;
    border:1px solid #ddd;
    border-radius:10px;
    padding:0 12px;
    outline:none;
    font-size:15px;
}

/* Chat Input */

.chat-input{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    background:#fff;
    border-top:1px solid #eee;
}

.chat-input input{
    flex:1;
    min-width:0;
    height:48px;
    border:1px solid #ddd;
    border-radius:30px;
    padding:0 16px;
    outline:none;
    font-size:15px;
    transition:.3s;
}

.chat-input input:focus{
    border-color:#16a34a;
}

.chat-input button{
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:#16a34a;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    cursor:pointer;
    transition:.3s;
    flex-shrink:0;
}

.chat-input button:hover{
    background:#11833c;
}

.chat-input button i{
    color:#fff;
    font-size:18px;
}

/* Scrollbar */

#chatMessages::-webkit-scrollbar{
    width:6px;
}

#chatMessages::-webkit-scrollbar-thumb{
    background:#16a34a;
    border-radius:20px;
}

/* Mobile */

@media (max-width:600px){

#chatContainer{
    left:10px;
    right:10px;
    bottom:90px;
    width:auto;
    height:80vh;
    border-radius:18px;
}

#chatButton{
    right:15px;
    bottom:15px;
    width:64px;
    height:64px;
}

#chatButton img{
    width:50px;
    height:50px;
}

.chat-header{
    padding:14px;
}

.bot-info img{
    width:42px;
    height:42px;
}

.bot-info h3{
    font-size:18px;
}

#chatMessages{
    padding:15px;
}

.bot-message,
.user-message{
    width:95%;
    font-size:15px;
}

.chat-input{
    padding:10px;
    gap:8px;
}

.chat-input input{
    height:46px;
    font-size:16px;
}

.chat-input button{
    width:48px;
    height:48px;
}

.language-box{
    padding:8px;
}

.language-box select{
    height:44px;
}

}



/* Chatbot typing */

.typing{
    display:flex;
    align-items:center;
    gap:6px;
    padding:5px 0;
}

.typing span{
    width:8px;
    height:8px;
    background:#16a34a;
    border-radius:50%;
    animation:typing 1.2s infinite ease-in-out;
}

.typing span:nth-child(2){
    animation-delay:.2s;
}

.typing span:nth-child(3){
    animation-delay:.4s;
}

@keyframes typing{
    0%,80%,100%{
        transform:scale(0.5);
        opacity:.4;
    }
    40%{
        transform:scale(1);
        opacity:1;
    }
}