/* silktide-nossx.css — identidade visual NOSSX sobre o Silktide Consent Manager.
   Carregar DEPOIS de silktide-consent-manager.css.
   Estratégia: barra fina horizontal no rodapé (não card), botões em estilo texto/borda
   com paridade visual entre Aceitar e Recusar (requisito GDPR), vermelho NOSSX só em
   detalhes pontuais (hover, foco, toggle), ícone permanente e branding Silktide ocultos
   (já temos link "Configurar cookies" no Footer).

   Hierarquia DOM Silktide:
     #stcm-wrapper > #stcm-banner | #stcm-modal | #stcm-icon | #stcm-backdrop
   Vars CSS expostas pela lib (sem prefixo --stcm-):
     --primaryColor, --backgroundColor, --textColor, --fontFamily, --boxShadow. */

/* ─── Vars base ──────────────────────────────────────────────────────────────── */

#stcm-wrapper {
  --fontFamily: var(--font-geist-sans), system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  --primaryColor: #e10600; /* só acentos: hover, foco, toggle ativo, link Preferências */
  --backgroundColor: #1a1a1a;
  --textColor: #f5f5f5;
  --boxShadow: 0 -2px 16px rgba(0, 0, 0, 0.16), 0 -1px 0 0 rgba(255, 255, 255, 0.06);
  --backdropBackgroundColor: #00000066;
  --backdropBackgroundBlur: 2px;
}

[data-theme='dark'] #stcm-wrapper {
  --primaryColor: #e10600;
  --backgroundColor: #1a1a1a;
  --textColor: #f5f5f5;
}

[data-theme='light'] #stcm-wrapper {
  --primaryColor: #c70500;
  --backgroundColor: #ffffff;
  --textColor: #1a1a1a;
  --boxShadow: 0 -2px 16px rgba(0, 0, 0, 0.08), 0 -1px 0 0 rgba(0, 0, 0, 0.06);
}

/* ─── BANNER: barra fina horizontal no rodapé, full-width ────────────────────── */

#stcm-banner,
#stcm-banner.stcm-pos-bottom-left,
#stcm-banner.stcm-pos-bottom-center,
#stcm-banner.stcm-pos-bottom-right,
#stcm-banner.stcm-pos-center {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  border-top: 1px solid rgba(127, 127, 127, 0.18) !important;
  padding: 0.875rem clamp(1rem, 3vw, 2rem) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: clamp(1rem, 3vw, 2rem) !important;
  background-color: var(--backgroundColor) !important;
  color: var(--textColor) !important;
  box-shadow: var(--boxShadow) !important;
  font-family: var(--fontFamily) !important;
}

/* Texto do banner: à esquerda, ocupa o espaço disponível */
#stcm-banner p {
  margin: 0 !important;
  flex: 1 1 auto;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--textColor);
}

/* Logo Silktide dentro do banner (se aparecer) */
#stcm-banner a.stcm-logo,
#stcm-banner .stcm-logo {
  display: none !important;
}

/* Links no banner (Política de Privacidade) */
#stcm-banner a {
  color: var(--textColor);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(127, 127, 127, 0.4);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

#stcm-banner a:hover {
  color: var(--primaryColor);
  text-decoration-color: var(--primaryColor);
}

/* ─── BOTÕES: paridade GDPR entre Aceitar e Recusar ──────────────────────────── */

#stcm-banner .stcm-actions,
#stcm-banner .stcm-actions-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin: 0 !important;
  flex: 0 0 auto;
}

#stcm-wrapper .stcm-button {
  padding: 0.5rem 1.125rem !important;
  font-family: var(--fontFamily) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  border-radius: 6px !important;
  border: 1px solid rgba(127, 127, 127, 0.32) !important;
  background: transparent !important;
  color: var(--textColor) !important;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}

/* Aceitar: fundo claro discreto (não vermelho), mesmo tamanho do Recusar */
[data-theme='dark'] #stcm-wrapper .stcm-button-primary {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

