/**
 * Ignite AI Chat Styles - Light & Theme-Friendly Version
 * 
 * EASY CONTROL:
 * - Edit the :root variables below to change colors
 * - The plugin also pulls colors from WordPress Customizer automatically
 * - Designed to work on light professional sites (Beaver Builder Theme)
 */

:root {
    /* === EDIT THESE TO CONTROL THE LOOK === */
    --ignite-primary: #0A66C2;           /* Main accent (buttons + user bubbles) */
    --ignite-primary-dark: #084C99;
    
    --ignite-text: #1F2937;              /* Main text color */
    --ignite-text-light: #6B7280;        /* Secondary / muted text */
    
    --ignite-bg: #FFFFFF;                /* Chat background */
    --ignite-surface: #F8FAFC;           /* Header background */
    --ignite-border: #E5E7EB;            /* Borders */
    --ignite-agent-bubble: #F3F4F6;      /* Agent message bubbles (light) */
    
    --ignite-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    --ignite-radius: 14px;
}

/* Main container */
.ignite-ai-agent {
    max-width: 680px;
    margin: 40px auto;
    background: var(--ignite-bg);
    border: 1px solid var(--ignite-border);
    border-radius: var(--ignite-radius);
    box-shadow: var(--ignite-shadow);
    overflow: hidden;
    font-size: 15px;
    font-family: inherit;
}

/* Header */
.ignite-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: var(--ignite-surface);
    border-bottom: 1px solid var(--ignite-border);
}

.ignite-ai-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ignite-ai-avatar {
    width: 42px;
    height: 42px;
    background: var(--ignite-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ignite-ai-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ignite-text);
    margin: 0;
}

.ignite-ai-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #10B981;
    font-weight: 500;
}

.ignite-ai-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
}

.ignite-ai-start-over {
    background: transparent;
    border: 1px solid var(--ignite-border);
    color: var(--ignite-text-light);
    padding: 7px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ignite-ai-start-over:hover {
    background: #f1f5f9;
    color: var(--ignite-text);
}

/* Messages area */
.ignite-ai-messages {
    height: 420px;
    overflow-y: auto;
    padding: 24px 22px;
    background: var(--ignite-bg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    padding: 13px 18px;
    border-radius: 16px;
    font-size: 0.94rem;
    line-height: 1.5;
}

.message.agent {
    align-self: flex-start;
    background: var(--ignite-agent-bubble);
    color: var(--ignite-text);
    border-bottom-left-radius: 5px;
}

.message.user {
    align-self: flex-end;
    background: var(--ignite-primary);
    color: white;
    border-bottom-right-radius: 5px;
}

.message .meta {
    font-size: 0.72rem;
    opacity: 0.6;
    margin-top: 5px;
    display: block;
}

/* Input area */
.ignite-ai-input-area {
    padding: 16px 22px;
    background: var(--ignite-bg);
    border-top: 1px solid var(--ignite-border);
}

.ignite-ai-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ignite-ai-input {
    flex: 1;
    padding: 13px 20px;
    border: 1px solid var(--ignite-border);
    border-radius: 9999px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.ignite-ai-input:focus {
    border-color: var(--ignite-primary);
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.12);
}

.ignite-ai-send-btn {
    background: var(--ignite-primary);
    color: white;
    border: none;
    padding: 0 24px;
    height: 46px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ignite-ai-send-btn:hover {
    background: var(--ignite-primary-dark);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 15px;
    background: var(--ignite-agent-bubble);
    border-radius: 16px;
    width: fit-content;
    align-self: flex-start;
}

.typing-indicator span {
    height: 4px;
    width: 4px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}