/* WP AI Chat Widget Styles */
#wp-ai-chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Launcher Button */
#wp-ai-chat-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #10b981; /* Emerald-500 */
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wp-ai-chat-launcher:hover {
    transform: scale(1.05);
    background-color: #059669; /* Emerald-600 */
}

#wp-ai-chat-launcher svg {
    width: 28px;
    height: 28px;
}

/* Chat Window */
#wp-ai-chat-window {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

#wp-ai-chat-window.open {
    display: flex;
}

/* Header */
.wp-ai-chat-header {
    padding: 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wp-ai-chat-title {
    font-weight: 600;
    font-size: 16px;
    color: #111827;
}

.wp-ai-chat-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

.wp-ai-chat-close:hover {
    color: #111827;
}

/* Messages Area */
#wp-ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Bubbles */
.wp-ai-chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.wp-ai-chat-message.user {
    align-self: flex-end;
    background-color: #10b981;
    color: white;
    border-top-right-radius: 2px;
}

.wp-ai-chat-message.assistant {
    align-self: flex-start;
    background-color: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-top-left-radius: 2px;
}

.wp-ai-chat-message.system {
    align-self: center;
    background-color: transparent;
    color: #6b7280;
    font-size: 12px;
    border: none;
    text-align: center;
}

/* Input Area */
.wp-ai-chat-input-area {
    padding: 12px;
    background-color: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 8px;
}

#wp-ai-chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    resize: none;
    height: 40px;
    line-height: 20px;
}

#wp-ai-chat-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

#wp-ai-chat-send {
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#wp-ai-chat-send:hover {
    background-color: #059669;
}

#wp-ai-chat-send:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: typing 1s infinite;
    margin: 0 1px;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Pricing Card Styles */
.wp-ai-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wp-ai-card-title { font-weight: bold; margin-bottom: 4px; font-size: 15px; }
.wp-ai-card-price { color: #059669; font-weight: bold; font-size: 18px; }
.wp-ai-card-desc { font-size: 13px; color: #4b5563; margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
    #wp-ai-chat-window {
        width: 100% !important;
        height: 100dvh !important;
        max-height: none !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 2147483647 !important; /* Max z-index */
    }

    #wp-ai-chat-widget-container {
        z-index: 2147483647 !important;
    }
}
