/* Chatbot CSS */
.ai-chatbot-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #8b5cf6;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s ease;
}
.ai-chatbot-btn:hover {
    transform: scale(1.1);
    background-color: #7c3aed;
}

.ai-chatbot-window {
    position: fixed;
    bottom: 170px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ai-chatbot-header {
    background: #8b5cf6;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}
.ai-chatbot-header .close-btn {
    cursor: pointer;
    font-size: 20px;
}

.ai-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}
.chat-msg.bot {
    background: #e0e0e0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-msg.user {
    background: #8b5cf6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-chatbot-input {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    background: #fff;
}
.ai-chatbot-input input {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
    font-size: 14px;
    border-radius: 20px;
    background: #f1f1f1;
}
.ai-chatbot-input button {
    background: transparent;
    border: none;
    color: #8b5cf6;
    font-weight: bold;
    cursor: pointer;
    padding: 0 10px;
    font-size: 16px;
}

.typing-indicator {
    display: none;
    align-self: flex-start;
    background: #e0e0e0;
    padding: 10px 14px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Mobile Responsiveness */
@media screen and (max-width: 480px) {
    .ai-chatbot-window {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        height: 60vh;
        max-height: 450px;
        bottom: 170px;
    }
    
    .ai-chatbot-btn {
        width: 50px;
        height: 50px;
        bottom: 90px;
    }
}
