/* CAROLYN AUCTIONS — PUBLIC THEME FIX (32 palettes)
   Applied last, AFTER legacy CSS files with hard-coded red/black and !important.
   Uses allowlisted values generated server-side in includes/header.php.
   Does NOT recolor sold/error/success/warning status semantics. */

/* Consistent theme tokens across the old and rebuilt views. */
:root {
  --ca-red: var(--brand-primary) !important;
  --ca-theme-soft: var(--brand-light);
  accent-color: var(--brand-primary);
}
::selection { background:var(--brand-primary); color:#fff; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline-color:var(--brand-primary) !important;
}

/* Site chrome: white navigation with vivid accent and branded actions. */
#mainNav { border-top:4px solid var(--brand-primary) !important; }
#mainNav a.nav-link.nav-active,
#mainNav a.nav-link:hover,
.nav-active,
.ca-util-item:hover,
.util-link i { color:var(--brand-primary) !important; }
#mainNav a.nav-link.nav-active,
#mainNav a.nav-link:hover { border-bottom-color:var(--brand-primary) !important; }
#mainNav a[href*="register"],#mainNav .nav-register,
#mainNav a[href*="signup"] {
  background:var(--brand-primary) !important;
  border-color:var(--brand-primary) !important;
  color:#fff !important;
}
#mainNav a[href*="register"]:hover,#mainNav .nav-register:hover,
#mainNav a[href*="signup"]:hover { background:var(--brand-hover) !important; }
.ca-util-link:hover, .ca-util-item:hover { color:var(--brand-primary) !important; }

