/* CTA "Solicitar diagnóstico" · um componente só (08/10/2026)
   Antes: contorno no menu escuro, texto solto no menu claro, pílula vermelha com ícone solto no hero e
   retângulo preto (igual aos botões secundários) no rodapé. Agora: pílula vermelha sólida, texto 600 e o
   ícone aprovado (rs-approved-diagnostico) num círculo branco. Carregado por último em todas as páginas;
   os seletores com :root vencem as camadas anteriores sem !important. */
:root {
  --cta-red: #dc1437;          /* vermelho AA: 4,6:1 com branco */
  --cta-red-hover: #b80f2e;
  --cta-ink: #ffffff;
  --cta-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---- base comum ---- */
:root .site-nav .nav-shell .nav-diagnosis,
:root .hero-center .hero-actions .hero-cta,
:root .site-footer .footer-next .footer-diagnosis {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: max-content;
  margin: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--cta-red);
  color: var(--cta-ink);
  font-family: "Rockscale Text", var(--body, system-ui), sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(220, 20, 55, 0.22);
  transition: background-color 180ms var(--cta-ease), box-shadow 180ms var(--cta-ease), transform 180ms var(--cta-ease);
}
:root .hero-center .hero-actions .hero-cta::before,
:root .hero-center .hero-actions .hero-cta::after { display: none; }
:root .hero-center .hero-actions .hero-cta .hero-cta-copy { padding: 0; font: inherit; color: inherit; letter-spacing: inherit; }

/* ícone em círculo branco */
:root .site-nav .nav-shell .nav-diagnosis b,
:root .hero-center .hero-actions .hero-cta .hero-cta-icon,
:root .site-footer .footer-next .footer-diagnosis span {
  display: grid;
  place-items: center;
  flex: none;
  margin: 0;
  border: 0;
  border-radius: 9999px;
  background: #ffffff;
  color: var(--cta-red);
  transition: transform 180ms var(--cta-ease), color 180ms var(--cta-ease);
}
:root .site-nav .nav-shell .nav-diagnosis svg,
:root .hero-center .hero-actions .hero-cta .hero-cta-icon svg,
:root .site-footer .footer-next .footer-diagnosis span svg {
  display: block;
  stroke-width: 2.25;
  transition: transform 240ms var(--cta-ease);
}

/* tamanho L: hero e rodapé */
:root .hero-center .hero-actions .hero-cta,
:root .site-footer .footer-next .footer-diagnosis {
  min-height: 64px;
  height: 64px;
  padding: 8px 8px 8px 32px;
  font-size: 16px;
}
:root .hero-center .hero-actions .hero-cta .hero-cta-icon,
:root .site-footer .footer-next .footer-diagnosis span { width: 48px; height: 48px; min-width: 48px; }
:root .hero-center .hero-actions .hero-cta .hero-cta-icon svg,
:root .site-footer .footer-next .footer-diagnosis span svg { width: 24px; height: 24px; }

/* tamanho M: menu (só a partir de 768px; no celular o CTA mora no menu aberto) */
@media (max-width: 767.98px) {
  :root .site-nav .nav-shell .nav-diagnosis { display: none; }
}
@media (min-width: 768px) {
  :root .site-nav .nav-shell .nav-diagnosis {
    min-height: 48px;
    height: 48px;
    padding: 6px 6px 6px 24px;
    font-size: 14px;
  }
  :root .site-nav .nav-shell nav + .nav-diagnosis { margin-left: 24px; }
  :root .site-nav[data-compact=true] .nav-shell .nav-diagnosis { display: none; }
  :root .site-nav .nav-shell .nav-diagnosis b { width: 36px; height: 36px; min-width: 36px; }
  :root .site-nav .nav-shell .nav-diagnosis svg { width: 18px; height: 18px; }
  /* menu claro das páginas internas: sem o divisor de link de texto */
  :root .site-nav .nav-shell .nav-diagnosis { border-left: 0; }
}

/* ---- estados ---- */
:root .site-nav .nav-shell .nav-diagnosis:hover,
:root .hero-center .hero-actions .hero-cta:hover,
:root .site-footer .footer-next .footer-diagnosis:hover {
  background: var(--cta-red-hover);
  color: var(--cta-ink);
  box-shadow: 0 12px 32px rgba(220, 20, 55, 0.32);
  transform: translateY(-2px);
}
:root .site-nav .nav-shell .nav-diagnosis:hover b,
:root .hero-center .hero-actions .hero-cta:hover .hero-cta-icon,
:root .site-footer .footer-next .footer-diagnosis:hover span {
  transform: translateX(2px);
  color: var(--cta-red-hover);
}
:root .site-nav .nav-shell .nav-diagnosis:hover svg,
:root .hero-center .hero-actions .hero-cta:hover .hero-cta-icon svg,
:root .site-footer .footer-next .footer-diagnosis:hover span svg { transform: rotate(90deg) scale(1.08); }

:root .site-nav .nav-shell .nav-diagnosis:active,
:root .hero-center .hero-actions .hero-cta:active,
:root .site-footer .footer-next .footer-diagnosis:active { transform: translateY(0) scale(.97); box-shadow: 0 4px 12px rgba(220, 20, 55, 0.2); }

:root .site-nav .nav-shell .nav-diagnosis:focus-visible,
:root .hero-center .hero-actions .hero-cta:focus-visible,
:root .site-footer .footer-next .footer-diagnosis:focus-visible { outline: 2px solid var(--cta-red); outline-offset: 4px; }
/* sobre fundo escuro (hero e menu no topo da home) o foco fica branco */
:root .is-hero-top .site-nav .nav-shell .nav-diagnosis:focus-visible,
:root.is-hero-top .site-nav .nav-shell .nav-diagnosis:focus-visible,
:root .hero-v48 .hero-actions .hero-cta:focus-visible { outline-color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  :root .site-nav .nav-shell .nav-diagnosis,
  :root .hero-center .hero-actions .hero-cta,
  :root .site-footer .footer-next .footer-diagnosis,
  :root .site-nav .nav-shell .nav-diagnosis *,
  :root .hero-center .hero-actions .hero-cta *,
  :root .site-footer .footer-next .footer-diagnosis * { transition: none; }
  :root .site-nav .nav-shell .nav-diagnosis:hover,
  :root .hero-center .hero-actions .hero-cta:hover,
  :root .site-footer .footer-next .footer-diagnosis:hover,
  :root .site-nav .nav-shell .nav-diagnosis:hover *,
  :root .hero-center .hero-actions .hero-cta:hover *,
  :root .site-footer .footer-next .footer-diagnosis:hover * { transform: none; }
}
