/* public/site-measurement.css: the website measurement notice and the
   "Cookie settings" button of hogmatix.com's public pages
   (public/site-measurement.js, docs/SITE_MEASUREMENT.md). Its colours are the
   page's own: the report pages' tokens (--paper, --ink, --line, --accent),
   else the other pages' (--bg, --text, --matrix-border, --rep-accent), else
   dark, which is the default; [data-theme="light"] overrides. */

.hgx-measure {
  --hm-bg: var(--paper, var(--bg, #141413));
  --hm-ink: var(--ink, var(--text, #ecebe4));
  --hm-muted: var(--muted, var(--text-muted, #a3a29a));
  --hm-line: var(--line, var(--matrix-border, #34342f));
  --hm-accent: var(--accent, var(--rep-accent, #d98276));
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  box-sizing: border-box;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 16px;
  background: var(--hm-bg);
  color: var(--hm-ink);
  border: 1px solid var(--hm-line);
  border-top: 2px solid var(--hm-accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  font: 15px/1.5 var(--sans, var(--font-body, "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif));
  text-align: left;
}

[data-theme="light"] .hgx-measure {
  --hm-bg: var(--paper, var(--bg, #ffffff));
  --hm-ink: var(--ink, var(--text, #20201e));
  --hm-muted: var(--muted, var(--text-muted, #666661));
  --hm-line: var(--line, var(--matrix-border, #deded8));
  --hm-accent: var(--accent, var(--rep-accent, #963c36));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.hgx-measure p {
  margin: 0 0 10px;
  color: var(--hm-ink);
}

.hgx-measure-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.hgx-measure button {
  box-sizing: border-box;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  font: inherit;
  font-weight: 500;
  color: var(--hm-ink);
  background: transparent;
  border: 1px solid var(--hm-line);
  cursor: pointer;
}

.hgx-measure button.hgx-measure-primary {
  color: var(--hm-bg);
  background: var(--hm-ink);
  border-color: var(--hm-ink);
}

.hgx-measure button:hover { border-color: var(--hm-accent); }

.hgx-measure a {
  color: var(--hm-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hgx-measure a:hover { color: var(--hm-ink); }

.hgx-measure :focus-visible,
[data-measurement-settings]:focus-visible {
  outline: 2px solid var(--hm-accent, currentColor);
  outline-offset: 2px;
}

/* The footer's "Cookie settings": a button that reads like the links beside it. */
button[data-measurement-settings] {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Beside the static pages' footer links, which sit 12px apart. */
footer > button[data-measurement-settings] { margin: 0 12px; color: var(--text-muted, inherit); }
footer > button[data-measurement-settings]:hover { color: var(--text, inherit); }

@media (max-width: 480px) {
  .hgx-measure { left: 12px; right: 12px; bottom: 12px; padding: 12px 14px; font-size: 14px; }
  .hgx-measure button { min-height: 44px; }
}
