/* The Apocalypse — the optional-analytics consent panel.
   Loaded by the three pages that can carry analytics (the writing app, the museum and the privacy
   page). js/analytics.js renders the panel, and only after its host gate passes, so a native bundle
   or any other host shows none of it. Colours are the shared tokens app.css and museum.css already
   define, so the panel sits in the page's own palette without a redesign. */

/* The Analytics settings controls live inside existing page furniture; the script only reveals them
   once it has confirmed it may run here, so they are never visible in a native build. The wrapper
   hides whatever label or separator sits with the control, and the bare selector hides a control
   that is not wrapped. */
html:not(.apoc-analytics) .apoc-settings-item,
html:not(.apoc-analytics) [data-analytics-settings] { display: none !important; }

.apoc-settings-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.apoc-settings-link:hover { color: var(--ink); }

.apoc-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(var(--ink-rgb), .42);
}
.apoc-consent-overlay[hidden] { display: none; }

.apoc-consent-card {
  width: min(440px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 20px 22px 18px;
  border: 1px solid rgba(var(--ink-rgb), .12);
  border-radius: 10px;
  background: var(--panel, #fff);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: .95rem;
  line-height: 1.55;
}

.apoc-consent-title { margin: 0 0 8px; font-size: 1.06rem; }
.apoc-consent-text { margin: 0 0 10px; }
.apoc-consent-state { margin: 0 0 4px; color: var(--muted); font-size: .85rem; }

/* The two choices are the same size on purpose: allowing is never the easier button to hit. */
.apoc-consent-actions { display: flex; gap: 10px; margin: 14px 0 12px; }
.apoc-consent-btn {
  flex: 1 1 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(var(--ink-rgb), .22);
  border-radius: 8px;
  background: var(--paper-b, #f6f2e9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.apoc-consent-btn:hover { border-color: var(--teal); }

.apoc-consent-link { color: var(--teal); font-size: .86rem; }
