/*
 * New Color Theme Override
 * Feature flag: FEATUREFLAG_NEW_THEME
 *
 * Replaces green accent color (#5b9c64) with PicoCSS blue (#0172ad)
 * on client-facing pages. Admin/monkeydance nav stays green.
 *
 * Color mapping:
 *   #5b9c64 -> #0172ad  (primary)
 *   #4b8252 -> #015887  (dark accent)
 *   #528c5a -> #02659a  (medium accent)
 *   #78b07f -> #3db8e5  (light accent)
 *   #e6e8cd -> #fff     (monkeydance body bg)
 *   #8ab132 -> #ccc     (green border)
 *   #376b3d -> #015887  (dark green text in master)
 *
 * FUTURE: Remove the feature flag after 2026-04-18 (one month from deploy).
 * When removing, apply the blue colors directly in the source CSS files
 * using the color mapping above, then delete:
 *   1. This file (vf_theme.css) and its web/ copy
 *   2. The FEATUREFLAG_NEW_THEME row from the feature_flags DB table
 *   3. The {% flag_active "FEATUREFLAG_NEW_THEME" %} blocks in:
 *      - ruins/.../apps/clients/templates/client_base_v3.html (CSS link + body class)
 *      - ruins/.../templates/basis_crm.html (CSS link + body class)
 *      - web/.../templates/base.html (CSS link + body class)
 *   4. The body.classList check in ruins/.../media/js/feed_report.js
 *   5. The .accent-color class on the span in ruins/.../media/js/lp_check.js
 *   6. The .green class (instead of inline color) in ruins/.../apps/crawls/templates/tag_exclusion_rules.html
 */

:root {
    --theme-primary: #0172ad;
    --theme-dark: #015887;
    --theme-medium: #02659a;
    --theme-light: #3db8e5;
    --theme-primary-70: rgba(1, 114, 173, 0.7);
    --theme-bg: #f0f7ff;
    --theme-border: #ccc;
}


/* ============================================ */
/*  vf_master overrides (3.0 / 4.0)             */
/* ============================================ */

