/* Cookie banner and settings dialog (shared by every page). */

.cc-banner,
.cc-dialog {
  --cc-bg: #101010;
  --cc-ink: #f5f0e8;
  --cc-muted: rgba(248, 242, 232, .7);
  --cc-line: rgba(255, 255, 255, .1);
  --cc-accent: #e2805a;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--cc-ink);
}

.cc-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 100;
  width: min(420px, calc(100vw - 40px));
  padding: 20px 22px 18px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-line);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .45), 0 28px 64px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s ease, transform .4s cubic-bezier(.2, .8, .2, 1);
}
.cc-banner.is-shown { opacity: 1; transform: none; }

.cc-title {
  margin: 0 0 6px;
  font-size: .95rem;
  font-weight: 600;
}

.cc-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cc-muted);
}
.cc-text a { color: var(--cc-ink); text-underline-offset: 2px; }
.cc-text a:hover { color: var(--cc-accent); }

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

/* "Reject all" and "Accept all" look exactly the same on purpose
   (the Ixonian outline button). */
.cc-btn {
  flex: 1 1 auto;
  min-width: 110px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 6px;
  background: transparent;
  color: var(--cc-ink);
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.cc-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .45); color: #fff; }
.cc-btn:focus-visible,
.cc-link:focus-visible,
.cc-close:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

.cc-link {
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--cc-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cc-link:hover { color: var(--cc-accent); }

.cc-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  background: #101010;
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .55), 0 10px 28px rgba(0, 0, 0, .45);
}
.cc-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.cc-dialog[open] { animation: cc-in .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes cc-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.cc-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cc-dialog h2 {
  margin: 0;
  font-family: 'Playfair Display Variable', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}
.cc-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--cc-muted);
  cursor: pointer;
}
.cc-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.cc-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; }

.cc-rows { margin-top: 16px; border-top: 1px solid var(--cc-line); }

.cc-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--cc-line);
  cursor: pointer;
}
.cc-row-text { display: grid; gap: 3px; }
.cc-row-title { font-size: .88rem; font-weight: 600; }
.cc-row-desc { font-size: 12px; line-height: 1.5; color: var(--cc-muted); }
.cc-row-note { font-size: 11.5px; line-height: 1.5; color: var(--cc-accent); }

.cc-row input {
  position: absolute;
  right: 0;
  top: 50%;
  width: 42px;
  height: 24px;
  margin: -12px 0 0;
  opacity: 0;
  cursor: pointer;
}
.cc-row input:disabled { cursor: not-allowed; }
.cc-switch {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  transition: background .2s;
  pointer-events: none;
}
.cc-switch::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .2s;
}
.cc-row input:checked ~ .cc-switch::after { background: #191512; }
.cc-row input:checked ~ .cc-switch { background: #f0e8d8; }
.cc-row input:checked ~ .cc-switch::after { transform: translateX(18px); }
.cc-row input:disabled ~ .cc-switch { opacity: .55; }
.cc-row input:focus-visible ~ .cc-switch { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

@media (max-width: 520px) {
  .cc-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-switch, .cc-switch::after { transition: none; }
  .cc-dialog[open] { animation: none; }
}
