/* ==========================================================================
   AI News Pro - Complete Dark Mode Theme Architecture
   Supports [data-theme="dark"] and system preference with zero flash
   ainewspro.com
   ========================================================================== */

/* Dark Mode Color Variable Overrides */
[data-theme="dark"] {
    --bg-body: #090d16;
    --bg-surface: #101726;
    --bg-subtle: #141d30;
    --bg-alt: #1a253c;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --border-color: #1f2c44;
    --border-subtle: #172236;
    --border-glow: rgba(56, 189, 248, 0.25);

    --ai-blue-primary: #3b82f6;
    --ai-blue-hover: #60a5fa;
    --ai-blue-light: rgba(59, 130, 246, 0.16);
    --ai-blue-border: #1e3a8a;

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
    --shadow-dropdown: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px #243350;
    --shadow-card-hover: 0 22px 48px -10px rgba(0, 0, 0, 0.65);

    --ai-gradient-card: linear-gradient(180deg, #101726 0%, #151e33 100%);
    --ai-gradient-hero: linear-gradient(135deg, rgba(16, 23, 38, 0.95) 0%, rgba(20, 29, 48, 0.95) 100%);
}

/* Base Body & Container Adjustments */
[data-theme="dark"] body {
    background-color: var(--bg-body);
    color: var(--text-primary);
}

/* Site Logo Light/Dark Toggle */
.logo-dark {
    display: none !important;
}
.logo-light {
    display: block !important;
}
[data-theme="dark"] .logo-light {
    display: none !important;
}
[data-theme="dark"] .logo-dark {
    display: block !important;
}

/* Header & Navigation Spacing & Dark Styles */
[data-theme="dark"] .top-pulse-bar {
    background: #060911;
    border-color: #1a253a;
}
[data-theme="dark"] .ticker-headline {
    color: #e2e8f0;
}
[data-theme="dark"] .top-meta {
    color: #94a3b8;
}
[data-theme="dark"] .top-meta a {
    color: #cbd5e1;
}

[data-theme="dark"] .main-header {
    background: rgba(16, 23, 38, 0.96);
    border-color: #1f2c44;
}

[data-theme="dark"] .category-strip {
    background: #0c121e;
    border-color: #1f2c44;
}

[data-theme="dark"] .cat-pill {
    background: #141d30;
    border-color: #243350;
    color: #cbd5e1;
}
[data-theme="dark"] .cat-pill:hover,
[data-theme="dark"] .cat-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Nav Links & Hover */
[data-theme="dark"] .nav-link {
    color: #e2e8f0;
}
[data-theme="dark"] .nav-link:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
}
[data-theme="dark"] .nav-link.active {
    color: #60a5fa;
    background: transparent !important;
}
[data-theme="dark"] .nav-link.active::after {
    background: #60a5fa;
}

/* Dropdown Menus */
[data-theme="dark"] .dropdown-menu {
    background: #101726;
    border-color: #243350;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.75);
}
[data-theme="dark"] .dropdown-item {
    color: #cbd5e1;
}
[data-theme="dark"] .dropdown-item:hover {
    background: #172238;
}
[data-theme="dark"] .dropdown-title {
    color: #f8fafc;
}
[data-theme="dark"] .dropdown-sub {
    color: #94a3b8;
}
[data-theme="dark"] .dropdown-icon-box {
    background: #1a253c !important;
    border-color: #243350 !important;
}
[data-theme="dark"] .dropdown-col-title {
    color: #60a5fa;
}
[data-theme="dark"] .dropdown-footer-link {
    background: #0b0f19;
    border-color: #1f2c44;
    color: #60a5fa;
}