/* Body background (monkeydance) */
body { background-color:#fff; background-image:none; }

/* Base link hover (was #376b3d dark green) */
a:hover { color:var(--theme-dark); }

/* Utility classes */
.bright6 { color:var(--theme-primary); }
.greentxt { color:var(--theme-primary) !important; }
.greenbdr { border-color:var(--theme-primary) !important; }
.green { color:var(--theme-primary); }

/* Symbolset icon .green */
span[class*="ss-"].green, [class*="ss-"].green span { color:var(--theme-primary); }

/* Icon div ss- icons (rgba green -> rgba blue) */
.icondivss > span[class*="ss-"] { color:var(--theme-primary-70) !important; }

/* Definition term */
.dl-term { color:var(--theme-primary); }

/* Icon buttons */
a.iconbutt.seledit { color:var(--theme-primary) !important; }
a.iconbutt:active { border-color:var(--theme-primary) !important; }
a.iconbutt span[class*="ss-"]:not(.noimportant) { color:var(--theme-primary) !important; }
a.iconbutt span[class*="ss-"].green { color:var(--theme-primary) !important; }
a.iconbutt.enable span[class*="ss-"] { color:var(--theme-primary) !important; }
.iconbutt.selected-feed { border-color:var(--theme-primary) !important; }
a.iconbutt.toggle.on { color:var(--theme-primary) !important; }
a.iconbutt.greentxt { color:var(--theme-primary) !important; }
a.iconbutt.helpl:hover, .iconbutt.helpl:hover { border-color:var(--theme-primary) !important; }
a.iconbutt.disguise:hover span[class*="ss-"] { color:var(--theme-primary) !important; }
a.iconbutt.subtle:hover span[class*="ss-"] { color:var(--theme-primary) !important; }

/* Green button */
button.buttblack.buttgreen, a.buttblack.buttgreen { background-color:var(--theme-primary); }

/* Tooltips */
.qtip_vf_ib { background:var(--theme-primary); }

/* Select menus */
select.melo { color:var(--theme-primary); }
select.melo2 { color:var(--theme-primary); }

/* Highlighted divs (monkeydance bg + green border) */
.hlitediv { background-color:var(--theme-bg); border-color:var(--theme-border); }
.hlitedivnm { background-color:var(--theme-bg); border-color:var(--theme-border); }
.featbox { background:var(--theme-bg); }
.info { background:var(--theme-bg); border-color:var(--theme-border); }
p.info { background:var(--theme-bg); }

/* Error fieldset bg */
fieldset p.errors { background-color:var(--theme-bg); }

/* Help sections (in @media blocks too) */
.fm-help h2 { color:var(--theme-primary); }
.fm-help span.inp { color:var(--theme-primary); }
.fm-help li span[class*="ss-"] { color:var(--theme-primary); }


/* ============================================ */
/*  vf_clients_v3 / v4 overrides                */
/* ============================================ */

/* Utility class */
.green { color:var(--theme-primary) !important; }

/* Page title icon */
h1 span.ss-icon { color:var(--theme-primary); }

/* Links */
a { color:var(--theme-primary); }
a.subtle-icon:hover span[class*="ss-"] { color:var(--theme-primary); }

/* Form headings */
fieldset.newforms h2 { color:var(--theme-primary); }

/* Breadcrumbs */
#navtop_sub p.breadcrumbs a:not(.disabled),
#navtop_sub p.breadcrumbs a:not(.disabled) span { color:var(--theme-primary); }
#navtop_sub div.breadcrumbs a { color:var(--theme-primary); }
#navtop_sub .bcrumb_crawl_select .hoverblack:not(.refreshing):not(.disabled) span[class*=ss-] { color:var(--theme-primary) !important; }

/* Sitemap */
#client_sitemap li a { color:var(--theme-primary); }

/* Feed rules */
#feedrules_cont tbody .dlfeedfilelink:hover .dlfeedfile { color:var(--theme-primary); }
#feedrules_cont:not(.lessyes) thead .double-header th h2 { color:var(--theme-primary); }

/* Feed mod action values */
.fm-action-values-saved span.values-saved-on a,
.fm-action-values.required .fm-action-values-saved span.values-saved-on a.iconbutt.iblhs.seledit {
    background-color:var(--theme-primary) !important; border-color:var(--theme-primary) !important;
}
.fm-action-values-saved span.values-saved-on a:hover { border-color:var(--theme-primary) !important; }
.fm-action-values-instance { background-color:var(--theme-primary); }

/* Timed feed mods */
.feedmods .timedfeedmods .iconbutt-ni span[class*="ss-"] { color:var(--theme-primary); }
.feedmods .timedfeedmods .iconbutt span[class*="ss-"] { color:var(--theme-primary); }
.feedmods .timedfeedmods .event_widget .iconbutt { color:var(--theme-primary) !important; }

/* Category toolbar */
body.cats .toggle_toolbar a.propselected { color:var(--theme-primary) !important; }
.autocat_props h2 { color:var(--theme-primary); }

/* Crawl filter */
#crawlfilter.fs_v2 .fs_v2_option div.compare_only_div h2 { color:var(--theme-primary); }

/* User prompt / metadata headings */
table.user-prompt td h3 { color:var(--theme-primary); }
.metadata h3 { color:var(--theme-primary); }

/* Client meta select */
.client-meta-select select { color:var(--theme-primary); }


/* Rules tree enabled label */
body.rules .rules-tree .enabled span.label { color:var(--theme-primary); }


/* Feed report meta */
.feedreport #fields.fr-meta tr:not(.tableheadmod) > td { color:var(--theme-primary); }
.feedreport #fields.fr-meta tr:not(.tableheadmod) > th { color:var(--theme-primary); }


/* ============================================ */
/*  config.css overrides (higher specificity    */
/*  because config.css loads after this file)   */
/* ============================================ */

body#client fieldset.data tr.subval_header td { color:var(--theme-primary); }
body#client h2:not(.timezone) { color:var(--theme-primary) !important; }
body#client .section_header h2 { color:var(--theme-primary) !important; }
body#client .fm_edit_field .text-list-value { color:var(--theme-primary); }
body#client table.config td.value { color:var(--theme-primary); }
body#client table.config td.value input:checked { color:var(--theme-primary); }
body#client.config label.tab-button.on span.feed-status span[class*="ss-"] { color:var(--theme-primary); }
body#client fieldset.data table tr.configval.not_default .non_defaultvalue,
body#client fieldset.data table tr.configval.is_default.changed .non_defaultvalue { color:var(--theme-primary); }


/* ============================================ */
/*  vf_crm_global.css overrides                 */
/* ============================================ */

tr.tablehead.green th { background:var(--theme-primary); }
.stat-line { color:var(--theme-primary); }
body.gsm_reports p.paginator a { color:var(--theme-primary); }
body.gsm_reports img.barimgbg { background:var(--theme-primary); }
.shoppingengines_container.editable a:hover { color:var(--theme-primary); }
a.iconbutt.seledit.cse_butt.value { color:var(--theme-primary) !important; }
.feedmod_saved > * > .has_notes { color:var(--theme-primary); }
body.gsm_bid .rules-tree tr.rule_shoppingengines .collapse-msg span:not([class*=ss-]) { color:var(--theme-primary); }
.timeline .date-select a.iconbutt { color:var(--theme-primary) !important; }
table.er .sn-a { color:var(--theme-primary); }
table.er .exclusion-name { color:var(--theme-primary); }
table.er > thead > tr.tablehead, table.er > thead > tr.tablehead > th { color:var(--theme-primary); }
table.er .anyall { color:var(--theme-primary); }

/* CRM hover states (was #376b3d / #739370) */
a.perma:hover { color:var(--theme-primary); }
span.lite a:hover, #content span.lite a:hover { color:var(--theme-dark); }
span.crmlinks a:hover { color:var(--theme-dark); }
td.headrow span.crmlinks a:hover { color:var(--theme-dark); }
.headrow-dark a:hover { color:var(--theme-dark); }


/* ============================================ */
/*  vf_v4_screen.css overrides                  */
/* ============================================ */

/* .greendiv background kept green (action panels) */
.greendiv .btn:hover span[class*="ss-"] { color:var(--theme-primary) !important; }
.on-dark a.btn:hover span[class*="ss-"] { color:var(--theme-primary) !important; }
ul.feature-menu li span[class*="ss-"] { color:var(--theme-primary); }
ul.menu.lite > li a:hover { color:var(--theme-primary) !important; }
ul.menu.lite > li.selected a:hover span.ss-icon { color:var(--theme-primary) !important; }
.grid-module h3 span[class*=ss-] { color:var(--theme-primary); }
[class*="grid-hov"].grid-subt .grid-module:hover h3.h2 { color:var(--theme-primary); }
.menu_select li a:hover span[class*="ss-"] { color:var(--theme-primary); }
.menu_select li a span.aterm { color:var(--theme-primary); }
.solidbold .menu_select li.selected a span[class*="ss-"] { color:var(--theme-primary); }
#header .nav a:active { border-color:var(--theme-primary); box-shadow:0 0 3px var(--theme-primary); }
#header.stickyheadstyle #topnav_floaters { background:var(--theme-primary); }
#header:not(.stickyheadstyle) #topnav_floaters a span[class*="ss-"] { color:var(--theme-primary); }
a[class*="togglesb"]:hover span[class*="ss-"] { color:var(--theme-primary) !important; }
.detailpg .globaldiv h2.h1 span[class*="ss-"]:not(.insetxt) { color:var(--theme-primary); }
.detailpg .globaldiv h3.subtitle { color:var(--theme-primary); }
.pricing-table tr td.highlight:not(:first-child) span[class*="ss-"] { color:var(--theme-primary); }
.pricing-table tr.price-tab-bot td.highlight { color:var(--theme-primary); }
.blog_entry h1 { color:var(--theme-primary); }
.blog_entry p.req a.iconbutt:hover { color:var(--theme-primary) !important; }
.blog_entry p.req a.iconbutt:hover span[class*="ss-"] { color:var(--theme-primary) !important; }
.testie p.quote { color:var(--theme-primary); }

/* v4 heading colors */
h2 { color:var(--theme-primary); }
h2.h1 span[class*="ss-"] { color:var(--theme-primary); }
h3.h2 { color:var(--theme-primary); }


/* ============================================ */
/*  feeds_by_import.css overrides               */
/* ============================================ */

body.feed_rules .link_dropdown a:hover { color:var(--theme-primary); }
body.feed_rules .link_container span[class*="ss-"] { color:var(--theme-primary); }


/* ============================================ */
/*  vf_client_sources.css overrides             */
/* ============================================ */

.linkage_row.disabled span[class*="ss-play"] { color:var(--theme-primary) !important; }


/* ============================================ */
/*  adhoc_ai.css overrides                      */
/* ============================================ */

#fancybox-wrap .ai_history_popup .status_unreviewed .actions a.ai_button.unreviewed { color:var(--theme-primary); }


/* ============================================ */
/*  vf_crm.css overrides                        */
/* ============================================ */

.crm-client-toggles .on { color:var(--theme-primary); }
body#crm .acctmeta .ibtoolbar a.iconbutt.acctid:hover { color:var(--theme-primary) !important; }


/* ============================================ */
/*  gmc.css overrides                           */
/* ============================================ */

table.issues .iconbutt.chart_solo.checked span[class*="ss-"],
table.issues .iconbutt.chart_toggle.toggled span[class*="ss-"] { color:var(--theme-primary) !important; }


/* ============================================ */
/*  Inline style overrides (need !important)    */
/* ============================================ */

/* React mappings component */
.mapping_container .flex-container .row .col--green { color:var(--theme-primary); }
#feed_mappings_view_mode .row--header .col__value.active { color:var(--theme-primary); }

/* JS-rendered inline styles (config_account.js, lp_check.js) */
.accent-color { color:var(--theme-primary) !important; }

/* Admin/monkeydance nav (green -> blue) */
body.is_admin #headervf { background:var(--theme-medium) !important; }
body.is_admin #navtop { background-image:none !important; background-color:var(--theme-dark) !important; border-top-color:var(--theme-dark) !important; }
body.is_admin .navtop-item { border-left:1px solid var(--theme-dark) !important; border-right:1px solid var(--theme-light) !important; }
body.is_admin .navtop-item.curr { background:var(--theme-dark) !important; }
body.is_admin .navtop-item ul { border-color:var(--theme-light) !important; }
body.is_admin .navtop-item ul ul { border-color:var(--theme-light) !important; }
body.is_admin .navtop-item li a { background:var(--theme-medium) !important; border-top:1px solid var(--theme-light) !important; }
body.is_admin .navtop-item li a:hover { background:var(--theme-dark) !important; }
body.is_admin .navtop-item a { background:var(--theme-medium) !important; border-top:1px solid var(--theme-light) !important; }
body.is_admin .navtop-item a:hover { background:var(--theme-dark) !important; }
body.is_admin .navtop-item.is_admin > a { background:var(--theme-dark) !important; }
body.is_admin #navtop_sub { border-top-color:var(--theme-dark) !important; }

/* client_account_feeds_macro.html: date input */
#before_datetime { color:var(--theme-primary) !important; }

/* changealert_settings.html: preview heading */
div.preview h3 { color:var(--theme-primary) !important; }
