/* Shared chrome for every server-rendered page (page_chrome.dart): the site
   footer and the analytics consent banner. Colours come from the theme
   variables that index.css / dictionary.css define (and redefine under
   `.dark`), so both themes follow automatically. */

/* ── Site footer ───────────────────────────────────────────────────────── */
/* Rendered after the `.page` sheet, on the tinted page background, so it does
   not depend on each page type's padding. */
.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 28px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 16px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-3);
}
.site-footer a,
.site-footer .foot-link { color: var(--ink-3); text-decoration: none; }
.site-footer .foot-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.site-footer a:hover,
.site-footer .foot-link:hover { color: var(--ink-2); text-decoration: underline; }
.site-footer .foot-sep { opacity: .5; }

/* ── Analytics consent banner ──────────────────────────────────────────── */
/* Accept and Decline share one style on purpose: a more prominent "Accept"
   is a dark pattern under EU guidance and can void the consent. */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  z-index: 10001; /* above the bottom-fixed mobile search bar (10000) */
  padding: 18px 20px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  font-family: var(--serif);
}
.consent-banner[hidden] { display: none; }
.consent-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.consent-text a { color: var(--accent); }
.consent-actions { display: flex; justify-content: flex-end; gap: 10px; }
.consent-btn {
  min-width: 120px;
  padding: 10px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-2);
  border-radius: 22px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.consent-btn:hover { background: var(--paper-tinted); }
.consent-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  /* Keep the last footer line clear of the bottom-fixed search bar. The
     links wrap here, so drop the dots that would dangle at a line end. */
  .site-footer { padding-bottom: 96px; gap: 8px 20px; }
  .site-footer .foot-sep { display: none; }
  .consent-banner { bottom: 16px; padding: 16px; }
  .consent-btn { flex: 1 1 0; min-width: 0; }
}
