.analytics-consent[hidden],
.analytics-consent__manage[hidden] {
  display: none;
}

.analytics-consent,
.analytics-consent *,
.analytics-consent *::before,
.analytics-consent *::after {
  box-sizing: border-box;
}

.analytics-consent {
  position: fixed;
  z-index: 1200;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  display: flex;
  max-width: 46rem;
  align-items: center;
  gap: 1rem;
  margin-inline: auto;
  padding: 0.625rem 0.75rem 0.625rem 1rem;
  border: 1px solid rgba(var(--brand-navy-rgb), 0.22);
  border-radius: var(--radius-control);
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  color: var(--brand-navy);
}

.analytics-consent__copy {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font: 400 0.9375rem/1.4 var(--font-body);
  color: var(--brand-navy);
}

.analytics-consent__copy a {
  color: var(--brand-navy);
  text-underline-offset: 3px;
  white-space: nowrap;
}

.analytics-consent__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.analytics-consent__actions button,
.analytics-consent__manage {
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--brand-navy);
  border-radius: var(--radius-control);
  background: #FFFFFF;
  color: var(--brand-navy);
  font: 700 0.875rem/1.2 var(--font-heading);
  white-space: nowrap;
  cursor: pointer;
}

.analytics-consent__actions .analytics-consent__allow {
  min-width: 64px;
  background: var(--brand-navy);
  color: #FFFFFF;
}

.analytics-consent__actions button:hover,
.analytics-consent__manage:hover {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.analytics-consent__actions button:focus-visible,
.analytics-consent__manage:focus-visible {
  outline: 3px solid var(--brand-navy);
  outline-offset: 3px;
}

.analytics-consent__manage {
  margin-top: 0.75rem;
}

/* Phones: a compact two-line strip, not a panel. */
@media (max-width: 640px) {
  .analytics-consent {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    padding: 0.625rem 0.75rem;
  }

  .analytics-consent__copy {
    flex-basis: 100%;
    font-size: 0.875rem;
  }

  .analytics-consent__actions {
    width: 100%;
  }

  .analytics-consent__actions button {
    flex: 1 1 0;
  }
}
