
/* ==========================================================================
   Viatura Core Engine v0.7.3.14 — VCE Visual Isolation Layer
   --------------------------------------------------------------------------
   Objetivo: isolar visualmente os componentes públicos do plugin de qualquer
   modo escuro do tema. Estratégia: "ilhas claras" fixas, com texto escuro,
   links vermelhos e color-scheme light. Esta folha é carregada no fim e também
   injetada no footer; a JS companion reforça com estilos inline quando o tema
   altera classes após o carregamento.
   ========================================================================== */

:root{
  --vce-iso-bg:#ffffff;
  --vce-iso-surface:#f8fafc;
  --vce-iso-surface-2:#f1f5f9;
  --vce-iso-text:#061326;
  --vce-iso-muted:#334155;
  --vce-iso-soft:#64748b;
  --vce-iso-border:#d7dee8;
  --vce-iso-link:#ef233c;
  --vce-iso-green:#16a34a;
  --vce-iso-yellow:#f59e0b;
  --vce-iso-red:#ef4444;
}

/* Raízes públicas do VCE: desligam a influência visual do tema. */
html body :where(
  .vce-vehicle-page,
  .vce-ficha-tecnica,
  .vce-ficha-tecnica-pro,
  .vce-public-catalog,
  .vce-catalog-wrap,
  .vce-cost-rankings-page,
  .vce-comparator,
  .vce-tco-simulator,
  .vce-siv-card,
  .vce-vehicle-related,
  .vce-vehicle-alternatives,
  .vce-vehicle-deep-links,
  .vce-intelligent-links,
  .vce-catalog-section,
  .vce-visual-isolated
){
  color-scheme:light !important;
  background-color:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
  -webkit-text-fill-color:var(--vce-iso-text) !important;
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}

/* Superfícies principais e internas sempre claras. */
html body :where(
  .vce-card,
  .vce-panel,
  .vce-theme-card,
  .vce-catalog-card,
  .vce-term-card,
  .vce-stat-card,
  .vce-catalog-section,
  .vce-comparator,
  .vce-comparator-form,
  .vce-comparator-table-wrap,
  .vce-comparator-tco-table-wrap,
  .vce-tco-simulator,
  .vce-tco-simulator-grid > div,
  .vce-tco-years span,
  .vce-ranking-table-wrap,
  .vce-ranking-seo-intro,
  .vce-ranking-highlight-card,
  .vce-ranking-hub-card,
  .vce-cost-rankings-page,
  .vce-siv-card,
  .vce-siv-explain,
  .vce-siv-profile,
  .vce-siv-profile-grid,
  .vce-siv-profile-item,
  .vce-siv-component,
  .vce-siv-scale span,
  .vce-cost-badges,
  .vce-cost-hub-links,
  .vce-vehicle-related,
  .vce-vehicle-related-list,
  .vce-vehicle-alternatives,
  .vce-vehicle-deep-links,
  .vce-related-vehicle-card,
  .vce-alternative-card,
  .vce-intelligent-links,
  .vce-intelligent-link-card,
  .vce-smart-summary,
  .vce-smart-summary-item,
  .vce-auto-highlights,
  .vce-vehicle-highlights,
  .vce-brand-costs,
  .vce-quality-card,
  .vce-quality-section,
  .vce-seo-block,
  .vce-seo-links,
  .vce-related-categories,
  .vce-quick-links,
  .vce-ranking-actions,
  .vce-internal-links,
  .vce-explore-links
){
  background:var(--vce-iso-bg) !important;
  background-color:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
  -webkit-text-fill-color:var(--vce-iso-text) !important;
  border-color:var(--vce-iso-border) !important;
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}

/* Cards de valores e subcards: superfície ligeiramente distinta, mas clara. */
html body :where(
  .vce-siv-profile-item,
  .vce-siv-component,
  .vce-tco-simulator-grid > div,
  .vce-tco-years span,
  .vce-intelligent-link-card,
  .vce-related-vehicle-card,
  .vce-alternative-card,
  .vce-ranking-highlight-card,
  .vce-ranking-hub-card,
  .vce-catalog-card,
  .vce-term-card
){
  background:var(--vce-iso-surface) !important;
  background-color:var(--vce-iso-surface) !important;
}

/* Texto textual dentro do VCE. Inclui -webkit-text-fill-color para vencer
   temas que usam essa propriedade no modo escuro. */
html body [class*="vce-"] :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,label,th,td,strong,em,small,figcaption,blockquote),
html body [class*="vce-"] :where(.vce-catalog-eyebrow,.vce-related-kicker,.vce-related-meta,.vce-ranking-note,.vce-note,.vce-catalog-lead,.vce-ft-eyebrow,.vce-catalog-version,.vce-alternative-reason,.vce-alternative-metrics),
html body [class*="vce-"] span:not(.vce-siv-profile-icon):not(.vce-dot):not(.vce-level-dot):not(.vce-icon):not(.vce-progress-track):not(.vce-progress-fill){
  color:var(--vce-iso-text) !important;
  -webkit-text-fill-color:var(--vce-iso-text) !important;
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}

