/* DL Red Fix – força fundo vermelho e texto branco onde houver fundo branco em botões/badges/barras
   Feito para funcionar "por cima" do tema e plugins.  */

:root{
  --dlfix-red:#d90429;
  --dlfix-red-strong:#b90323;
  --dlfix-red-soft:#ef233c;
  --dlfix-on:#ffffff;
}

/* 1) Botões e links com estilo de botão (WordPress, WooCommerce e comuns) */
.wp-element-button,
.wp-block-button__link,
a.wp-block-button__link,
a.button, .button, button, input[type="submit"], input[type="button"], input[type="reset"],
.woocommerce a.button, .woocommerce button.button, .woocommerce .button,
.wc-block-components-button, .wc-block-cart__submit-button, .wc-block-checkout__actions .wp-element-button,
.nav .cta,
.pad a.button,
.badge, .label, .tag, .pill,
/* Classes do tema: */
.card .pad a.button,
.header .nav a.cta {
  background: var(--dlfix-red) !important;
  color: var(--dlfix-on) !important;
  border-color: rgba(0,0,0,.2) !important;
}
.wp-element-button:hover,
.wp-block-button__link:hover,
a.button:hover, .button:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce .button:hover,
.wc-block-components-button:hover,
.header .nav a.cta:hover,
.badge:hover, .label:hover, .tag:hover, .pill:hover {
  background: var(--dlfix-red-strong) !important;
  color: var(--dlfix-on) !important;
}

/* 2) Qualquer elemento marcado com "fundo branco" pelas classes padrão do WP */
[class*="has-white-background-color"],
.has-white-background-color,
.wp-block-group.has-white-background-color,
.wp-block-columns.has-white-background-color,
.wp-block-cover.has-white-background-color {
  background: var(--dlfix-red) !important;
  color: var(--dlfix-on) !important;
}

/* 3) Elementos com estilo inline apontando para branco (#fff, #ffffff, rgb(255,255,255)) */
[style*="background:#fff"], [style*="background: #fff"],
[style*="background-color:#fff"], [style*="background-color: #fff"],
[style*="background:#ffffff"], [style*="background: #ffffff"],
[style*="background-color:#ffffff"], [style*="background-color: #ffffff"],
[style*="rgb(255, 255, 255)"] {
  background: var(--dlfix-red) !important;
  color: var(--dlfix-on) !important;
}

/* 4) Avisos/caixas do WooCommerce (inclui “Já tem cadastro?” no checkout) */
.woocommerce-info, .woocommerce-message, .woocommerce-error,
.wc-block-components-notice-banner, .woocommerce-store-notice,
.woocommerce-form-login, .woocommerce-form-register,
.woocommerce-ResetPassword, .woocommerce-notices-wrapper .notice,
.woocommerce .woocommerce-notices-wrapper .woocommerce-message,
.woocommerce .woocommerce-notices-wrapper .woocommerce-info {
  background: var(--dlfix-red) !important;
  color: var(--dlfix-on) !important;
  border-color: rgba(0,0,0,.25) !important;
}
.woocommerce form .form-row label,
.woocommerce form .form-row .required,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-error::before {
  color: var(--dlfix-on) !important;
}

/* 5) Badges/pílulas específicas (ex.: "Novo Lançamento") */
.badge,
.badge[class],
span.badge {
  background: var(--dlfix-red) !important;
  color: var(--dlfix-on) !important;
  border-radius: 999px !important;
  padding: .25rem .75rem !important;
  font-weight: 600;
}

/* 6) Banners do login (wp-login.php) */
body.login #loginform, body.login .message, body.login .success, body.login .notice {
  background: var(--dlfix-red) !important;
  color: var(--dlfix-on) !important;
  border: 1px solid rgba(0,0,0,.25) !important;
  box-shadow: 0 10px 20px rgba(0,0,0,.25) !important;
}
body.login #loginform .input,
body.login label {
  color: #111 !important;
}
body.login #loginform p.submit .button-primary {
  background: var(--dlfix-red-strong) !important;
  border-color: rgba(0,0,0,.25) !important;
  color: var(--dlfix-on) !important;
  text-shadow: none !important;
}

/* 7) Títulos/barras com fundo branco padrão do tema */
.card > .pad > h1, .card > .pad > h2, .card > .pad > h3, .card > .pad > h4, .card > .pad > h5 {
  /* se algum tema aplicar branco ao título como "barra", nós corrigimos */
  background: transparent !important; /* evita branco sólido em título */
  color: var(--dlfix-on) !important;
}

/* 8) Correções de contraste para links dentro de áreas vermelhas */
.woocommerce-info a, .woocommerce-message a, .woocommerce-error a,
.badge a, .notice a, .wp-element-button a, .button a {
  color: #ffffff !important;
  text-decoration: underline;
}
