/* CGS cookie banner and settings panel: forest, cream and sage, matching the site. */
.cc-root { position: relative; z-index: 1000; }

/* banner: fixed to the bottom, never moves page content */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
  max-width: 1120px; margin: 0 auto;
  background: var(--ink); color: var(--on-dark);
  border: 1px solid var(--line-on-dark); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  font-family: var(--font-sans);
}
.cc-inner { display: flex; align-items: center; gap: 20px 32px; padding: 20px 24px; }
.cc-copy { flex: 1 1 auto; min-width: 0; }
.cc-title { font-weight: 600; color: var(--paper); font-size: 1.02rem; margin-bottom: 4px; }
.cc-banner p { font-size: .92rem; line-height: 1.5; }
.cc-banner a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.cc-gpc { margin-top: 8px; font-size: .86rem; color: var(--sage); }
.cc-actions { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.cc-btn {
  font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2; cursor: pointer;
  border-radius: 999px; padding: .78rem 1.25rem; border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
/* Accept and Reject look identical, so neither is pushed */
.cc-banner .cc-primary { background: var(--paper); color: var(--ink); }
.cc-banner .cc-primary:hover { background: #fff; }
.cc-link { background: none; color: var(--paper); text-decoration: underline; text-underline-offset: 3px; padding-inline: .6rem; }
.cc-link:hover { color: var(--sage); }
.cc-banner :focus-visible, .cc-toast :focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

/* settings panel */
html.cc-locked { overflow: hidden; }
.cc-overlay {
  position: fixed; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 29, 22, .55);
}
.cc-dialog {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--paper); color: var(--ink-soft); border-radius: 20px; padding: 28px 26px 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); font-family: var(--font-sans);
}
.cc-dialog-title { font-family: var(--font-sans); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0 36px 8px 0; }
.cc-dialog-title:focus { outline: none; }
.cc-dialog-intro { font-size: .94rem; margin-bottom: 18px; }
.cc-dialog a { color: var(--ink); text-underline-offset: 3px; }
.cc-cat { border-top: 1px solid var(--rule); padding: 14px 0; }
.cc-cat p { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.cc-cat .cc-gpc { color: var(--ink); font-weight: 600; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-cat-name { font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.cc-always { font-size: .82rem; font-weight: 600; color: var(--muted); }

/* switch: a real checkbox, styled */
.cc-switch { position: relative; flex: none; width: 46px; height: 26px; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--rule); transition: background-color .2s ease; }
.cc-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.cc-switch input:checked + span { background: var(--ink); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:disabled + span { opacity: .55; }
.cc-switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.cc-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cc-dialog .cc-primary { background: var(--ink); color: var(--paper); }
.cc-dialog .cc-primary:hover { background: var(--accent-hover); }
.cc-dialog .cc-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.cc-dialog .cc-secondary:hover { background: var(--paper-alt); }
.cc-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.cc-close:hover { background: var(--paper-alt); }

/* one-time GPC notice for returning visitors */
.cc-toast {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 640px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 52px 14px 18px;
  background: var(--ink); color: var(--on-dark); border-radius: 14px; font-family: var(--font-sans); font-size: .9rem;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .3);
}
.cc-toast .cc-toast-close { color: var(--paper); top: 50%; translate: 0 -50%; right: 8px; }
.cc-toast .cc-toast-close:hover { background: rgba(243, 238, 227, .1); }

/* footer link styled like the other footer links */
.cookie-settings-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.cookie-settings-link:hover { text-decoration-color: currentColor; }

/* on phones: stack, full-width buttons; landing-page sticky bar steps aside while the banner shows */
@media (max-width: 760px) {
  .cc-banner { left: 10px; right: 10px; bottom: 10px; }
  .cc-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .cc-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cc-actions .cc-link { grid-column: 1 / -1; justify-self: center; }
  .cc-dialog { padding: 24px 18px 20px; }
  .cc-dialog-actions .cc-btn { flex: 1 1 100%; }
}
body.cc-open .sticky-cta { display: none; }

/* entrance only when motion is welcome; nothing animates on the way out */
@media (prefers-reduced-motion: no-preference) {
  .cc-banner, .cc-toast { animation: ccRise .45s cubic-bezier(.16, 1, .3, 1) both; }
  .cc-dialog { animation: ccRise .35s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes ccRise { from { opacity: 0; transform: translateY(16px); } }

/* inline "Cookie settings" link inside the Privacy Policy text */
.prose-legal .cookie-settings-link { text-decoration-color: currentColor; color: var(--ink); }