[data-theme='light'] #stcm-wrapper .stcm-button-primary {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

#stcm-wrapper .stcm-button-primary:hover {
  border-color: var(--primaryColor) !important;
  color: var(--primaryColor) !important;
}

/* Recusar: peso visual equivalente ao Aceitar (GDPR exige) */
#stcm-wrapper .stcm-button-secondary {
  background: transparent !important;
  border-color: rgba(127, 127, 127, 0.32) !important;
  color: var(--textColor) !important;
}

[data-theme='dark'] #stcm-wrapper .stcm-button-secondary:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

[data-theme='light'] #stcm-wrapper .stcm-button-secondary:hover {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.28) !important;
}

/* Preferências: link discreto (terciária — não compete com Aceitar/Recusar) */
#stcm-banner .stcm-preferences-button,
#stcm-banner .stcm-preferences-button:link,
#stcm-banner .stcm-preferences-button:visited {
  background: transparent !important;
  border: none !important;
  padding: 0.5rem 0.5rem !important;
  font-family: var(--fontFamily) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--textColor) !important;
  opacity: 0.7;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(127, 127, 127, 0.4);
  cursor: pointer;
  transition: opacity 160ms ease, color 160ms ease;
}

#stcm-banner .stcm-preferences-button span {
  color: inherit !important;
  text-decoration: inherit !important;
}

#stcm-banner .stcm-preferences-button:hover {
  opacity: 1;
  color: var(--primaryColor) !important;
  text-decoration-color: var(--primaryColor);
}

/* ─── Foco acessível: WCAG AA, contorno vermelho NOSSX ───────────────────────── */

#stcm-wrapper a:focus-visible,
#stcm-wrapper button:focus-visible,
#stcm-wrapper .stcm-button:focus-visible {
  outline: 2px solid var(--primaryColor) !important;
  outline-offset: 2px !important;
}

/* ─── MODAL de Preferências ──────────────────────────────────────────────────── */

#stcm-modal {
  border-radius: 12px !important;
  font-family: var(--fontFamily);
}

/* Título do modal em Instrument Serif italic (acento editorial NOSSX) */
#stcm-modal h1 {
  font-family: var(--font-instrument-serif), Georgia, serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em;
}

/* Toggle ativo em vermelho NOSSX (substitui amarelo padrão do template) */
#stcm-modal .stcm-toggle input:checked + .stcm-toggle-track {
  background-color: var(--primaryColor) !important;
}

/* Botões do modal seguem o mesmo padrão do banner */
#stcm-modal .stcm-button {
  border-radius: 6px;
  font-family: var(--fontFamily);
}

/* ─── ESCONDER ícone permanente e branding Silktide ──────────────────────────── */

/* Ícone permanente bottom-right: temos "Configurar cookies" no Footer cobrindo isso */
#stcm-icon,
#stcm-wrapper #stcm-icon {
  display: none !important;
}

/* "Powered by Silktide" no footer do modal */
#stcm-modal footer a.stcm-credit-link,
#stcm-modal footer .stcm-credit-link,
#stcm-modal .stcm-credit,
#stcm-modal .stcm-credit-link,
.stcm-credit-link {
  display: none !important;
}

/* ─── MOBILE: empilhar texto + botões ────────────────────────────────────────── */

@media (max-width: 720px) {
  #stcm-banner,
  #stcm-banner.stcm-pos-bottom-left,
  #stcm-banner.stcm-pos-bottom-center,
  #stcm-banner.stcm-pos-bottom-right,
  #stcm-banner.stcm-pos-center {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 1rem 1.25rem !important;
  }

  #stcm-banner p {
    text-align: left;
  }

  #stcm-banner .stcm-actions,
  #stcm-banner .stcm-actions-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #stcm-wrapper .stcm-button {
    flex: 0 0 auto;
  }
}
