/* Chatbot Styling Improvements - Taller + Prettier */

/* Make chat container taller and more spacious */
#ai-chat-container, .ai-chat-widget {
    width: 380px !important;
    height: 500px !important;
    max-height: 80vh !important;
    max-width: calc(100vw - 40px) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Improve chat messages area - make it much taller */
#ai-chat-messages, .ai-chat-messages {
    flex: 1 !important;
    min-height: 350px !important;
    max-height: 350px !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    overflow-y: auto !important;
    border: none !important;
}

/* prettier chat message styling */
.ai-chat-message {
    margin-bottom: 15px !important;
    padding: 0 !important;
}

.ai-chat-message p {
    margin: 0 !important;
    padding: 12px 16px !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    max-width: 85% !important;
    word-wrap: break-word !important;
}

/* Bot messages - left aligned, white background */
.ai-chat-message.ai-chat-bot p {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e1e5e9 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

/* User messages - right aligned, blue background */
.ai-chat-message.ai-chat-user p {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    margin-left: auto !important;
    border-bottom-right-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2) !important;
}

/* Improve input area styling */
.ai-chat-input-container {
    padding: 20px !important;
    background: white !important;
    border-top: 1px solid #e1e5e9 !important;
    border-radius: 0 0 12px 12px !important;
    display: flex !important;
    gap: 12px !important;
}

#ai-chat-input, .ai-chat-input-container input {
    flex: 1 !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 25px !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    outline: none !important;
    background: #f8f9fa !important;
    transition: all 0.2s ease !important;
}

#ai-chat-input:focus, .ai-chat-input-container input:focus {
    border-color: #007bff !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

#ai-chat-send, .ai-chat-input-container button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 80px !important;
}

#ai-chat-send:hover, .ai-chat-input-container button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

/* Improve scrollbar in messages area */
#ai-chat-messages::-webkit-scrollbar, .ai-chat-messages::-webkit-scrollbar {
    width: 6px !important;
}

#ai-chat-messages::-webkit-scrollbar-track, .ai-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

#ai-chat-messages::-webkit-scrollbar-thumb, .ai-chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 3px !important;
}

#ai-chat-messages::-webkit-scrollbar-thumb:hover, .ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8 !important;
}

/* Mobile adjustments for taller chat */
@media (max-width: 768px) {
    #ai-chat-container, .ai-chat-widget {
        width: calc(100vw - 20px) !important;
        height: 70vh !important;
        max-height: 70vh !important;
        right: 10px !important;
        left: 10px !important;
        bottom: 70px !important;
    }
    
    #ai-chat-messages, .ai-chat-messages {
        min-height: calc(70vh - 180px) !important;
        max-height: calc(70vh - 180px) !important;
    }
}

/* Add a subtle animation for new messages */
.ai-chat-message {
    animation: fadeInUp 0.3s ease-out !important;
}

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

/* Typing indicator styling (if needed) */
.typing-indicator {
    display: flex !important;
    padding: 15px !important;
    align-items: center !important;
}

.typing-indicator span {
    height: 8px !important;
    width: 8px !important;
    border-radius: 50% !important;
    background: #007bff !important;
    margin-right: 5px !important;
    animation: typing 1.4s infinite ease-in-out !important;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s !important;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s !important;
}

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