/**
 * engajamento.css — RevisaCursos
 * Caixa de newsletter e banner de consentimento de cookies.
 */

/* ---------------------------------------------------------------
 * Newsletter
 * ------------------------------------------------------------ */
.newsletter-box {
  margin-top: 3rem;
  padding: 1.75rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
}

.newsletter-box__title {
  margin: 0 0 0.375rem;
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.newsletter-box__sub {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.newsletter-box__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.newsletter-box__input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
}

.newsletter-box__input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.newsletter-box .btn-pill {
  border: none;
  border-radius: var(--radius-md);
}

.newsletter-box .btn-pill:disabled { opacity: 0.6; cursor: progress; }

.newsletter-box__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

.newsletter-box__consent input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.newsletter-box__consent a {
  color: hsl(var(--primary));
  text-decoration: underline;
}

.newsletter-box__hp { position: absolute; left: -9999px; }

.newsletter-box__aviso {
  min-height: 1.25em;
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
}

.newsletter-box__aviso.is-ok { color: hsl(var(--primary)); }
.newsletter-box__aviso.is-erro { color: #b42318; }

/* ---------------------------------------------------------------
 * Banner de cookies
 * ------------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 30rem;
  margin-left: auto;
  padding: 1.125rem 1.25rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -12px hsl(var(--brand-dark) / 0.25);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner__texto {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

.cookie-banner__texto strong { color: hsl(var(--foreground)); }

.cookie-banner__texto a {
  color: hsl(var(--primary));
  text-decoration: underline;
}

.cookie-banner__acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cookie-banner .btn-pill {
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
}

.btn-ghost {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  background: none;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

.btn-ghost:hover { background: hsl(var(--secondary)); }

/* Botão do rodapé para revogar/rever o consentimento. */
.cookie-prefs {
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-prefs:hover { color: hsl(var(--primary)); }

/* No rodapé o botão precisa se comportar como os links vizinhos. */
.site-footer__links .cookie-prefs:hover { color: #fff; }

/* v3.5 */
.cookie-banner__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: -0.25rem 0 0;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.cookie-banner__links a { color: hsl(var(--primary)); text-decoration: underline; }

.newsletter-box__legal {
  margin: 0.625rem 0 0;
  font-size: 0.75rem;
}
.newsletter-box__legal a {
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.newsletter-box__legal a:hover { color: hsl(var(--primary)); }
