/* WP AI Chatbot Styles */
.wp-ai-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease;
}

.wp-ai-chatbot-widget.hidden {
    display: none;
}

.wp-ai-chatbot-widget.minimized {
    height: 60px;
    overflow: hidden;
}

/* Header */
.wp-ai-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-ai-chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-ai-chatbot-avatar {
    font-size: 20px;
}

.wp-ai-chatbot-name {
    font-weight: 600;
    font-size: 16px;
}

.wp-ai-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.wp-ai-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Area */
.wp-ai-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wp-ai-chatbot-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
}

.wp-ai-chatbot-bot-message {
    align-self: flex-start;
    background: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.wp-ai-chatbot-user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.wp-ai-chatbot-message-content {
    font-size: 14px;
}

/* Input Area */
.wp-ai-chatbot-input-container {
    border-top: 1px solid #e9ecef;
    background: white;
    padding: 15px 20px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.wp-ai-chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.wp-ai-chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.wp-ai-chatbot-input:focus {
    border-color: #667eea;
}

.wp-ai-chatbot-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.wp-ai-chatbot-send:hover {
    opacity: 0.9;
}

.wp-ai-chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wp-ai-chatbot-usage {
    text-align: center;
    color: #6c757d;
}

/* Toggle Button */
.wp-ai-chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.wp-ai-chatbot-toggle:hover {
    transform: scale(1.1);
}

/* Loading Animation */
.wp-ai-chatbot-typing {
    display: inline-block;
}

.wp-ai-chatbot-typing-dots {
    display: inline-flex;
    gap: 4px;
}

.wp-ai-chatbot-typing-dot {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: wp-ai-chatbot-typing 1.4s infinite ease-in-out;
}

.wp-ai-chatbot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.wp-ai-chatbot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes wp-ai-chatbot-typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
    .wp-ai-chatbot-widget {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .wp-ai-chatbot-toggle {
        bottom: 10px;
        right: 10px;
    }
}