/* Dark palette for the Nuxt price intelligence and product pages. */

:root[data-site-theme="dark"] {
    --ink: #eef2f7;
    --muted: #a8b3c4;
    --line: #334155;
    --surface: #111827;
    --surface-soft: #1a2435;
    --amber: #fbbf24;
    --amber-dark: #f8c94d;
    --amber-pale: #3a2a0b;
    --navy: #f1f5f9;
    --green: #6ee7b7;
    --green-pale: #123b32;
    --red: #fb7185;
    --red-pale: #421d29;
    --shadow-sm: 0 8px 24px rgb(0 0 0 / .22);
    --shadow-md: 0 20px 54px rgb(0 0 0 / .38);
}

:root[data-site-theme="dark"] html,
:root[data-site-theme="dark"] body:not(.hunter-page) {
    background:
        radial-gradient(circle at 10% -10%, rgb(245 158 11 / .13), transparent 34rem),
        linear-gradient(180deg, #0d1421 0, #080d17 30rem, #080d17 100%);
    color: #eef2f7;
}

:root[data-site-theme="dark"] body:not(.hunter-page) ::selection {
    background: #fbbf24;
    color: #111827;
}

:root[data-site-theme="dark"] body:not(.hunter-page) input,
:root[data-site-theme="dark"] body:not(.hunter-page) select,
:root[data-site-theme="dark"] body:not(.hunter-page) textarea {
    border-color: #3b485c;
    background-color: #172033;
    color: #f1f5f9;
}

:root[data-site-theme="dark"] body:not(.hunter-page) input::placeholder,
:root[data-site-theme="dark"] body:not(.hunter-page) textarea::placeholder {
    color: #8794a7;
}

:root[data-site-theme="dark"] .home-page {
    --home-navy: #f1f5f9;
    --home-cream: #211a0d;
}

:root[data-site-theme="dark"] .navigation-feedback {
    background: rgb(0 0 0 / .28);
}

:root[data-site-theme="dark"] .navigation-feedback-card {
    border-color: #3a475b;
    background: rgb(23 32 51 / .97);
    color: #e2e8f0;
    box-shadow: 0 12px 34px rgb(0 0 0 / .4);
}

:root[data-site-theme="dark"] .navigation-feedback-spinner {
    border-color: #526077;
    border-top-color: #60a5fa;
}

:root[data-site-theme="dark"] .home-page .title,
:root[data-site-theme="dark"] .results-bar h2,
:root[data-site-theme="dark"] .product-detail-title,
:root[data-site-theme="dark"] .product-section-title,
:root[data-site-theme="dark"] .section-heading h2,
:root[data-site-theme="dark"] .empty-state h3 {
    color: #f1f5f9;
}

:root[data-site-theme="dark"] .home-page #updateTime,
:root[data-site-theme="dark"] .home-page .update-status,
:root[data-site-theme="dark"] .home-page .result-info {
    border-color: #334155;
    background: rgb(23 32 51 / .88);
    color: #dbe4ef;
    box-shadow: 0 8px 22px rgb(0 0 0 / .2);
}

:root[data-site-theme="dark"] .home-page .announcement-bar,
:root[data-site-theme="dark"] .announcement,
:root[data-site-theme="dark"] .auto-load-status.is-loading {
    border-color: #7a5718;
    background: linear-gradient(90deg, rgb(66 47 13 / .96), rgb(45 35 17 / .96));
    color: #f8d88a;
    box-shadow: inset 3px 0 0 #f59e0b, 0 7px 18px rgb(0 0 0 / .16);
}

:root[data-site-theme="dark"] .home-page .search,
:root[data-site-theme="dark"] .search-form input {
    border-color: #3b485c;
    background: rgb(23 32 51 / .96);
    color: #f1f5f9;
    box-shadow: 0 8px 26px rgb(0 0 0 / .24);
}

:root[data-site-theme="dark"] .home-page .search-wrapper:focus-within .search,
:root[data-site-theme="dark"] .search-form input:focus {
    border-color: #fbbf24;
    background: #172033;
    box-shadow: 0 0 0 4px rgb(251 191 36 / .16), 0 12px 32px rgb(0 0 0 / .3);
}

:root[data-site-theme="dark"] .home-page .voice-search,
:root[data-site-theme="dark"] .home-page .clear-search,
:root[data-site-theme="dark"] .home-page .hot-keywords {
    color: #9eabba;
}

:root[data-site-theme="dark"] .home-page .hot-keyword {
    color: #f5c45b;
}

:root[data-site-theme="dark"] .home-page .voice-search[aria-pressed="true"],
:root[data-site-theme="dark"] .home-page .hot-keyword:hover {
    background: #3b2b0d;
    color: #ffd66e;
}

:root[data-site-theme="dark"] .home-page .advanced-filter-toggle,
:root[data-site-theme="dark"] .filter-control-row.has-active-filters .advanced-filter-toggle {
    border-color: #3a475b;
    background:
        radial-gradient(circle at 88% 0, rgb(245 158 11 / .14), transparent 9rem),
        #111827;
    color: #e5ebf3;
    box-shadow: 0 7px 22px rgb(0 0 0 / .22);
}

:root[data-site-theme="dark"] .filter-toggle-copy strong,
:root[data-site-theme="dark"] .home-page .advanced-filters .section-title {
    color: #edf2f7;
}

:root[data-site-theme="dark"] .filter-toggle-copy small,
:root[data-site-theme="dark"] .filter-chevron,
:root[data-site-theme="dark"] .applied-filter-label {
    color: #a8b3c4;
}

:root[data-site-theme="dark"] .active-filter-clear,
:root[data-site-theme="dark"] .applied-filter-chip {
    border-color: #73541c;
    background: #2e2514;
    color: #f7cf72;
}

:root[data-site-theme="dark"] .home-page .advanced-filters {
    border-color: #4c452f;
    background:
        radial-gradient(circle at 100% 0, rgb(251 191 36 / .12), transparent 18rem),
        linear-gradient(150deg, rgb(17 24 39 / .99), rgb(26 31 39 / .96));
    box-shadow: 0 15px 38px rgb(0 0 0 / .3);
}

:root[data-site-theme="dark"] .category-toolbar .filter-btn,
:root[data-site-theme="dark"] .activity-toolbar .filter-btn,
:root[data-site-theme="dark"] .toolbar .filter-btn,
:root[data-site-theme="dark"] .home-page .activity-select,
:root[data-site-theme="dark"] .button,
:root[data-site-theme="dark"] .quick-filters button,
:root[data-site-theme="dark"] .filter-chips button {
    border-color: #445269;
    background: #172033;
    color: #dce4ee;
}

:root[data-site-theme="dark"] .category-toolbar .filter-btn:hover,
:root[data-site-theme="dark"] .activity-toolbar .filter-btn:hover,
:root[data-site-theme="dark"] .toolbar .filter-btn:hover,
:root[data-site-theme="dark"] .button:hover:not(:disabled) {
    border-color: #f4bd3d;
    background: #252a2f;
}

:root[data-site-theme="dark"] .category-toolbar .filter-btn.active,
:root[data-site-theme="dark"] .activity-toolbar .filter-btn.active,
:root[data-site-theme="dark"] .toolbar .filter-btn.active,
:root[data-site-theme="dark"] .home-page .advanced-filters .filter-btn.active {
    border-color: #fbbf24;
    background: #fbbf24;
    color: #111827;
    box-shadow: 0 7px 18px rgb(0 0 0 / .28);
}

:root[data-site-theme="dark"] .home-page .advanced-filters .signal-filter-btn,
:root[data-site-theme="dark"] .deal-filter-btn {
    border-color: #76561b;
    background: #302713;
    color: #f8d37b;
}

:root[data-site-theme="dark"] .content-card,
:root[data-site-theme="dark"] .search-panel,
:root[data-site-theme="dark"] .product-hero,
:root[data-site-theme="dark"] .product-hero-card,
:root[data-site-theme="dark"] .stat-card,
:root[data-site-theme="dark"] .card,
:root[data-site-theme="dark"] .status-message,
:root[data-site-theme="dark"] .empty-state {
    border-color: #334155;
    background: #111827;
    color: #dce4ee;
    box-shadow: 0 9px 28px rgb(0 0 0 / .24);
}

:root[data-site-theme="dark"] .home-page .card-compact {
    border-color: #334155;
    background: #111827;
    box-shadow: 0 8px 24px rgb(0 0 0 / .24);
}

:root[data-site-theme="dark"] .home-page .compact-product-title,
:root[data-site-theme="dark"] .compact-price-row.compact-price-normal,
:root[data-site-theme="dark"] .compact-status-row,
:root[data-site-theme="dark"] .stat-value,
:root[data-site-theme="dark"] .chart-detail-panel strong {
    color: #edf2f7;
}

:root[data-site-theme="dark"] .compact-low-row,
:root[data-site-theme="dark"] .compact-sub-row,
:root[data-site-theme="dark"] .product-note,
:root[data-site-theme="dark"] .price-history-note,
:root[data-site-theme="dark"] .price-label,
:root[data-site-theme="dark"] .stat-label,
:root[data-site-theme="dark"] .scan-time-value {
    color: #a8b3c4;
}

:root[data-site-theme="dark"] .home-page .compact-status-row,
:root[data-site-theme="dark"] .product-metrics div,
:root[data-site-theme="dark"] .history-summary-text,
:root[data-site-theme="dark"] .chart-detail-panel {
    border-color: #334155;
    background: #1a2435;
}

:root[data-site-theme="dark"] .home-page .compact-icon-btn,
:root[data-site-theme="dark"] .home-page .compact-icon-link,
:root[data-site-theme="dark"] .favorite-button,
:root[data-site-theme="dark"] .chart-expand-button {
    border-color: #3b485c;
    background: #1a2435;
    color: #cbd5e1;
}

:root[data-site-theme="dark"] .home-page .compact-icon-btn:hover,
:root[data-site-theme="dark"] .home-page .compact-icon-link:hover,
:root[data-site-theme="dark"] .chart-expand-button:hover {
    border-color: #fbbf24;
    background: #fbbf24;
    color: #111827;
}

:root[data-site-theme="dark"] .home-page .compact-icon-btn.active,
:root[data-site-theme="dark"] .favorite-button.active {
    border-color: #9f4052;
    background: #3b1d27;
    color: #fb7185;
}

:root[data-site-theme="dark"] .product-page .back-link {
    color: #dbe4ef;
}

:root[data-site-theme="dark"] .product-page .favorite-btn {
    border: 1px solid #3b485c;
    background: #1a2435;
    color: #dbe4ef;
}

:root[data-site-theme="dark"] .product-page .back-link:hover,
:root[data-site-theme="dark"] .product-page .back-link:focus-visible,
:root[data-site-theme="dark"] .product-page .favorite-btn:hover,
:root[data-site-theme="dark"] .product-page .favorite-btn:focus-visible {
    border-color: #fbbf24;
    color: #f8d37b;
}

/* Keep transparent product images readable without inverting the actual asset. */
:root[data-site-theme="dark"] .home-page .compact-product-image,
:root[data-site-theme="dark"] .product-detail-image,
:root[data-site-theme="dark"] .detail-image-wrap,
:root[data-site-theme="dark"] .product-card-image-wrap {
    border-color: #cbd5e1;
    background: linear-gradient(145deg, #ffffff 62%, #f3ead6 100%);
}

:root[data-site-theme="dark"] .compact-price-row.compact-price-low,
:root[data-site-theme="dark"] .compact-price-row.compact-price-good,
:root[data-site-theme="dark"] .price-value,
:root[data-site-theme="dark"] .detail-current-price strong,
:root[data-site-theme="dark"] .current-price {
    color: #fb7185;
}

:root[data-site-theme="dark"] .status-message.error {
    border-color: #7f3442;
    background: #351922;
    color: #fda4af;
}

:root[data-site-theme="dark"] .stat-scan-today,
:root[data-site-theme="dark"] .price-insight.positive,
:root[data-site-theme="dark"] .price-badge.best {
    border-color: #256b59;
    background: #123b32;
    color: #8ce8c6;
}

:root[data-site-theme="dark"] .stat-scan-today .stat-label,
:root[data-site-theme="dark"] .stat-scan-today .stat-value,
:root[data-site-theme="dark"] .price-insight.positive,
:root[data-site-theme="dark"] .price-badge.best {
    color: #8ce8c6;
}

:root[data-site-theme="dark"] .stat-scan-old,
:root[data-site-theme="dark"] .price-badge.near,
:root[data-site-theme="dark"] .auto-load-status.is-loading {
    border-color: #73541c;
    background: #302713;
    color: #f8d37b;
}

:root[data-site-theme="dark"] .history-chart-wrap {
    border-color: #334155;
    background: linear-gradient(180deg, #111827, #0d1523);
}

:root[data-site-theme="dark"] .chart-grid line {
    stroke: #334155;
}

:root[data-site-theme="dark"] .chart-grid text,
:root[data-site-theme="dark"] .chart-dates text {
    fill: #9eabba;
}

:root[data-site-theme="dark"] .chart-latest-dot,
:root[data-site-theme="dark"] .chart-active-dot {
    fill: #111827;
}

:root[data-site-theme="dark"] .history-table-wrap {
    border-color: #334155;
}

:root[data-site-theme="dark"] .history-table th,
:root[data-site-theme="dark"] .history-table td,
:root[data-site-theme="dark"] .price-change-item {
    border-bottom-color: #2b374a;
}

:root[data-site-theme="dark"] .history-table th {
    background: #1a2435;
    color: #b4bfce;
}

:root[data-site-theme="dark"] .bottom-info-bar,
:root[data-site-theme="dark"] .bottom-info-bar.affiliate-only,
:root[data-site-theme="dark"] .pwa-install-tip {
    border-color: #3d4b61;
    background: rgb(23 32 51 / .98);
    color: #dce4ee;
    box-shadow: 0 14px 38px rgb(0 0 0 / .46);
}

:root[data-site-theme="dark"] .bottom-info-bar .pwa-install-text,
:root[data-site-theme="dark"] .bottom-affiliate-note,
:root[data-site-theme="dark"] .bottom-affiliate-note summary,
:root[data-site-theme="dark"] .bottom-affiliate-note-body {
    color: #c6d0dc;
}

:root[data-site-theme="dark"] .bottom-affiliate-note summary::after,
:root[data-site-theme="dark"] .bottom-info-bar.affiliate-only .bottom-affiliate-note summary::after,
:root[data-site-theme="dark"] .bottom-info-bar .pwa-dismiss-btn,
:root[data-site-theme="dark"] .bottom-info-bar.affiliate-only .pwa-dismiss-btn {
    background: #2a3649;
    color: #edf2f7;
}

:root[data-site-theme="dark"] .back-to-top,
:root[data-site-theme="dark"] .load-more,
:root[data-site-theme="dark"] .primary-action,
:root[data-site-theme="dark"] .button.primary {
    border-color: #fbbf24;
    background: #fbbf24;
    color: #111827;
}

@media (hover: hover) {
    :root[data-site-theme="dark"] .home-page .voice-search:hover,
    :root[data-site-theme="dark"] .home-page .clear-search:hover {
        background: #1e293b;
        color: #f1f5f9;
    }

    :root[data-site-theme="dark"] .home-page .card-compact:hover {
        border-color: #c99120;
        box-shadow: 0 16px 38px rgb(0 0 0 / .4);
    }
}