/* Header Buttons */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background: #eff6ff;
}
.theme-toggle-btn .sun-icon {
    display: none;
}
.theme-toggle-btn .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle-btn {
    background: #141d30;
    border-color: #243350;
    color: #e2e8f0;
}
[data-theme="dark"] .theme-toggle-btn:hover {
    border-color: #60a5fa;
    color: #38bdf8;
    background: #1a253c;
}
[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

[data-theme="dark"] .search-toggle-btn,
[data-theme="dark"] .header-saved-btn {
    background: #141d30;
    border-color: #243350;
    color: #e2e8f0;
}
[data-theme="dark"] .search-toggle-btn:hover,
[data-theme="dark"] .header-saved-btn:hover {
    border-color: #60a5fa;
    color: #38bdf8;
    background: #1a253c;
}

/* Hero Section & Articles */
[data-theme="dark"] .lead-hero-card {
    background: #101726;
    color: #f8fafc;
}
[data-theme="dark"] .lead-hero-title a {
    color: #f8fafc;
}
[data-theme="dark"] .lead-hero-excerpt {
    color: #cbd5e1;
}
[data-theme="dark"] .stacked-card {
    background: #101726;
}
[data-theme="dark"] .stacked-title a {
    color: #f8fafc;
}
[data-theme="dark"] .trending-box {
    background: #101726;
    border-color: #1f2c44;
}
[data-theme="dark"] .trending-header {
    border-color: #1f2c44;
    color: #60a5fa;
}
[data-theme="dark"] .trending-item {
    border-color: #1f2c44;
}
[data-theme="dark"] .trending-item-title {
    color: #f8fafc;
}
[data-theme="dark"] .post-card-title a {
    color: #f8fafc;
}
[data-theme="dark"] .post-card-excerpt {
    color: #94a3b8;
}
[data-theme="dark"] .post-card {
    border-color: #1f2c44;
}

/* Companies Showcase & Directory */
[data-theme="dark"] .companies-showcase-section {
    background: #0a0e18;
    border-color: #1f2c44;
}
[data-theme="dark"] .company-mini-pill {
    background: #141d30;
    border-color: #243350;
    color: #f8fafc;
}
[data-theme="dark"] .company-mini-pill:hover {
    border-color: #3b82f6;
    background: #1a253c;
}
[data-theme="dark"] .company-card {
    background: #101726 !important;
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .company-card h2 a {
    color: #f8fafc !important;
}
[data-theme="dark"] .company-card p {
    color: #94a3b8 !important;
}
[data-theme="dark"] .company-card div[style*="background:#f8fafc"] {
    background: #141d30 !important;
    border-color: #243350 !important;
}
[data-theme="dark"] .company-card strong[style*="color:var(--text-primary)"] {
    color: #f8fafc !important;
}
[data-theme="dark"] .company-card span[style*="color:var(--text-primary)"] {
    color: #f8fafc !important;
}

/* AI Model Datasheets Home & Directory Section */
[data-theme="dark"] .datasheets-home-section {
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .datasheets-home-section h2,
[data-theme="dark"] .datasheet-title {
    color: #f8fafc !important;
}
[data-theme="dark"] .datasheets-home-section p,
[data-theme="dark"] .datasheet-subtitle {
    color: #94a3b8 !important;
}

[data-theme="dark"] .model-logo-box,
[data-theme="dark"] .model-hero-logo {
    background: #141d30 !important;
    border-color: #1f2c44 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .home-model-card:hover .model-logo-box,
[data-theme="dark"] .model-card:hover .model-logo-box {
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

[data-theme="dark"] .home-model-card,
[data-theme="dark"] .model-card {
    background: #101726 !important;
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .home-model-card:hover,
[data-theme="dark"] .model-card:hover {
    background: #141d30 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}
[data-theme="dark"] .home-model-name,
[data-theme="dark"] .model-card-name {
    color: #60a5fa !important;
}
[data-theme="dark"] .home-model-org,
[data-theme="dark"] .model-card-org {
    color: #94a3b8 !important;
}

[data-theme="dark"] .datasheet-search-input {
    background: #141d30 !important;
    border-color: #243350 !important;
    color: #f8fafc !important;
}
[data-theme="dark"] .datasheet-search-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

[data-theme="dark"] .filter-pill {
    background: #141d30 !important;
    border-color: #243350 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .filter-pill:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
}
[data-theme="dark"] .filter-pill.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

[data-theme="dark"] .datasheet-footer-bar {
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .overview-link {
    color: #60a5fa !important;
}

/* Comparison Matrix Table */
[data-theme="dark"] .comparison-matrix-wrap {
    background: #101726 !important;
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .matrix-header {
    background: #141d30 !important;
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .matrix-header h3 {
    color: #f8fafc !important;
}
[data-theme="dark"] .matrix-header p {
    color: #94a3b8 !important;
}
[data-theme="dark"] .matrix-table th {
    background: #141d30 !important;
    color: #94a3b8 !important;
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .matrix-table td {
    border-color: #172236 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .matrix-table tr:hover td {
    background: #172238 !important;
}
[data-theme="dark"] .matrix-table span[style*="color:#0f172a"] {
    color: #f8fafc !important;
}

/* Single Model Datasheet Page */
[data-theme="dark"] .model-hero-card,
[data-theme="dark"] .benchmarks-card,
[data-theme="dark"] .pricing-card {
    background: #101726 !important;
    border-color: #1f2c44 !important;
}
[data-theme="dark"] .model-title-heading,
[data-theme="dark"] .benchmarks-card h2,
[data-theme="dark"] .pricing-card h2 {
    color: #f8fafc !important;
}
[data-theme="dark"] .model-hero-card p {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .spec-box,
[data-theme="dark"] .bench-item,
[data-theme="dark"] .pricing-box {
    background: #141d30 !important;
    border-color: #243350 !important;
}
[data-theme="dark"] .spec-box-value,
[data-theme="dark"] .pricing-box div[style*="font-size:1.8rem"] {
    color: #f8fafc !important;
}
[data-theme="dark"] .bench-bar-track {
    background: #243350 !important;
}
[data-theme="dark"] .source-bar {
    background: #141d30 !important;
    border-color: #243350 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .source-bar strong {
    color: #f8fafc !important;
}
[data-theme="dark"] .source-bar span {
    color: #94a3b8 !important;
}
[data-theme="dark"] .badge-license {
    background: #172238 !important;
    color: #cbd5e1 !important;
    border-color: #243350 !important;
}
[data-theme="dark"] .badge-org {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #60a5fa !important;
    border-color: #1e3a8a !important;
}
[data-theme="dark"] .badge-stichtag {
    background: rgba(217, 119, 6, 0.18) !important;
    color: #fbbf24 !important;
    border-color: #78350f !important;
}

/* Modals & Drawers */
[data-theme="dark"] .search-modal-head {
    background: #101726;
    border-color: #1f2c44;
}
[data-theme="dark"] .search-modal-body {
    background: #0b0f19;
}
[data-theme="dark"] .search-input {
    background: #141d30;
    border-color: #243350;
    color: #f8fafc;
}
[data-theme="dark"] .saved-drawer-head {
    background: #101726;
    border-color: #1f2c44;
}
[data-theme="dark"] .saved-drawer-body {
    background: #0b0f19;
}

/* Footer */
[data-theme="dark"] footer {
    background: #060911;
    border-color: #1a253a;
}
[data-theme="dark"] .footer-col-title {
    color: #f8fafc;
}
[data-theme="dark"] .footer-links a {
    color: #94a3b8;
}
[data-theme="dark"] .footer-links a:hover {
    color: #38bdf8;
}
[data-theme="dark"] .footer-bottom {
    border-color: #1a253a;
    color: #64748b;
}

/* Cookie Consent Banner */
[data-theme="dark"] .cookie-banner {
    background: #101726;
    border-color: #243350;
    color: #f8fafc;
}
