/* V18-DH — corrige texto fiscal invisível no dark mode */

body.flow-fiscal-hidden-text-v18dh #app {
  --v18dh-text: #f8fafc;
  --v18dh-muted: #cbd5e1;
  --v18dh-soft: #dbeafe;
  --v18dh-success: #86efac;
  --v18dh-border: rgba(148, 163, 184, .28);
}

/* Remove selo/pseudo herdado dos patches anteriores */
body.flow-fiscal-hidden-text-v18dh #app .flow-v18df-cert-ok::after,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18de-cert-box-ok::after,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dg-cert-ok::after,
body.flow-fiscal-hidden-text-v18dh #app [data-v18df-cert="ok"]::after,
body.flow-fiscal-hidden-text-v18dh #app [data-v18de-cert="ok"]::after,
body.flow-fiscal-hidden-text-v18dh #app [data-v18dg-cert="ok"]::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Neutraliza caixinhas/contornos aplicados em spans pequenos por patches antigos */
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-no-mini-box,
body.flow-fiscal-hidden-text-v18dh #app span.flow-v18df-cert-ok,
body.flow-fiscal-hidden-text-v18dh #app span.flow-v18de-cert-box-ok,
body.flow-fiscal-hidden-text-v18dh #app span.flow-v18dg-cert-ok,
body.flow-fiscal-hidden-text-v18dh #app small.flow-v18df-cert-ok,
body.flow-fiscal-hidden-text-v18dh #app small.flow-v18de-cert-box-ok,
body.flow-fiscal-hidden-text-v18dh #app small.flow-v18dg-cert-ok,
body.flow-fiscal-hidden-text-v18dh #app [data-flow-v18df-value],
body.flow-fiscal-hidden-text-v18dh #app [data-flow-v18df-label],
body.flow-fiscal-hidden-text-v18dh #app [data-flow-v18dg-value] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* Texto realmente invisível/quase invisível */
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-text,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-text * {
  color: var(--v18dh-text) !important;
  -webkit-text-fill-color: var(--v18dh-text) !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

/* Boxes de checklist/status fiscal */
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-box {
  color: var(--v18dh-text) !important;
  opacity: 1 !important;
  border-color: var(--v18dh-border) !important;
}

body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-box * {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-box .muted,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-box .text-muted,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-box small,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-readable-box p,
body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-muted {
  color: var(--v18dh-muted) !important;
  -webkit-text-fill-color: var(--v18dh-muted) !important;
  opacity: 1 !important;
}

body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-title {
  color: var(--v18dh-text) !important;
  -webkit-text-fill-color: var(--v18dh-text) !important;
  opacity: 1 !important;
  font-weight: 800 !important;
}

body.flow-fiscal-hidden-text-v18dh #app .flow-v18dh-success {
  color: var(--v18dh-success) !important;
  -webkit-text-fill-color: var(--v18dh-success) !important;
  opacity: 1 !important;
}

/* Corrige inline styles escuros comuns, somente dentro de rotas fiscais */
body.flow-fiscal-hidden-text-v18dh #app [style*="color:#0"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: #0"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color:#1"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: #1"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color:#2"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: #2"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color:#334"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: #334"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color:rgb(15"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: rgb(15"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color:rgb(17"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: rgb(17"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color:rgb(31"],
body.flow-fiscal-hidden-text-v18dh #app [style*="color: rgb(31"] {
  color: var(--v18dh-text) !important;
  -webkit-text-fill-color: var(--v18dh-text) !important;
  opacity: 1 !important;
}

/* Evita que seleção do mouse seja o único jeito de ler */
body.flow-fiscal-hidden-text-v18dh #app ::selection {
  background: rgba(59, 130, 246, .55);
  color: #ffffff;
}
