/* CONTRASTE GLOBAL REAL
   Regra do projeto:
   - fundo escuro = texto branco
   - fundo claro = texto preto
   Este arquivo carrega por último e não mexe no fundo, apenas no contraste do texto.
*/
:root{
  --auto-text-on-light:#101828;
  --auto-text-on-dark:#ffffff;
  --auto-muted-on-light:#344054;
  --auto-muted-on-dark:rgba(255,255,255,.88);
}

html body .auto-bg-light{
  color:var(--auto-text-on-light)!important;
  -webkit-text-fill-color:var(--auto-text-on-light)!important;
}

html body .auto-bg-dark{
  color:var(--auto-text-on-dark)!important;
  -webkit-text-fill-color:var(--auto-text-on-dark)!important;
}

html body .auto-bg-light :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,label,li,td,th,legend,blockquote,figcaption,.rev-title,.rev-section-title,.section-title,.page-title,.card-title,.title,.subtitle,.description,.text,.meta,.kicker,.rev-kicker,.rev-link-more){
  color:var(--auto-text-on-light)!important;
  -webkit-text-fill-color:var(--auto-text-on-light)!important;
}

html body .auto-bg-dark :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,label,li,td,th,legend,blockquote,figcaption,.rev-title,.rev-section-title,.section-title,.page-title,.card-title,.title,.subtitle,.description,.text,.meta,.kicker,.rev-kicker,.rev-link-more){
  color:var(--auto-text-on-dark)!important;
  -webkit-text-fill-color:var(--auto-text-on-dark)!important;
}

html body .auto-bg-light :is(.muted,.text-muted,.rev-meta,.rev-card p,.rev-section-head p,.rev-empty,.description,small){
  color:var(--auto-muted-on-light)!important;
  -webkit-text-fill-color:var(--auto-muted-on-light)!important;
}

html body .auto-bg-dark :is(.muted,.text-muted,.rev-meta,.rev-card p,.rev-section-head p,.rev-empty,.description,small){
  color:var(--auto-muted-on-dark)!important;
  -webkit-text-fill-color:var(--auto-muted-on-dark)!important;
}

/* Cards de imagem sempre precisam de texto claro */
html body :is(.rev-card,.news-card,.post-card,.card-news,.destaque-card,.highlight-card,.rev-feature-card,.rev-related-grid .rev-card,.rev-category-grid .rev-card,.rev-destaque-card,.rev-destaque-slide,.story-card,.flip-card,.rev-side-card,.rev-hero,.rev-hero-slide,.rev-article-hero,.rev-page-hero){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

html body :is(.rev-card,.news-card,.post-card,.card-news,.destaque-card,.highlight-card,.rev-feature-card,.rev-related-grid .rev-card,.rev-category-grid .rev-card,.rev-destaque-card,.rev-destaque-slide,.story-card,.flip-card,.rev-side-card,.rev-hero,.rev-hero-slide,.rev-article-hero,.rev-page-hero) :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,.rev-meta,.rev-kicker,.rev-tag,.meta,.category,.card-title,.title){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Mantém etiquetas de categoria legíveis conforme o JS/CSS da categoria */
html body :is(.rev-tag,.category-badge,.cat-badge,.badge-categoria,.rev-cat-label){
  -webkit-text-fill-color:currentColor!important;
}

/* Menu e botões: respeitam variáveis já calculadas */
html body :is(.rev-mainnav-row,.rev-sticky-mainnav,.rev-menu-panel-head-pro,.rev-menu-btn,.rev-search-btn){
  color:var(--rev-menu-solid-text,var(--rev-on-primary,#fff))!important;
}

html body :is(.rev-mainnav-row,.rev-sticky-mainnav,.rev-menu-panel-head-pro,.rev-menu-btn,.rev-search-btn) :is(a,button,span,svg,path){
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Campos claros sempre com texto escuro */
html body :is(input,textarea,select,option){
  color:#101828!important;
  -webkit-text-fill-color:#101828!important;
}

/* Não estragar ícones SVG */
html body svg,
html body svg *{
  -webkit-text-fill-color:unset!important;
}
