/**
 * AI SEO NEGARNOVIN — Dark Mode CSS for all frontend blocks.
 * v9.4.0
 *
 * Uses @media (prefers-color-scheme: dark) to automatically switch all
 * frontend blocks to a dark theme when the user's OS / browser is in dark mode.
 * All properties use !important to override plugin defaults.
 *
 * Targets:
 *   - .aiseo-reading-toc
 *   - .aiseo-featured-snippet
 *   - .aiseo-auto-faq-pro
 *   - .aiseo-comparison-table-wrap
 *   - .aiseo-tech-specs
 *   - .aiseo-zero-click
 *   - .aiseo-ai-answer-block
 *   - .aiseo-entity
 *   - .aiseo-llm-view
 *   - .aiseo-paa-schema
 */

@media (prefers-color-scheme: dark) {

    /* ===== Reading TOC ===== */
    .aiseo-reading-toc {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-reading-toc h2,
    .aiseo-reading-toc h3,
    .aiseo-reading-toc .aiseo-toc-title {
        color: #f1f5f9 !important;
        border-color: #475569 !important;
    }
    .aiseo-reading-toc a,
    .aiseo-reading-toc li {
        color: #cbd5e1 !important;
    }
    .aiseo-reading-toc a:hover {
        color: #818cf8 !important;
    }

    /* ===== Featured Snippet ===== */
    .aiseo-featured-snippet {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #475569 !important;
    }
    .aiseo-featured-snippet h2,
    .aiseo-featured-snippet h3,
    .aiseo-featured-snippet .aiseo-snippet-title {
        color: #f1f5f9 !important;
    }
    .aiseo-featured-snippet p,
    .aiseo-featured-snippet li,
    .aiseo-featured-snippet span {
        color: #e2e8f0 !important;
    }
    .aiseo-featured-snippet a {
        color: #818cf8 !important;
    }

    /* ===== Auto FAQ Pro ===== */
    .aiseo-auto-faq-pro {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-auto-faq-pro h2,
    .aiseo-auto-faq-pro h3,
    .aiseo-auto-faq-pro .aiseo-faq-question {
        color: #f1f5f9 !important;
    }
    .aiseo-auto-faq-pro .aiseo-faq-answer,
    .aiseo-auto-faq-pro p {
        color: #cbd5e1 !important;
    }
    .aiseo-auto-faq-pro .aiseo-faq-item {
        background: #0f172a !important;
        border-color: #334155 !important;
    }

    /* ===== Comparison Table ===== */
    .aiseo-comparison-table-wrap {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-comparison-table-wrap h2,
    .aiseo-comparison-table-wrap h3 {
        color: #f1f5f9 !important;
    }
    .aiseo-comparison-table-wrap table,
    .aiseo-comparison-table-wrap th,
    .aiseo-comparison-table-wrap td {
        background: #0f172a !important;
        color: #e2e8f0 !important;
        border-color: #334155 !important;
    }
    .aiseo-comparison-table-wrap th {
        background: #334155 !important;
        color: #f1f5f9 !important;
    }

    /* ===== Tech Specs ===== */
    .aiseo-tech-specs {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-tech-specs h2,
    .aiseo-tech-specs h3 {
        color: #f1f5f9 !important;
    }
    .aiseo-tech-specs dt {
        color: #94a3b8 !important;
    }
    .aiseo-tech-specs dd {
        color: #e2e8f0 !important;
    }
    .aiseo-tech-specs li {
        color: #cbd5e1 !important;
    }

    /* ===== Zero Click ===== */
    .aiseo-zero-click {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #475569 !important;
    }
    .aiseo-zero-click h2,
    .aiseo-zero-click h3 {
        color: #f1f5f9 !important;
    }
    .aiseo-zero-click p,
    .aiseo-zero-click li {
        color: #e2e8f0 !important;
    }
    .aiseo-zero-click a {
        color: #818cf8 !important;
    }

    /* ===== AI Answer Block ===== */
    .aiseo-ai-answer-block {
        background: linear-gradient(135deg, #1e293b, #0f172a) !important;
        color: #f1f5f9 !important;
        border-color: #475569 !important;
    }
    .aiseo-ai-answer-block h2,
    .aiseo-ai-answer-block h3 {
        color: #f1f5f9 !important;
    }
    .aiseo-ai-answer-block p,
    .aiseo-ai-answer-block li {
        color: #e2e8f0 !important;
    }
    .aiseo-ai-answer-block .aiseo-answer-source {
        background: rgba(129, 140, 248, 0.1) !important;
        color: #818cf8 !important;
    }

    /* ===== Entity ===== */
    .aiseo-entity {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-entity h2,
    .aiseo-entity h3,
    .aiseo-entity .aiseo-entity-name {
        color: #f1f5f9 !important;
    }
    .aiseo-entity .aiseo-entity-desc,
    .aiseo-entity p {
        color: #cbd5e1 !important;
    }
    .aiseo-entity .aiseo-entity-link {
        color: #818cf8 !important;
    }

    /* ===== LLM View ===== */
    .aiseo-llm-view body,
    body.aiseo-llm-view {
        background: #0f172a !important;
        color: #f1f5f9 !important;
    }
    .aiseo-llm-container {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-llm-header {
        background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
        color: #fff !important;
    }
    .aiseo-llm-tldr {
        background: #422006 !important;
        border-right-color: #f59e0b !important;
        color: #fde68a !important;
    }
    .aiseo-llm-facts {
        background: #172554 !important;
        border-right-color: #3b82f6 !important;
    }
    .aiseo-llm-facts dt {
        color: #93c5fd !important;
    }
    .aiseo-llm-facts dd {
        color: #dbeafe !important;
    }
    .aiseo-llm-toc {
        background: #052e16 !important;
        border-right-color: #16a34a !important;
    }
    .aiseo-llm-toc li {
        color: #86efac !important;
    }
    .aiseo-llm-section {
        border-bottom-color: #334155 !important;
    }
    .aiseo-llm-h2 {
        color: #f1f5f9 !important;
        border-bottom-color: #6366f1 !important;
    }
    .aiseo-llm-content {
        color: #e2e8f0 !important;
    }
    .aiseo-llm-content strong {
        background: #422006 !important;
        color: #fde68a !important;
    }
    .aiseo-llm-product {
        background: #0f172a !important;
        border-color: #334155 !important;
    }
    .aiseo-llm-faq-item {
        background: #422006 !important;
        border-color: #f59e0b !important;
    }
    .aiseo-llm-faq-q {
        color: #fde68a !important;
    }
    .aiseo-llm-faq-a {
        color: #fef3c7 !important;
    }
    .aiseo-llm-keywords .aiseo-keyword {
        background: #1e1b4b !important;
        color: #a5b4fc !important;
        border-color: #4338ca !important;
    }
    .aiseo-llm-image {
        background: #0f172a !important;
        border-color: #334155 !important;
    }
    .aiseo-llm-image figcaption {
        color: #94a3b8 !important;
    }
    .aiseo-llm-footer {
        background: #0f172a !important;
        border-top-color: #334155 !important;
    }
    .aiseo-llm-back {
        background: #6366f1 !important;
        color: #fff !important;
    }
    .aiseo-llm-generated {
        color: #64748b !important;
    }

    /* ===== PAA Schema (People Also Ask) ===== */
    .aiseo-paa-schema {
        background: #1e293b !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-paa-schema h2,
    .aiseo-paa-schema h3 {
        color: #f1f5f9 !important;
    }
    .aiseo-paa-schema .aiseo-paa-question {
        background: #0f172a !important;
        color: #f1f5f9 !important;
        border-color: #334155 !important;
    }
    .aiseo-paa-schema .aiseo-paa-answer,
    .aiseo-paa-schema p {
        color: #cbd5e1 !important;
    }
}
