/* Aimtech AI Chatbot CSS */

#ai-chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease-in-out;
}

.chat-message.ai-message {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.chat-message.user-message {
    background: #9ECC3B;
    color: #0b1320;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(158, 204, 59, 0.2);
}

.chat-message.ai-message strong {
    color: #0F172A;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #9ECC3B;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar styling for chat window */
#ai-chatbot-messages-container::-webkit-scrollbar {
    width: 6px;
}
#ai-chatbot-messages-container::-webkit-scrollbar-track {
    background: transparent;
}
#ai-chatbot-messages-container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}
#ai-chatbot-messages-container::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Clear Chat Button */
.clear-chat-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.clear-chat-btn:hover {
    background: rgba(158, 204, 59, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-message {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .typing-indicator {
        padding: 10px 14px;
    }
    
    .clear-chat-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .chat-message {
        max-width: 95%;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .typing-indicator {
        padding: 8px 12px;
    }
    
    .typing-dot {
        width: 5px;
        height: 5px;
    }
}
