#ai-chatbot-widget {
    position: fixed;
    bottom: 24px;
    left: 24px; /* برای سایت راست‌چین، دکمه سمت چپ پایین قرار می‌گیرد */
    z-index: 999999;
    font-family: Tahoma, Vazirmatn, sans-serif;
    direction: rtl;
}

#ai-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0A192F; /* آبی سرمه‌ای */
    border: 2px solid #C9A227; /* طلایی مات */
    color: #C9A227;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    transition: transform 0.2s ease;
}
#ai-chatbot-toggle:hover {
    transform: scale(1.06);
}

#ai-chatbot-window {
    position: absolute;
    bottom: 76px;
    left: 0;
    width: 340px;
    max-width: 90vw;
    height: 460px;
    max-height: 70vh;
    background: #0A192F;
    border: 1px solid #C9A227;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
#ai-chatbot-window.ai-chatbot-hidden {
    display: none;
}

#ai-chatbot-header {
    background: linear-gradient(135deg, #0A192F, #12233F);
    color: #C9A227;
    padding: 14px 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #C9A227;
}
#ai-chatbot-close {
    background: none;
    border: none;
    color: #C9A227;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

#ai-chatbot-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: #0C1E38;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-chatbot-msg {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}
.ai-chatbot-msg.user {
    align-self: flex-start;
    background: #C9A227;
    color: #0A192F;
    border-bottom-left-radius: 2px;
}
.ai-chatbot-msg.bot {
    align-self: flex-end;
    background: #16294A;
    color: #EDE3C8;
    border: 1px solid #C9A227;
    border-bottom-right-radius: 2px;
}
.ai-chatbot-msg.typing {
    font-style: italic;
    opacity: 0.7;
}

#ai-chatbot-input-area {
    display: flex;
    border-top: 1px solid #C9A227;
    background: #0A192F;
}
#ai-chatbot-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #EDE3C8;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
}
#ai-chatbot-input::placeholder {
    color: #8a93a6;
}
#ai-chatbot-send {
    background: none;
    border: none;
    color: #C9A227;
    width: 46px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#ai-chatbot-send:hover {
    color: #E0C158;
}
