/* Dark mode refinements for SellerApp plugin sections */

[data-theme="dark"] .sellerapp-sections-layout,
.sellerapp-sections-layout.dark {
    color-scheme: dark;
}

/* Keep ink panels (AI banner, footer) dark in both modes */
[data-theme="dark"] .sellerapp-sections-layout .sellerapp-section-ai-banner .bg-ink,
.sellerapp-sections-layout.dark .sellerapp-section-ai-banner .bg-ink,
#sellerapp-footer-root .sellerapp-blog-footer {
    background-color: oklch(16% 0.03 220) !important;
    color: oklch(98% 0.005 180) !important;
}

[data-theme="dark"] .sellerapp-sections-layout,
.sellerapp-sections-layout.dark {
    --brand-soft: oklch(28% 0.08 165);
    --brand-foreground: oklch(100% 0 0);
}

/* Header glass nav in dark mode */
[data-theme="dark"] #sellerapp-header-root .glass-nav,
.sellerapp-sections-layout.dark .glass-nav {
    background-color: color-mix(in oklab, oklch(14% 0.025 220) 82%, transparent) !important;
    border-color: oklch(100% 0 0 / 0.08) !important;
}

/* Header CTA — invert in dark mode */
[data-theme="dark"] #sellerapp-header-root .sellerapp-header-actions a.bg-ink,
.sellerapp-sections-layout.dark #sellerapp-header-root .sellerapp-header-actions a.bg-ink {
    background-color: var(--brand, oklch(66% 0.16 165)) !important;
    color: var(--brand-foreground, oklch(100% 0 0)) !important;
}

[data-theme="dark"] #sellerapp-header-root .sellerapp-header-actions a.bg-ink:hover,
.sellerapp-sections-layout.dark #sellerapp-header-root .sellerapp-header-actions a.bg-ink:hover {
    filter: brightness(1.08);
}

/* Hero primary buttons */
[data-theme="dark"] .sellerapp-sections-layout .bg-ink.text-background.hover\:bg-brand:hover,
.sellerapp-sections-layout.dark .bg-ink.text-background.hover\:bg-brand:hover {
    background-color: var(--brand, oklch(66% 0.16 165)) !important;
}

/* Cards on surface sections */
[data-theme="dark"] .sellerapp-sections-layout .bg-background.hairline,
.sellerapp-sections-layout.dark .bg-background.hairline {
    background-color: var(--card, oklch(18% 0.025 220)) !important;
    border-color: var(--line, oklch(100% 0 0 / 0.08)) !important;
}

[data-theme="dark"] .sellerapp-sections-layout .bg-card,
.sellerapp-sections-layout.dark .bg-card {
    background-color: var(--card, oklch(18% 0.025 220)) !important;
}

[data-theme="dark"] .sellerapp-sections-layout .bg-surface,
.sellerapp-sections-layout.dark .bg-surface {
    background-color: var(--surface, oklch(18% 0.025 220)) !important;
}

[data-theme="dark"] .sellerapp-sections-layout .bg-surface-2,
.sellerapp-sections-layout.dark .bg-surface-2 {
    background-color: var(--surface-2, oklch(22% 0.025 220)) !important;
}

/* Search pill in header */
[data-theme="dark"] #sellerapp-header-root .sellerapp-header-search-trigger,
.sellerapp-sections-layout.dark #sellerapp-header-root .sellerapp-header-search-trigger {
    background-color: var(--surface-2, oklch(22% 0.025 220)) !important;
    border-color: oklch(100% 0 0 / 0.1) !important;
}

/* Search modal */
[data-theme="dark"] #sellerapp-header-root #search-overlay .search-modal-panel,
#sellerapp-header-root.dark #search-overlay .search-modal-panel {
    background-color: var(--card, oklch(18% 0.025 220));
    border-color: var(--line, oklch(100% 0 0 / 0.08));
}

[data-theme="dark"] #sellerapp-header-root #search-overlay .search-modal-head input,
#sellerapp-header-root.dark #search-overlay .search-modal-head input {
    color: var(--foreground, oklch(98% 0.005 180));
}

[data-theme="dark"] #sellerapp-header-root #search-overlay .search-result-item:hover,
[data-theme="dark"] #sellerapp-header-root #search-overlay .search-result-item.selected,
#sellerapp-header-root.dark #search-overlay .search-result-item:hover,
#sellerapp-header-root.dark #search-overlay .search-result-item.selected {
    background: var(--surface, oklch(18% 0.025 220));
}

/* Topic cluster cards with bg-ink */
[data-theme="dark"] .sellerapp-sections-layout a.bg-ink.text-background,
.sellerapp-sections-layout.dark a.bg-ink.text-background {
    background-color: oklch(16% 0.03 220) !important;
    color: oklch(98% 0.005 180) !important;
}

/* Stats / quote section borders */
[data-theme="dark"] .sellerapp-sections-layout .border-line,
.sellerapp-sections-layout.dark .border-line {
    border-color: var(--line, oklch(100% 0 0 / 0.08)) !important;
}

[data-theme="dark"] .sellerapp-sections-layout .hairline,
.sellerapp-sections-layout.dark .hairline {
    border-color: var(--line, oklch(100% 0 0 / 0.08)) !important;
}

/* CTA gradient section — keep readable */
[data-theme="dark"] .sellerapp-sections-layout .gradient-brand,
.sellerapp-sections-layout.dark .gradient-brand {
    opacity: 1;
}
a.inline-flex.items-center.gap-2.bg-background.text-ink.font-semibold.rounded-full.pl-5.pr-4.py-3.text-sm.hover\:shadow-lift.transition-all.left-action-btn-wrap {
    color: white !important;
}