/**
 * consent.css — ANPD consent banner (landing-consent-and-analytics-gateway).
 *
 * Equal-prominence rule (design Decision 3): "Aceitar" and "Recusar" share one
 * button class with identical size/weight/shape — neither is a primary CTA. All
 * styles are external (CSP-safe; no inline style= / \3c style>).
 */

.consent-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  /* Above the sticky CTA bar (z-index 60): the consent gate must never be
   * obstructed. Paired with the body.consent-open rule below, which suppresses
   * the CTA entirely while a decision is pending. */
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
  font-family: "DM Sans", system-ui, sans-serif;
}

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

/* While the consent gate is pending (body.consent-open, toggled by
 * consent-banner.js), the sticky CTA bar must not compete with — or intercept
 * pointer events over — the banner. Higher specificity than
 * .sticky-cta-bar--hidden, so it wins regardless of the CTA script's own state
 * (no toggle race with sticky-cta.js's IntersectionObserver). */
body.consent-open .sticky-cta-bar {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.consent-banner__text {
  flex: 1 1 22rem;
  min-width: 16rem;
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.5;
}

.consent-banner__link {
  color: #1d6fbc;
  text-decoration: underline;
  white-space: nowrap;
}

.consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

/* One class for BOTH buttons — equal visual weight (ANPD equal-prominence). */
.consent-banner__btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  min-width: 7rem;
  border: 1px solid #1d6fbc;
  border-radius: 0.5rem;
  background: #fff;
  color: #1d6fbc;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.consent-banner__btn:hover {
  background: #1d6fbc;
  color: #fff;
}

.consent-banner__btn:focus-visible {
  outline: 2px solid #1d6fbc;
  outline-offset: 2px;
}

/* Footer reconfiguration link — quiet, matches the existing footer link tone. */
.consent-reconfigure-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}

@media (width <= 640px) {
  .consent-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .consent-banner__actions {
    justify-content: stretch;
  }

  .consent-banner__btn {
    flex: 1 1 0;
  }
}
