/* AI Chatbot Frontend Styles */

.ai-chatbot-container {
    max-width: 400px;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ai-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    text-align: center;
}

.ai-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    margin-right: 0;
    margin-left: 10px;
}

.user-message .message-content {
    background: #007bff;
    color: white;
}

.ai-message .message-content {
    background: white;
    border: 1px solid #e9ecef;
}

.message-content {
    max-width: calc(100% - 45px);
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
}

.message-content a:hover {
    opacity: 0.8;
}

.ai-chatbot-input-area {
    display: flex;
    padding: 15px;
    gap: 10px;
    align-items: flex-end;
}

#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #667eea;
}

#send-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

#send-message:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#send-message:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-chatbot-typing {
    padding: 0 15px 10px;
    font-size: 12px;
    color: #6c757d;
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .ai-chatbot-container {
        max-width: 100%;
        height: 400px;
    }

    .ai-chatbot-header {
        padding: 12px;
    }

    .message-content {
        max-width: calc(100% - 40px);
        font-size: 13px;
        padding: 8px 12px;
    }

    #chat-messages {
        padding: 12px;
    }

    .ai-chatbot-input-area {
        padding: 12px;
    }
}

/* Scrollbar styling */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
