/* ============================================================================
   Dark Theme
   ============================================================================ */

.theme-dark {
    --bg-color: #121212;
    --containerbackground: #1a202c;
    --bg-footer-color: #1f1f1f;
    --text-color: #fff;
    --text-color-inv: #000000;
    --text-color-dark: #ffffff;
    --accent-color: #4f6ae6;
    --border-color: #333;
    /* Aliases for shared components (e.g. notifications.css) */
    --border: var(--border-color);
    --fg: var(--text-color);
    --muted-fg: var(--placeholder-color);
    --header-bg: #1f1f1f;
    --header2-bg: #1f1f1f;
    --placeholder-color: #777;
    --ready-color: #ccc;
    --action_btn_bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-image: none;
    --bg-overlay: linear-gradient(180deg, rgba(0,0,0,.50), rgba(0,0,0,.50));
    --bg-size: cover;
    --bg-pos: center;
    --bg-repeat: no-repeat;
    --bg-forminput: #2d3748;
    --bg-secondary: #1e2936;
    --bg-tertiary: #252d3d;
    --bg-hover: #374151;

    /* Message bubbles */
    --bubble-user: #2d3748;
    --bubble-assistant: #252d3d;
    --bubble-user-text: #e2e8f0;
    --bubble-assistant-text: #e2e8f0;
    --bubble-system: #1e2936;
    --bubble-system-text: #cbd5e0;
    
    /* Text colors */
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-tertiary: #718096;
    
    /* Warning and danger states (adjusted for dark backgrounds) */
    --warning-bg: rgba(255, 193, 7, 0.15);
    --warning-text: #ffc107;
    --warning-border: rgba(255, 193, 7, 0.4);
    --danger-bg: rgba(220, 53, 69, 0.15);
    --danger-text: #ff6b6b;
    --danger-border: rgba(220, 53, 69, 0.4);
    
    /* Code blocks */
    --code-bg: rgba(255, 255, 255, 0.1);
    
    /* Button text */
    --button-text: #ffffff;

    /* Shadows (elevated opacity for dark backgrounds) */
    --shadow-depth: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* Dark theme specific adjustments */
.theme-dark .rag-cite-link:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.theme-dark .rag-cite-hover-card {
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

.theme-dark .rag-cite-hover-card-content::-webkit-scrollbar {
    width: 6px;
}

.theme-dark .rag-cite-hover-card-content::-webkit-scrollbar-track {
    background: var(--header-bg, #1f1f1f);
}

.theme-dark .rag-cite-hover-card-content::-webkit-scrollbar-thumb {
    background: var(--border-color, #333);
    border-radius: 3px;
}
