/* 
 * WLIQ Chatbot - Visibility and Design Fix
 * ONLY applies to #chatbot-chatgpt to avoid affecting theme
 */

/* Input field - MUST be readable - ONLY in chatbot */
#chatbot-chatgpt #chatbot-chatgpt-message,
.chatbot-floating-style #chatbot-chatgpt-message,
.chatbot-embedded-style #chatbot-chatgpt-message {
    color: #2d3748 !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
}

#chatbot-chatgpt #chatbot-chatgpt-message:focus,
.chatbot-floating-style #chatbot-chatgpt-message:focus,
.chatbot-embedded-style #chatbot-chatgpt-message:focus {
    color: #2d3748 !important;
    background: #ffffff !important;
    border-color: #667eea !important;
}

#chatbot-chatgpt #chatbot-chatgpt-message::placeholder,
.chatbot-floating-style #chatbot-chatgpt-message::placeholder,
.chatbot-embedded-style #chatbot-chatgpt-message::placeholder {
    color: #718096 !important;
    opacity: 0.7 !important;
}

/* Ensure text in messages is readable - ONLY in chatbot */
#chatbot-chatgpt .chatbot-user-text,
.chatbot-floating-style .chatbot-user-text,
.chatbot-embedded-style .chatbot-user-text {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#chatbot-chatgpt .chatbot-bot-text,
.chatbot-floating-style .chatbot-bot-text,
.chatbot-embedded-style .chatbot-bot-text {
    color: #2d3748 !important;
    border: 1px solid #e2e8f0;
}

/* Input Area - ONLY in chatbot */
#chatbot-chatgpt #chatbot-chatgpt-input,
.chatbot-floating-style #chatbot-chatgpt-input,
.chatbot-embedded-style #chatbot-chatgpt-input {
    display: flex;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
    align-items: center;
}

#chatbot-chatgpt #chatbot-chatgpt-input-area,
.chatbot-floating-style #chatbot-chatgpt-input-area,
/* .chatbot-embedded-style #chatbot-chatgpt-input-area {
    flex-grow: 1;
    max-width: calc(100% - 200px);
} */

/* Buttons - ONLY in chatbot */
#chatbot-chatgpt #chatbot-chatgpt-buttons-container,
.chatbot-floating-style #chatbot-chatgpt-buttons-container,
.chatbot-embedded-style #chatbot-chatgpt-buttons-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#chatbot-chatgpt #chatbot-chatgpt-buttons-container button,
.chatbot-floating-style #chatbot-chatgpt-buttons-container button,
.chatbot-embedded-style #chatbot-chatgpt-buttons-container button {
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
}

/* Message visibility - ONLY in chatbot */
#chatbot-chatgpt .chat-message,
.chatbot-floating-style .chat-message,
.chatbot-embedded-style .chat-message {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Conversation container - ONLY in chatbot */
#chatbot-chatgpt #chatbot-chatgpt-conversation,
.chatbot-floating-style #chatbot-chatgpt-conversation,
.chatbot-embedded-style #chatbot-chatgpt-conversation {
    background: #f7fafc;
    display: block !important;
    visibility: visible !important;
}

/* Typing indicator - ONLY in chatbot */
#chatbot-chatgpt .chatbot-typing-indicator,
.chatbot-floating-style .chatbot-typing-indicator,
.chatbot-embedded-style .chatbot-typing-indicator {
    display: inline-flex !important;
    align-items: center;
}

/* Typing animation for smooth message appearance */
#chatbot-chatgpt .chatbot-bot-text,
.chatbot-floating-style .chatbot-bot-text,
.chatbot-embedded-style .chatbot-bot-text {
    animation: fadeIn 0.3s ease-in;
}

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

/* Hide message count if it appears in messages */
#chatbot-chatgpt .chatbot-bot-text::after,
.chatbot-floating-style .chatbot-bot-text::after,
.chatbot-embedded-style .chatbot-bot-text::after {
    content: '';
    display: none;
}

/* Remove any trailing parentheses pattern */
#chatbot-chatgpt .chatbot-bot-text,
.chatbot-floating-style .chatbot-bot-text,
.chatbot-embedded-style .chatbot-bot-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}