/* ============================================
   EAGLE VISION UNIFIED DARK MODE STYLES
   ============================================
   Include this file in all pages for consistent dark mode support.
   Uses [data-theme="dark"] selector to match the app's theme system.
*/

/* ============================================
   BASE COLORS & VARIABLES
   ============================================ */
:root {
    --ev-bg-primary: #ffffff;
    --ev-bg-secondary: #f9fafb;
    --ev-bg-tertiary: #f3f4f6;
    --ev-text-primary: #111827;
    --ev-text-secondary: #6b7280;
    --ev-text-muted: #9ca3af;
    --ev-border-color: #e5e7eb;
    --ev-border-light: #f3f4f6;
    --ev-shadow: rgba(0, 0, 0, 0.1);
    --ev-primary: #3b82f6;
    --ev-primary-hover: #2563eb;
    --ev-accent: #8b5cf6;
}

[data-theme="dark"] {
    --ev-bg-primary: #111827;
    --ev-bg-secondary: #1f2937;
    --ev-bg-tertiary: #374151;
    --ev-text-primary: #f9fafb;
    --ev-text-secondary: #d1d5db;
    --ev-text-muted: #9ca3af;
    --ev-border-color: #374151;
    --ev-border-light: #4b5563;
    --ev-shadow: rgba(0, 0, 0, 0.3);
    --ev-primary: #3b82f6;
    --ev-primary-hover: #60a5fa;
    --ev-accent: #a78bfa;
}

/* ============================================
   BODY & BASE ELEMENTS
   ============================================ */
[data-theme="dark"] body {
    background: #111827 !important;
    background-image: none !important;
    color: #f9fafb !important;
}

[data-theme="dark"] {
    color-scheme: dark;
}

/* Force all text to be readable */
[data-theme="dark"],
[data-theme="dark"] * {
    color: inherit;
}

[data-theme="dark"] body,
[data-theme="dark"] main,
[data-theme="dark"] article,
[data-theme="dark"] section,
[data-theme="dark"] div,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] li,
[data-theme="dark"] label {
    color: #e5e7eb;
}

/* ============================================
   COMMON LAYOUT ELEMENTS
   ============================================ */

/* Headers */
[data-theme="dark"] .search-header,
[data-theme="dark"] .page-header,
[data-theme="dark"] .selector-header,
[data-theme="dark"] header {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

/* Sidebars & Panels */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .sermon-sidebar,
[data-theme="dark"] .sermon-sidebar-panel,
[data-theme="dark"] .panel,
[data-theme="dark"] #searchPanel,
[data-theme="dark"] #bookmarksPanel,
[data-theme="dark"] #notesPanel,
[data-theme="dark"] #settingsPanel {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #f9fafb;
}

