/* consent.css: styles for consent.js, from ~/Projects/docs/compliance/cookie-consent (2026-10-28). Theme it by overriding the --cc-* properties on :root. */
/* Noriba: the site's own tokens (site.css), which already switch between dark and light. */
:root {
  --cc-bg: var(--surface-1);
  --cc-text: var(--text);
  --cc-muted: var(--text-2);
  --cc-border: var(--border);
  --cc-button-bg: var(--accent-fill);
  --cc-button-text: var(--on-accent);
  --cc-focus: var(--accent);
  --cc-radius: var(--radius-md);
  --cc-font: inherit;
}

.cc-banner,
.cc-dialog {
  font-family: var(--cc-font);
  color: var(--cc-text);
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
  line-height: 1.5;
}

/* First in reading order, shown at the bottom of the screen. It doesn't block the page. */
.cc-banner {
  position: fixed;
  z-index: 2147483000;
  inset: auto 1rem 1rem 1rem;
  max-width: 44rem;
  margin-inline: auto;
  padding: 1rem 1.25rem 1.1rem;
}

.cc-title { font-size: 1.1rem; margin: 0 0 0.35rem; }
.cc-body { margin: 0 0 0.9rem; color: var(--cc-muted); font-size: 0.95rem; }
.cc-body a, .cc-about a { color: inherit; text-decoration: underline; }

/* Every choice gets the same size and weight: refusing must be as easy as accepting. */
.cc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cc-button {
  flex: 1 1 9rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--cc-button-text);
  background: var(--cc-button-bg);
  border: 2px solid var(--cc-button-bg);
  border-radius: 999px;
  cursor: pointer;
}
.cc-button:hover { filter: brightness(1.15); }
@media (max-width: 30rem) {
  .cc-button { flex-basis: 100%; }
}

.cc-button:focus-visible,
.cc-close:focus-visible,
.cc-label input:focus-visible,
.cc-banner a:focus-visible,
.cc-dialog a:focus-visible {
  outline: 3px solid var(--cc-focus);
  outline-offset: 2px;
}

.cc-dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 1.25rem 1.25rem 1.1rem;
}
.cc-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.cc-close {
  float: right;
  width: 44px;
  height: 44px;
  margin: -0.5rem -0.5rem 0 0.5rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--cc-text);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.cc-category { padding: 0.75rem 0; border-top: 1px solid var(--cc-border); }
.cc-category:last-of-type { margin-bottom: 0.9rem; }
.cc-label { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; cursor: pointer; }
.cc-label input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--cc-button-bg); }
.cc-label input:disabled + span { cursor: default; }
.cc-about { margin: 0.25rem 0 0 1.85rem; color: var(--cc-muted); font-size: 0.92rem; }
.cc-note { font-weight: 600; color: var(--cc-text); }

@media (prefers-reduced-motion: no-preference) {
  .cc-banner { animation: cc-rise 0.25s ease-out; }
  @keyframes cc-rise { from { transform: translateY(1rem); opacity: 0; } }
}

@media print {
  .cc-banner { display: none; }
}
