/* consent.css — 1891 consent banner (paired with consent.js).
 *
 * Uses the same `--c-*` token spine as shared/css/chrome.css so the banner
 * inherits the umbrella palette without re-declaring colors.  Falls back to
 * sensible defaults if a project hasn't pulled in tokens.css yet (a
 * Parliamentarian standalone app, e.g.).
 *
 * No JS frameworks, no CSS preprocessor.  Vanilla.
 */

.c-cb {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(640px, calc(100vw - 2rem));
  width: 100%;
  background: var(--c-surface, #ffffff);
  color: var(--c-ink, #1a1a1a);
  border: 1px solid var(--c-border, #d4d4d8);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  font-family: var(--c-font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size: 0.95rem;
  line-height: 1.4;
  animation: c-cb-rise 280ms ease-out;
}

@keyframes c-cb-rise {
  from { transform: translate(-50%, 24px); opacity: 0; }
  to   { transform: translate(-50%, 0);   opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .c-cb { animation: none; }
}

.c-cb-body {
  padding: 1rem 1.25rem;
}

.c-cb-headline {
  margin: 0 0 0.35rem 0;
  font-weight: 600;
  font-size: 1rem;
}

.c-cb-detail {
  margin: 0 0 0.85rem 0;
  font-size: 0.875rem;
  color: var(--c-ink-muted, #52525b);
}

.c-cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.c-cb-btn {
  appearance: none;
  border: 1px solid var(--c-border, #d4d4d8);
  background: var(--c-surface-alt, #f4f4f5);
  color: inherit;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.c-cb-btn:hover {
  background: var(--c-surface-hover, #e4e4e7);
}

.c-cb-btn:focus-visible {
  outline: 2px solid var(--c-accent, #2563eb);
  outline-offset: 2px;
}

.c-cb-btn--primary {
  background: var(--c-accent, #2563eb);
  color: var(--c-accent-ink, #ffffff);
  border-color: var(--c-accent, #2563eb);
}

.c-cb-btn--primary:hover {
  background: var(--c-accent-strong, #1d4ed8);
  border-color: var(--c-accent-strong, #1d4ed8);
}

.c-cb-toggle {
  appearance: none;
  background: none;
  border: none;
  color: var(--c-accent, #2563eb);
  padding: 0.55rem 0.5rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.c-cb-toggle:focus-visible {
  outline: 2px solid var(--c-accent, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}

.c-cb-details {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--c-border, #d4d4d8);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.c-cb-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.c-cb-row input[type="checkbox"] {
  margin-top: 0.25rem;
  flex: 0 0 auto;
}

.c-cb-row strong {
  font-weight: 600;
}

/* Dark-mode tokens via CSS custom properties on :root; the banner inherits.
 * Projects that opt out of the token spine still get a legible banner because
 * each `var()` carries a hex fallback. */