/* Cards & Containers */
[data-theme="dark"] .card,
[data-theme="dark"] .result-card,
[data-theme="dark"] .sermon-card,
[data-theme="dark"] .continue-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-content,
[data-theme="dark"] .popover {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #f9fafb;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

/* Inputs, Textareas, Selects */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #9ca3af !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Search Input Container */
[data-theme="dark"] .search-input-container {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .search-input-container:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
}

/* ============================================
   BUTTONS
   ============================================ */

/* Secondary/Ghost Buttons */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .quick-action-btn,
[data-theme="dark"] button:not(.btn-primary):not([class*="bg-blue"]):not([class*="bg-green"]):not([class*="bg-red"]) {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .quick-action-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* Toggle Switches */
[data-theme="dark"] .toggle-switch {
    background: #4b5563;
}

[data-theme="dark"] .toggle-switch.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* ============================================
   SEARCH PAGE SPECIFIC
   ============================================ */

/* Search Toggle Container */
[data-theme="dark"] .search-toggle-container {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .search-toggle-item {
    background: #374151;
    color: #e5e7eb;
}

[data-theme="dark"] .search-toggle-item:hover {
    background: #4b5563;
}

[data-theme="dark"] .search-toggle-item.active {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af40 100%);
    border-color: #3b82f6;
}

/* Quick Filter Chips */
[data-theme="dark"] .quick-filter-chip {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

[data-theme="dark"] .quick-filter-chip:hover {
    background: #4b5563;
    border-color: #6b7280;
}

[data-theme="dark"] .quick-filter-chip.active {
    background: #1e40af;
    border-color: #3b82f6;
    color: white;
}

/* Results */
[data-theme="dark"] .search-result,
[data-theme="dark"] .result-item {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .search-result:hover,
[data-theme="dark"] .result-item:hover {
    background: #374151;
    border-color: #4b5563;
}

/* ============================================
   SERMON COUNT BADGES
   ============================================ */

[data-theme="dark"] .sermon-count-badge {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .sermon-count-badge:hover {
    background: rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .sermon-count-badge-desktop {
    background: #374151 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .sermon-count-badge-desktop span {
    color: #e5e7eb !important;
}

[data-theme="dark"] .sermon-count-badge-desktop span:first-of-type {
    color: #60a5fa !important;
    font-weight: 600;
}

/* Input Context Badge (above input box) */
[data-theme="dark"] .input-context-badge {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .input-context-badge span,
[data-theme="dark"] .input-context-badge button {
    color: #60a5fa !important;
}

[data-theme="dark"] .input-context-badge button:hover {
    color: #ef4444 !important;
}

/* Five-fold badge specific styling */
[data-theme="dark"] #fiveFoldBadge {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #c084fc !important;
}

[data-theme="dark"] #fiveFoldBadge:hover {
    background: rgba(168, 85, 247, 0.3) !important;
}

/* Ask Across badge specific styling */
[data-theme="dark"] #askAcrossBadge {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] #askAcrossBadge:hover {
    background: rgba(245, 158, 11, 0.3) !important;
}

/* ============================================
   RESPONSE META INFO
   ============================================ */

[data-theme="dark"] .response-meta-info {
    border-top-color: #374151 !important;
    color: #9ca3af !important;
}

[data-theme="dark"] .response-meta-info small {
    color: #9ca3af !important;
}

/* ============================================
   OUTLINE MODE
   ============================================ */

.message-content.outline-mode h1,
.message-content.outline-mode h2,
.message-content.outline-mode h3,
.message-content.outline-mode h4,
.message-content.outline-mode h5,
.message-content.outline-mode h6 {
    border-left: 3px solid #3b82f6;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

[data-theme="dark"] .message-content.outline-mode h1,
[data-theme="dark"] .message-content.outline-mode h2,
[data-theme="dark"] .message-content.outline-mode h3,
[data-theme="dark"] .message-content.outline-mode h4,
[data-theme="dark"] .message-content.outline-mode h5,
[data-theme="dark"] .message-content.outline-mode h6 {
    border-left-color: #60a5fa;
}

.message-content.outline-mode ul,
.message-content.outline-mode ol {
    border-left: 2px solid #e5e7eb;
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

[data-theme="dark"] .message-content.outline-mode ul,
[data-theme="dark"] .message-content.outline-mode ol {
    border-left-color: #374151;
}

.message-content.outline-mode blockquote {
    border-left: 4px solid #fbbf24;
    background: #fef3c7;
    padding: 0.75rem;
    margin: 1rem 0;
}

[data-theme="dark"] .message-content.outline-mode blockquote {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* ============================================
   STUDY MODE SPECIFIC
   ============================================ */

/* Study Container */
[data-theme="dark"] .study-mode-container,
[data-theme="dark"] #studyModeContainer {
    background: #111827 !important;
    color: #f9fafb;
}

/* Selection View */
[data-theme="dark"] .selection-view,
[data-theme="dark"] #selectionView {
    background: #111827 !important;
}

[data-theme="dark"] .sermon-selector {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

/* Sermon List */
[data-theme="dark"] .sermon-list-item {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

[data-theme="dark"] .sermon-list-item:hover {
    background: #374151;
}

[data-theme="dark"] .sermon-list-item.selected,
[data-theme="dark"] .sermon-list-item.active {
    background: #1e40af30;
    border-color: #3b82f6;
}

/* Study Content Area */
[data-theme="dark"] .study-content,
[data-theme="dark"] .sermon-content,
[data-theme="dark"] #sermonContent {
    background: #1f2937;
    color: #e5e7eb;
}

/* Highlights - preserve highlight colors but adjust for dark background */
[data-theme="dark"] .highlight-yellow { background: rgba(250, 204, 21, 0.4) !important; }
[data-theme="dark"] .highlight-green { background: rgba(34, 197, 94, 0.4) !important; }
[data-theme="dark"] .highlight-blue { background: rgba(59, 130, 246, 0.4) !important; }
[data-theme="dark"] .highlight-pink { background: rgba(236, 72, 153, 0.4) !important; }
[data-theme="dark"] .highlight-orange { background: rgba(249, 115, 22, 0.4) !important; }

/* Toolbar */
[data-theme="dark"] .study-toolbar,
[data-theme="dark"] #toolbar,
[data-theme="dark"] #studyToolbar {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .study-toolbar .toolbar-content {
    background: #1f2937 !important;
}

[data-theme="dark"] .study-toolbar .back-btn {
    color: #9ca3af !important;
}

[data-theme="dark"] .study-toolbar .back-btn:hover {
    background: #374151 !important;
    color: #f3f4f6 !important;
}

[data-theme="dark"] .study-toolbar .sermon-title-compact {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .study-toolbar .sermon-meta-compact {
    color: #9ca3af !important;
}

[data-theme="dark"] .study-toolbar .highlight-label {
    color: #d1d5db !important;
}

[data-theme="dark"] .study-toolbar .tool-btn {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

[data-theme="dark"] .study-toolbar .tool-btn:hover {
    background: #4b5563 !important;
    border-color: #6b7280 !important;
}

[data-theme="dark"] .study-toolbar .tool-btn span,
[data-theme="dark"] .study-toolbar .tool-btn-label {
    color: #e5e7eb !important;
}

[data-theme="dark"] .study-toolbar .toolbar-left,
[data-theme="dark"] .study-toolbar .toolbar-center,
[data-theme="dark"] .study-toolbar .toolbar-right {
    color: #e5e7eb !important;
}

[data-theme="dark"] .study-toolbar svg {
    stroke: currentColor;
}

/* Study Toolbar in Ask The Message */
[data-theme="dark"] #studyToolbar {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] #studyToolbar input,
[data-theme="dark"] #studyToolbar select {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

[data-theme="dark"] #studyToolbar input::placeholder {
    color: #9ca3af !important;
}

[data-theme="dark"] #studyToolbar button {
    color: #e5e7eb !important;
}

/* Specific button styles in studyToolbar */
[data-theme="dark"] #studyToolbar #saveStudySet {
    background: #2563eb !important;
    color: white !important;
}

[data-theme="dark"] #studyToolbar #loadStudySet,
[data-theme="dark"] #studyToolbar #resumeLastSession {
    background: #374151 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] #studyToolbar #loadStudySet:hover,
[data-theme="dark"] #studyToolbar #resumeLastSession:hover {
    background: #4b5563 !important;
}

[data-theme="dark"] #studyToolbar #guidedPromptsToggle {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #c4b5fd !important;
}

[data-theme="dark"] #studyToolbar #toggleOutlineMode {
    background: #374151 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] #studyToolbar #showStudyStats {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] #studyInfoToggle {
    color: #d1d5db !important;
}

[data-theme="dark"] #studyInfoToggle:hover {
    color: #f3f4f6 !important;
    background: #4b5563 !important;
}

