/**
 * Consent banner.
 *
 * Theme-agnostic. Every value is a --fca-* custom property with a neutral
 * fallback, so a project restyles the banner by declaring those properties
 * anywhere in its own stylesheet and never has to touch or override this file:
 *
 *     :root {
 *       --fca-bg: #0d1b2a;
 *       --fca-accent: #29abe2;
 *       --fca-accent-ink: #0a1622;
 *     }
 *
 * A bar at the bottom rather than a centred modal: a modal over an article is
 * the pattern readers have learned to dismiss without reading, and on a phone
 * it covers the content entirely.
 */

:root {
  --fca-bg: #14181d;
  --fca-ink: #f2f5f8;
  --fca-muted: #a8b4c0;
  --fca-line: #2b333c;
  --fca-accent: #ff5722;
  --fca-accent-ink: #ffffff;
  --fca-radius: 0.5rem;
  --fca-max: 1240px;
  --fca-z: 2147483000; /* above sticky bars and most third-party widgets */
}

.fca-consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--fca-z);
  padding: 0.875rem 1rem calc(0.875rem + env(safe-area-inset-bottom));
  background: var(--fca-bg);
  color: var(--fca-ink);
  border-top: 1px solid var(--fca-line);
  box-shadow: 0 -8px 24px -12px rgb(0 0 0 / 0.5);
  font-size: 0.875rem;
  line-height: 1.5;
}

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

.fca-consent-inner {
  max-width: var(--fca-max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.fca-consent-copy { flex: 1 1 20rem; min-width: 0; }
.fca-consent-copy strong { display: block; margin-bottom: 0.125rem; }
.fca-consent-copy p { margin: 0; color: var(--fca-muted); }
.fca-consent-copy a { color: var(--fca-accent); }

.fca-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.fca-btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--fca-radius);
  border: 1px solid transparent;
  padding: 0.5rem 1.125rem;
  /* 44px minimum touch target. */
  min-height: 2.75rem;
}

.fca-btn-primary {
  background: var(--fca-accent);
  color: var(--fca-accent-ink);
}

.fca-btn-ghost {
  background: transparent;
  color: var(--fca-ink);
  border-color: var(--fca-line);
}

.fca-btn:hover { filter: brightness(1.08); }

.fca-btn:focus-visible {
  outline: 2px solid var(--fca-accent);
  outline-offset: 2px;
}

/*
 * Decline must be as easy to hit as Accept. Regulators treat a hidden or
 * visually demoted reject as no real choice, and it is the single most common
 * reason a banner fails an audit.
 */
@media (max-width: 30rem) {
  .fca-consent-actions { width: 100%; margin-inline-start: 0; }
  .fca-btn { flex: 1 1 0; }
}