/* Texto secundário controlado. */
html body [class*="vce-"] :where(p,small,em,figcaption,.vce-related-meta,.vce-ranking-note,.vce-note,.vce-catalog-lead,.vce-catalog-version){
  color:var(--vce-iso-muted) !important;
  -webkit-text-fill-color:var(--vce-iso-muted) !important;
}

/* Links VCE: vermelho da marca, exceto botões CTA. */
html body [class*="vce-"] a:not(.vce-comparator-submit):not(.vce-compare-go):not(.vce-compare-clear):not(.vce-compare-toggle),
html body [class*="vce-"] a:not(.vce-comparator-submit):not(.vce-compare-go):not(.vce-compare-clear):not(.vce-compare-toggle) *{
  color:var(--vce-iso-link) !important;
  -webkit-text-fill-color:var(--vce-iso-link) !important;
  text-decoration-color:var(--vce-iso-link) !important;
  opacity:1 !important;
}

/* Pills, chips, badges e botões secundários. */
html body :where(.vce-badge,.vce-chip,.vce-pill,.vce-ranking-actions a,.vce-quick-links a,.vce-cost-badges a,.vce-cost-hub-links a,.vce-catalog-button,.vce-button,.vce-button-secondary,.vce-tco-winner-badge,.vce-auto-highlights a,.vce-vehicle-highlights a){
  background:var(--vce-iso-bg) !important;
  background-color:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
  -webkit-text-fill-color:var(--vce-iso-text) !important;
  border:1px solid var(--vce-iso-border) !important;
  opacity:1 !important;
  filter:none !important;
  text-shadow:none !important;
}

/* CTA vermelhos. */
html body :where(.vce-comparator-submit,.vce-compare-toggle,.vce-compare-go,.vce-compare-clear,button.vce-comparator-submit,button.vce-compare-toggle){
  background:var(--vce-iso-link) !important;
  background-color:var(--vce-iso-link) !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:var(--vce-iso-link) !important;
}

/* Formulários/selects. */
html body [class*="vce-"] :where(select,input,textarea){
  color-scheme:light !important;
  background:var(--vce-iso-bg) !important;
  background-color:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
  -webkit-text-fill-color:var(--vce-iso-text) !important;
  border-color:#cbd5e1 !important;
  opacity:1 !important;
}
html body [class*="vce-"] :where(select option){
  background:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
}

/* Tabelas VCE: células claras e legíveis. */
html body [class*="vce-"] :where(table){
  background:var(--vce-iso-bg) !important;
  background-color:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
  border-color:var(--vce-iso-border) !important;
}
html body [class*="vce-"] :where(table th,table td){
  background:var(--vce-iso-bg) !important;
  background-color:var(--vce-iso-bg) !important;
  color:var(--vce-iso-text) !important;
  -webkit-text-fill-color:var(--vce-iso-text) !important;
  border-color:var(--vce-iso-border) !important;
  opacity:1 !important;
}
html body [class*="vce-"] :where(table th,tbody th,.vce-comparator-section-row th){
  background:var(--vce-iso-surface-2) !important;
  background-color:var(--vce-iso-surface-2) !important;
}

/* Barras/progressos: preservar visual, impedir que escondam texto textual. */
html body :where(.vce-siv-profile-bar,.vce-siv-component > span,.vce-progress-track){
  display:block;
  background:#e5e7eb !important;
  background-color:#e5e7eb !important;
  color:transparent !important;
  -webkit-text-fill-color:transparent !important;
  overflow:hidden;
  opacity:1 !important;
}
html body :where(.vce-siv-profile-bar i,.vce-siv-component > span i,.vce-progress-fill){
  display:block;
  background:var(--vce-iso-green) !important;
  background-color:var(--vce-iso-green) !important;
  color:transparent !important;
  -webkit-text-fill-color:transparent !important;
  opacity:1 !important;
}

/* Estados por classificação. */
html body .vce-siv-profile-expensive .vce-siv-profile-bar i{background:var(--vce-iso-red)!important;background-color:var(--vce-iso-red)!important;}
html body .vce-siv-profile-fair .vce-siv-profile-bar i{background:var(--vce-iso-yellow)!important;background-color:var(--vce-iso-yellow)!important;}

/* Ícones/emoji não devem herdar text-fill. */
html body :where(.vce-siv-profile-icon,.vce-intelligent-link-icon,.vce-dot,.vce-level-dot){
  -webkit-text-fill-color:initial !important;
  opacity:1 !important;
}

/* Proteção contra seletores comuns de modo escuro do tema. */
html[class*="dark"] body [class*="vce-"],
body[class*="dark"] [class*="vce-"],
body.dark [class*="vce-"],
body.dark-mode [class*="vce-"],
body[data-theme="dark"] [class*="vce-"],
html[data-theme="dark"] body [class*="vce-"]{
  color-scheme:light !important;
  filter:none !important;
  opacity:1 !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}