/* Homepage: distinct hero and section surface for EVERY theme. */
.ca-home { background:var(--brand-light) !important; }
.ca-home-hero {
  background:linear-gradient(114deg,var(--brand-light) 0%,var(--brand-light) 50%,#fff 100%) !important;
  border-bottom-color:var(--brand-primary) !important;
}
.ca-home-left h1 em,.ca-home h1 em,.ca-dot,
.ca-home-metrics span:first-child b,.ca-process-metrics span:first-child strong,
.ca-home-process-list li:not(.ca-step-ok)>b,
.ca-home-process-bottom a:not(:first-child) i,
.ca-home-process-head .ca-dot {
  color:var(--brand-primary) !important;
}
.ca-home-feature-grid .ca-feature-icon,.ca-home-features a>span,
.ca-home-process-list li:not(.ca-step-ok)>b,
.ca-protection-panel li b {
  background:var(--brand-light) !important;
  color:var(--brand-primary) !important;
}
.ca-home-process,.ca-protection-panel {
  border-top:3px solid var(--brand-primary) !important;
}
.ca-feature:hover,.ca-home-features a:hover,.ca-category-tile:hover,.ca-make-tile:hover {
  border-color:var(--brand-primary) !important;
}
.ca-home-hero .ca-home-find:focus-within,
.ca-home-hero .ca-home-search:focus-within { border-color:var(--brand-primary) !important; }
.ca-home-process-list li:not(.ca-step-ok) { border-left:2px solid var(--brand-light) !important; }
.ca-home-process-list li:not(.ca-step-ok):hover { border-left-color:var(--brand-primary) !important; }
.ca-section-head { border-bottom-color:var(--brand-primary) !important; }
.ca-section-head>a:hover { color:var(--brand-primary) !important; }
.ca-category-tile span,.ca-make-tile span { color:var(--brand-primary) !important; }
.ca-section-white { background:#fff !important; }

/* Main calls-to-action, including hard-coded buttons in later CSS. */
.btn-buy,.btn-primary,.btn-red:not(.btn-danger),
.ca-btn-red,.ca-btn-primary,.ca-primary-btn,.ca-home-cta,
.ca-home-find button,.ca-home-search button,
.ca-home-process-bottom a:first-child,.ca-panel-actions a:first-child,
.ca-buy-button,.ca-btn-buy,button.ca-buy-now,
.ca-purchase-panel .ca-buy-button,.ca-footer-buy,
.ca-bid-submit,.ca-detail-top-price a,
[data-ca-primary-action] {
  background:var(--brand-primary) !important;
  background-image:none !important;
  border-color:var(--brand-primary) !important;
  color:#fff !important;
}
.btn-buy:hover,.btn-primary:hover,.btn-red:not(.btn-danger):hover,
.ca-btn-red:hover,.ca-btn-primary:hover,.ca-primary-btn:hover,
.ca-home-find button:hover,.ca-home-search button:hover,
.ca-buy-button:hover,.ca-btn-buy:hover,button.ca-buy-now:hover,
.ca-footer-buy:hover,.ca-bid-submit:hover,.ca-detail-top-price a:hover,
[data-ca-primary-action]:hover { background:var(--brand-hover) !important; }
.btn-bid:hover,.btn-outline:hover,.ca-bid-inputs input:focus,
.input-field:focus,.ca-buy-button:focus-visible { border-color:var(--brand-primary) !important; }

/* Listings, bidding, auction tabs and pricing accents. */
.ca-vehicle-card:hover,.ca-listing-grid .ca-vehicle-card:hover {
  border-color:var(--brand-primary) !important;
}
.ca-vehicle-bids>div:first-child strong,
.ca-vehicle-price-top,.ca-vehicle-bottom,
.ca-detail-related h3 a,.ca-detail-related-item small,
.ca-detail-nav a:first-child,.ca-detail-nav a:hover,
.ca-purchase-panel .ca-purchase-price {
  color:var(--brand-primary) !important;
}
.ca-vehicle-time:not(.ca-sold),.ca-purchase-price-tag {
  background:var(--brand-primary) !important;
  color:#fff !important;
}
.auction-tabs a.active,.auction-tabs a[aria-current="page"],
.ca-tab-active,.tab-btn.tab-active {
  background:var(--brand-primary) !important;
  border-color:var(--brand-primary) !important;
  color:#fff !important;
}
.auction-tabs a:not(.active):hover,.ca-detail-nav a:hover {
  border-color:var(--brand-primary) !important;
  color:var(--brand-primary) !important;
}
.ca-detail-sidebar-actions a:hover,.ca-detail-related-item:hover {
  border-color:var(--brand-primary) !important;
}

/* Footer: visibly changes from red/white to each palette's own ink and accent. */
footer.ca-footer,.ca-footer {
  background:var(--brand-ink) !important;
  border-top:4px solid var(--brand-primary) !important;
  color:#fff !important;
}
.ca-footer-upper { border-bottom-color:rgba(255,255,255,.18) !important; }
.ca-footer-upper h2,.ca-footer-columns h3,
.ca-footer-assurances b,.ca-footer h3,.ca-footer strong {
  color:#fff !important;
}
.ca-footer p,.ca-footer small,.ca-footer span,
.ca-footer a:not(.ca-footer-buy),.ca-footer-columns h4,
.ca-footer-columns>div>a:not(.ca-footer-contact),
.ca-footer-contact,.ca-footer-track {
  color:rgba(255,255,255,.77) !important;
}
.ca-footer a:not(.ca-footer-buy):hover { color:#fff !important; }
.ca-footer .ca-dot,.ca-footer-contact i { color:var(--brand-primary) !important; }
.ca-footer-contact i { background:rgba(255,255,255,.12) !important; }
.ca-footer-watermark { color:rgba(255,255,255,.045) !important; }
.ca-footer-copyright {
  background:var(--brand-hover) !important;
  border-top-color:rgba(255,255,255,.15) !important;
}
.ca-footer-copyright .ca-container,.ca-footer-copyright a,
.ca-footer-copyright span { color:#fff !important; }
/* Keep status chips legible/semantic instead of turning all of them white. */
.ca-footer .ca-footer-status { color:#16693e !important; }
.ca-footer .ca-footer-status.ca-offline { color:#5d6470 !important; }

/* Hover interactions: tone without changing functionality, layout or real statuses. */
.ca-category-tile:focus-visible,.ca-vehicle-card:focus-within {
  outline:2px solid var(--brand-primary);
  outline-offset:2px;
}
@media (prefers-reduced-motion: reduce) {
  .ca-vehicle-card,.ca-category-tile { transition:none !important; }
}