[data-theme="dark"] #studyInfoToggle svg {
    stroke: #d1d5db !important;
}

[data-theme="dark"] #studyInfoToggle:hover svg {
    stroke: #f3f4f6 !important;
}

[data-theme="dark"] #studyToolbar .guided-btn {
    background: #374151 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] #studyToolbar .guided-btn:hover {
    background: #4b5563 !important;
}

/* Guided Prompts Dropdown */
[data-theme="dark"] #guidedPromptsDropdown {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

/* Continue Studying Section */
[data-theme="dark"] .continue-studying-section {
    background: linear-gradient(135deg, #422006 0%, #78350f 100%) !important;
    border-color: #92400e !important;
}

[data-theme="dark"] .continue-studying-section .section-title {
    color: #fbbf24 !important;
}

[data-theme="dark"] .continue-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

/* Recently Viewed Section */
[data-theme="dark"] .recently-viewed-section .section-title,
[data-theme="dark"] .favorites-section .section-title {
    color: #e5e7eb !important;
}

[data-theme="dark"] .recent-card,
[data-theme="dark"] .favorite-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .recent-card:hover,
[data-theme="dark"] .favorite-card:hover {
    border-color: #6b7280 !important;
}

[data-theme="dark"] .recent-card-title,
[data-theme="dark"] .favorite-card-title {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .recent-card-meta,
[data-theme="dark"] .favorite-card-meta {
    color: #9ca3af !important;
}

/* Search and Filters Container */
[data-theme="dark"] .search-filters-container {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .sermon-search,
[data-theme="dark"] .filter-dropdown {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

[data-theme="dark"] .search-icon {
    color: #9ca3af !important;
}

/* Sermon Cards in List */
[data-theme="dark"] .sermon-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .sermon-card:hover {
    border-color: #6b7280 !important;
    background: #374151 !important;
}

[data-theme="dark"] .sermon-card-title {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .sermon-card-meta,
[data-theme="dark"] .sermon-card-date {
    color: #9ca3af !important;
}

/* Sermon Display - Header */
[data-theme="dark"] .sermon-header {
    border-bottom-color: #374151 !important;
}

[data-theme="dark"] .sermon-title {
    color: #f9fafb !important;
}

[data-theme="dark"] .sermon-metadata {
    color: #9ca3af !important;
}

[data-theme="dark"] .sermon-metadata span:not(:last-child)::after {
    color: #4b5563 !important;
}

/* Sermon Display - Body */
[data-theme="dark"] .sermon-body {
    color: #e5e7eb !important;
}

[data-theme="dark"] .sermon-paragraph {
    color: #e5e7eb !important;
}

[data-theme="dark"] .paragraph-number {
    color: #6b7280 !important;
}

[data-theme="dark"] .intro-number {
    color: #60a5fa !important;
}

[data-theme="dark"] .introduction-paragraph {
    background-color: #111827 !important;
    color: #d1d5db !important;
    border-left-color: #a0522d !important;
}

[data-theme="dark"] .section-header {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .bible-reference {
    color: #d4a574 !important;
}

[data-theme="dark"] .bible-reference:hover {
    color: #daa520 !important;
    background-color: rgba(218, 165, 32, 0.2) !important;
}

/* Quick Actions */
[data-theme="dark"] .quick-action-btn {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .quick-action-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%) !important;
}

/* Section Title (general) */
[data-theme="dark"] .section-title {
    color: #e5e7eb !important;
}

/* Sermon Selector Header */
[data-theme="dark"] .sermon-selector h2 {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .selector-header h2 {
    color: #f3f4f6 !important;
}

/* Clear Button */
[data-theme="dark"] .clear-btn {
    color: #9ca3af !important;
}

[data-theme="dark"] .clear-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e5e7eb !important;
}

/* ============================================
   TABLES
   ============================================ */

[data-theme="dark"] table {
    border-color: #374151;
}

[data-theme="dark"] th {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

[data-theme="dark"] td {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

[data-theme="dark"] tr:hover td {
    background: #374151;
}

/* ============================================
   MODALS & OVERLAYS
   ============================================ */

[data-theme="dark"] .modal-backdrop,
[data-theme="dark"] .overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .modal,
[data-theme="dark"] .modal-content {
    background: #1f2937 !important;
    border-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .modal-header {
    border-color: #374151;
}

[data-theme="dark"] .modal-footer {
    border-color: #374151;
    background: #111827;
}

/* ============================================
   SCROLLBARS
   ============================================ */

[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1f2937;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ============================================
   TEXT COLORS
   ============================================ */

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f9fafb !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span:not([class*="bg-"]),
[data-theme="dark"] div:not([class*="bg-"]) {
    color: #e5e7eb;
}

[data-theme="dark"] .text-gray-400 {
    color: #9ca3af !important;
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-600 {
    color: #9ca3af !important;
}

[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800 {
    color: #d1d5db !important;
}

[data-theme="dark"] .text-gray-900 {
    color: #f9fafb !important;
}

/* Override any black text */
[data-theme="dark"] .text-black,
[data-theme="dark"] [style*="color: black"],
[data-theme="dark"] [style*="color: #000"],
[data-theme="dark"] [style*="color:#000"],
[data-theme="dark"] [style*="color: rgb(0, 0, 0)"] {
    color: #f9fafb !important;
}

/* ============================================
   BORDERS
   ============================================ */

[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-300 {
    border-color: #374151 !important;
}

[data-theme="dark"] .border-gray-100 {
    border-color: #4b5563 !important;
}

/* ============================================
   BACKGROUNDS
   ============================================ */

[data-theme="dark"] .bg-white {
    background-color: #1f2937 !important;
}

[data-theme="dark"] .bg-gray-50 {
    background-color: #111827 !important;
}

[data-theme="dark"] .bg-gray-100 {
    background-color: #1f2937 !important;
}

[data-theme="dark"] .bg-gray-200 {
    background-color: #374151 !important;
}

/* ============================================
   GRADIENTS
   ============================================ */

[data-theme="dark"] .search-title {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   TOASTS & NOTIFICATIONS
   ============================================ */

[data-theme="dark"] .toast {
    background: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .toast.success {
    background: #065f46;
}

[data-theme="dark"] .toast.error {
    background: #991b1b;
}

[data-theme="dark"] .toast.warning {
    background: #92400e;
}

[data-theme="dark"] .toast.info {
    background: #1e40af;
}

/* ============================================
   LINKS
   ============================================ */

[data-theme="dark"] a {
    color: #60a5fa;
}

[data-theme="dark"] a:hover {
    color: #93c5fd;
}

/* ============================================
   SHADOWS
   ============================================ */

[data-theme="dark"] .shadow,
[data-theme="dark"] .shadow-md,
[data-theme="dark"] .shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

/* ============================================
   LOADING SPINNERS
   ============================================ */

[data-theme="dark"] .spinner {
    border-color: #4b5563;
    border-top-color: #3b82f6;
}

/* ============================================
   EMPTY STATES
   ============================================ */

[data-theme="dark"] .empty-state {
    color: #9ca3af;
}

[data-theme="dark"] .empty-state-icon {
    opacity: 0.4;
}

/* ============================================
   CHAT MESSAGES (ASK THE MESSAGE)
   ============================================ */

[data-theme="dark"] .assistant-message {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .assistant-message h1 {
    color: #f3f4f6 !important;
    border-bottom-color: #374151 !important;
}

[data-theme="dark"] .assistant-message h2 {
    color: #e5e7eb !important;
}

[data-theme="dark"] .assistant-message h3 {
    color: #d1d5db !important;
}

[data-theme="dark"] .assistant-message h4,
[data-theme="dark"] .assistant-message h5,
[data-theme="dark"] .assistant-message h6 {
    color: #d1d5db !important;
}

[data-theme="dark"] .assistant-message p,
[data-theme="dark"] .assistant-message li,
[data-theme="dark"] .assistant-message span {
    color: #e5e7eb !important;
}

[data-theme="dark"] .assistant-message strong {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .assistant-message code {
    background: #111827 !important;
    color: #60a5fa !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .assistant-message pre {
    background: #111827 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .assistant-message pre code {
    color: #e5e7eb !important;
}

[data-theme="dark"] .user-message {
    background-color: #1e40af !important;
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .user-message .message-content {
    color: white !important;
}

[data-theme="dark"] .user-message .message-content * {
    color: white !important;
}

[data-theme="dark"] .message-content {
    color: inherit !important;
}

/* Message text bubbles */
[data-theme="dark"] .message-text {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] .user-message .message-text {
    background-color: #1e40af !important;
    color: white !important;
}

[data-theme="dark"] .assistant-message .message-text {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
}

/* Tab buttons */
[data-theme="dark"] .tab-button,
[data-theme="dark"] .semantic-search-tab {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

[data-theme="dark"] .tab-button.active,
[data-theme="dark"] .semantic-search-tab.active {
    background: #1e40af !important;
    color: white !important;
}

[data-theme="dark"] .tab-button:hover,
[data-theme="dark"] .semantic-search-tab:hover {
    background: #4b5563 !important;
}