/* ==========================================================================
   v0.7.3.15 — Visual Isolation Polish
   Ajustes finais sem alterar a estratégia principal da v0.7.3.14.
   ========================================================================== */

/* Barra flutuante do comparador: é deliberadamente escura, por isso o texto
   deve ser sempre claro, independentemente do modo do tema. */
html body .vce-compare-bar,
html body .vce-compare-bar .vce-compare-bar-inner{
  background:#111111 !important;
  background-color:#111111 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}

html body .vce-compare-bar .vce-compare-count,
html body .vce-compare-bar .vce-compare-count *,
html body .vce-compare-bar span:not(.vce-dot):not(.vce-level-dot){
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}

html body .vce-compare-bar .vce-compare-clear,
html body .vce-compare-bar .vce-compare-go{
  background:#ef233c !important;
  background-color:#ef233c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:#ef233c !important;
  opacity:1 !important;
}

/* Blocos de exploração do catálogo: proteger títulos e chips contra herança do tema. */
html body .vce-seo-navigation,
html body .vce-seo-navigation *,
html body .vce-seo-block,
html body .vce-seo-block *,
html body .vce-seo-links,
html body .vce-seo-links *{
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  text-shadow:none !important;
}

html body .vce-seo-block{
  background:#ffffff !important;
  background-color:#ffffff !important;
  border-color:#d7dee8 !important;
}

html body .vce-seo-block h2{
  color:#061326 !important;
  -webkit-text-fill-color:#061326 !important;
}

html body .vce-seo-links a{
  background:#ffffff !important;
  background-color:#ffffff !important;
  color:#ef233c !important;
  -webkit-text-fill-color:#ef233c !important;
  border:1px solid #d7dee8 !important;
  border-radius:999px !important;
}

/* Garantia adicional para botões/links pequenos dentro de ilhas claras. */
html body [class*="vce-"] :where(a.vce-button,a.vce-button-secondary,.vce-pill,.vce-chip,.vce-badge){
  background:#ffffff !important;
  background-color:#ffffff !important;
  color:#061326 !important;
  -webkit-text-fill-color:#061326 !important;
  border-color:#d7dee8 !important;
}

/* Exceção: links de marca continuam em vermelho. */
html body [class*="vce-"] :where(.vce-seo-links a,.vce-ranking-actions a,.vce-cost-badges a,.vce-cost-hub-links a,.vce-quick-links a){
  color:#ef233c !important;
  -webkit-text-fill-color:#ef233c !important;
}

/* Títulos e texto em cards de navegação inteligente. */
html body :where(.vce-intelligent-links,.vce-intelligent-link-card,.vce-vehicle-deep-links,.vce-cost-badges,.vce-cost-hub-links){
  background:#ffffff !important;
  background-color:#ffffff !important;
  color:#061326 !important;
  -webkit-text-fill-color:#061326 !important;
}



/* v0.7.3.16 — Comparador UX Refinement
   Substitui os antigos badges pretos "melhor" por destaque claro, profissional e compatível com modo claro/escuro.
*/
.vce-comparator-table td.vce-best-value,
.vce-comparator-table-blocks td.vce-best-value,
.vce-comparator .vce-comparator-table td.vce-best-value,
.vce-comparator .vce-comparator-table-blocks td.vce-best-value {
    background: #eef9ef !important;
    color: #0b1f3a !important;
    -webkit-text-fill-color: #0b1f3a !important;
    border-left: 4px solid #16a34a !important;
    box-shadow: inset 0 0 0 9999px rgba(238,249,239,.78) !important;
    font-weight: 900 !important;
}

.vce-comparator-table td.vce-best-value::before,
.vce-comparator-table-blocks td.vce-best-value::before,
.vce-comparator .vce-comparator-table td.vce-best-value::before,
.vce-comparator .vce-comparator-table-blocks td.vce-best-value::before {
    content: "🥇 ";
    display: inline !important;
    margin-right: 2px !important;
    color: #0b1f3a !important;
    -webkit-text-fill-color: #0b1f3a !important;
}

.vce-comparator-table td.vce-best-value::after,
.vce-comparator-table-blocks td.vce-best-value::after,
.vce-comparator .vce-comparator-table td.vce-best-value::after,
.vce-comparator .vce-comparator-table-blocks td.vce-best-value::after {
    content: "" !important;
    display: none !important;
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* Garante que qualquer span/link dentro da célula vencedora não herda texto invisível do tema. */
.vce-comparator-table td.vce-best-value *,
.vce-comparator-table-blocks td.vce-best-value *,
.vce-comparator .vce-comparator-table td.vce-best-value *,
.vce-comparator .vce-comparator-table-blocks td.vce-best-value * {
    color: #0b1f3a !important;
    -webkit-text-fill-color: #0b1f3a !important;
}
