.analytics-settings-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  margin-top: 0.75rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-legal .analytics-settings-button {
  color: rgba(255, 255, 255, 0.63);
  font-size: 12px;
  margin: 0;
  padding: 4px 0;
  text-decoration: none;
}
.footer-legal .analytics-settings-button:hover { color: #f0a52c; }

/* Gold stays reserved for Donate, so the two choices share one navy style
   and carry equal weight. */
.analytics-consent-panel {
  align-items: center;
  background: #fffdf8;
  border: 1px solid #e7e0cf;
  border-radius: 1rem;
  bottom: 1rem;
  box-shadow: 0 1.2rem 3rem rgba(8, 35, 58, 0.25);
  color: #3f5167;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  left: max(1rem, calc((100vw - 1180px) / 2));
  max-width: 72rem;
  padding: 1.1rem 1.25rem;
  position: fixed;
  right: max(1rem, calc((100vw - 1180px) / 2));
  z-index: 10000;
}

.analytics-consent-panel[hidden] { display: none; }
.analytics-consent-panel:focus { outline: none; }
.analytics-consent-panel:focus-visible { outline: 3px solid #f0a52c; outline-offset: 3px; }
.analytics-consent-copy { max-width: 46rem; }
.analytics-consent-copy strong { color: #143a5c; display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.analytics-consent-copy p { font-size: 0.95rem; line-height: 1.5; margin: 0; }
.analytics-consent-copy a { color: #126d68; font-weight: 700; text-decoration: underline; text-underline-offset: 0.15em; }
.analytics-consent-copy .analytics-consent-status { color: #143a5c; font-weight: 600; margin-bottom: 0.25rem; }
.analytics-consent-actions { display: flex; flex: 0 0 auto; gap: 0.6rem; }

.analytics-consent-actions .btn {
  border: 2px solid #143a5c;
  font-size: 15px;
  justify-content: center;
  min-width: 7.5rem;
  padding: 10px 20px;
}
.analytics-consent-actions .btn:hover { transform: none; }
.analytics-consent-actions .btn:focus-visible { outline: 3px solid #f0a52c; outline-offset: 2px; }
.analytics-consent-decline { background: transparent; color: #143a5c; }
.analytics-consent-decline:hover { background: #eaf5ee; }
.analytics-consent-allow { background: #143a5c; color: #fff; }
.analytics-consent-allow:hover { background: #0e2b45; border-color: #0e2b45; }

/* On phones the panel becomes a compact bottom sheet with the two choices
   side by side, so it covers as little of the page as possible. */
@media (max-width: 760px) {
  .analytics-consent-panel {
    align-items: stretch;
    border-radius: 1rem 1rem 0 0;
    border-width: 1px 0 0;
    bottom: 0;
    flex-direction: column;
    gap: 0.75rem;
    left: 0;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    right: 0;
  }
  .analytics-consent-copy strong { font-size: 1rem; }
  .analytics-consent-copy p { font-size: 0.9rem; }
  .analytics-consent-actions { display: grid; gap: 0.5rem; grid-template-columns: 1fr 1fr; }
  .analytics-consent-actions .btn { min-width: 0; padding: 9px 12px; white-space: normal; }
}
