/* corpus:engine/cookie-consent@static */
/* ─── Cookie Consent: themeable via CSS variables ──────────────────────────── */

:root {
  --cc-primary: #1a1a1a;
  --cc-bg: #ffffff;
  --cc-text: #333333;
  --cc-muted: #666666;
  --cc-border: #e0e0e0;
  --cc-btn-text: #ffffff;
  --cc-radius: 8px;
  --cc-font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cc-z: 99999;
}

/* ─── Banner ─────────────────────────────────────────────────────────────────── */
/* Compact and non-blocking. Below 768px: a bottom sheet, edge to edge, its top
   corners rounded and its padding adding the safe-area insets, holding the
   title sentence plus one action row. Height with no safe area: 1px border +
   8px padding + 18px line + 10px gap + 44px buttons + 8px padding = 89px, or
   107px when the text wraps (FR beside the language toggle): 0.137 of a
   360x780 screen, so the hero H1 and CTA stay visible. (The React variant is
   97px on one line: its privacy link's 44px tap target needs a 26px text
   block; this variant's link has no such target.) From 768px: a 400px
   card in the bottom-right corner, clear of left-aligned hero copy and CTAs.
   The long explanation stays readable by screen readers on mobile and is
   visible from 768px. */

#cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--cc-z);
  font-family: var(--cc-font);
  color: var(--cc-text);
  transform: translateY(calc(100% + 16px));
  transition: transform 0.3s ease;
}

#cc-banner.cc-visible {
  transform: translateY(0);
}

.cc-banner-inner {
  position: relative;
  padding: 8px 12px;
  padding: 8px calc(12px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom))
    calc(12px + env(safe-area-inset-left));
  background: var(--cc-bg);
  border-top: 1px solid var(--cc-border);
  border-radius: calc(var(--cc-radius) * 2) calc(var(--cc-radius) * 2) 0 0;
  /* Cast upward: a downward shadow would fall below the screen. */
  box-shadow: 0 -4px 16px -4px rgba(0, 0, 0, 0.14);
}

.cc-banner-text {
  margin: 0;
  padding-right: 64px;
  font-size: 13px;
  line-height: 18px;
  color: var(--cc-muted);
}

.cc-banner-text strong {
  font-weight: 600;
  color: var(--cc-primary);
}

.cc-banner-text a {
  color: var(--cc-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

.cc-btn {
  padding: 9px 18px;
  border-radius: var(--cc-radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s;
  font-family: var(--cc-font);
  white-space: nowrap;
}

.cc-btn:hover {
  opacity: 0.85;
}

.cc-btn-primary {
  background: var(--cc-primary);
  color: var(--cc-btn-text);
}

.cc-btn-outline {
  background: var(--cc-primary);
  color: var(--cc-btn-text);
  border: 1.5px solid var(--cc-primary);
}

/* Law 25: Reject all and Accept all are the same size, fill and weight. */
.cc-btn-choice {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  background: var(--cc-primary);
  color: var(--cc-btn-text);
  font-weight: 600;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.cc-btn-link {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 6px;
  background: none;
  border: none;
  color: var(--cc-primary);
  font-family: var(--cc-font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cc-btn:focus-visible,
.cc-btn-link:focus-visible,
.cc-lang-toggle:focus-visible,
.cc-toggle input:focus-visible + .cc-toggle-slider,
#cc-manage-link:focus-visible,
.cc-banner-text a:focus-visible {
  outline: 2px solid var(--cc-primary);
  outline-offset: 2px;
}

/* ─── Language toggle ────────────────────────────────────────────────────────── */

.cc-lang-toggle {
  position: absolute;
  top: 8px;
  right: 10px;
  min-height: 24px;
  background: none;
  border: none;
  font-size: 12px;
  color: var(--cc-muted);
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--cc-font);
  padding: 0 2px;
}

/* ─── Modal overlay ──────────────────────────────────────────────────────────── */

#cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--cc-z) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#cc-modal-overlay.cc-visible {
  opacity: 1;
}

#cc-modal {
  background: var(--cc-bg);
  border-radius: var(--cc-radius);
  width: 100%;
  max-width: 520px;
  /* The dialog never outgrows the viewport (less the overlay's 16px padding): the body scrolls and
     the header and the actions stay on screen, even on a 320px-tall landscape phone. */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  font-family: var(--cc-font);
  color: var(--cc-text);
}

.cc-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--cc-border);
}

.cc-modal-header strong {
  font-size: 16px;
  color: var(--cc-primary);
}

#cc-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--cc-muted);
  line-height: 1;
  padding: 0 4px;
}

.cc-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 24px;
}

.cc-modal-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--cc-border);
}

/* ─── Category rows ──────────────────────────────────────────────────────────── */

.cc-category {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cc-border);
}

.cc-category:last-child {
  border-bottom: none;
}

.cc-category-info {
  flex: 1;
}

.cc-category-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--cc-primary);
  margin-bottom: 4px;
}

.cc-category-desc {
  margin: 0;
  font-size: 13px;
  color: var(--cc-muted);
  line-height: 1.5;
}

.cc-category-control {
  flex-shrink: 0;
}

.cc-always-on {
  font-size: 12px;
  color: var(--cc-muted);
  font-style: italic;
}

/* ─── Cookie detail list (optional) ─────────────────────────────────────────── */

.cc-cookie-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.cc-cookie-list li {
  font-size: 11px;
  color: var(--cc-muted);
  line-height: 1.6;
}

.cc-cookie-name {
  font-family: monospace;
  font-weight: 600;
  color: var(--cc-text);
}

/* ─── Toggle switch ──────────────────────────────────────────────────────────── */

.cc-toggle {
  display: inline-block;
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--cc-border);
  border-radius: 24px;
  transition: background 0.2s;
}

.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: var(--cc-primary);
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(20px);
}

/* ─── Manage link (persistent) ───────────────────────────────────────────────── */

#cc-manage-link {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: var(--cc-z);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cc-bg);
  color: var(--cc-muted);
  border: 1px solid var(--cc-border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.15s;
  opacity: 0.6;
}

#cc-manage-link:hover,
#cc-manage-link:focus-visible {
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

/* Mobile: the long explanation is visually hidden but stays in the
   accessibility tree (screen readers still read the full approved text). */
@media (max-width: 767.98px) {
  .cc-banner-long {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 600px) {
  .cc-modal-footer .cc-btn {
    flex: 1;
    text-align: center;
  }
}

/* 768px and up: a compact corner card, bottom right. */
@media (min-width: 768px) {
  #cc-banner {
    left: auto;
    right: 16px;
    bottom: 16px;
    width: 400px;
  }

  .cc-banner-inner {
    padding: 16px 20px;
    border: 1px solid var(--cc-border);
    border-radius: calc(var(--cc-radius) * 2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 16px 40px -16px rgba(0, 0, 0, 0.22);
  }

  .cc-banner-text {
    font-size: 14px;
    line-height: 1.55;
  }

  .cc-banner-text strong {
    display: block;
    margin-bottom: 4px;
  }

  .cc-banner-dot {
    display: none;
  }

  .cc-banner-actions {
    margin-top: 12px;
  }

  .cc-btn-choice,
  .cc-btn-link {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cc-banner,
  #cc-modal-overlay,
  #cc-manage-link {
    transition: none;
  }
}
