/* Cookie banner and settings panel. Sits above the phone tab bar; equal-weight Accept / Reject buttons. */
.cc-banner {
  position: fixed; z-index: 90;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--tabbar-h, 0px) + 16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 22px 22px 20px;
  display: grid; gap: 12px;
  animation: cc-in .45s cubic-bezier(.2,.8,.2,1);
}
.cc-banner h2 { font-size: 19px; font-weight: 800; }
.cc-banner p { font-size: 15px; color: var(--ink-2); }
.cc-banner p a { font-weight: 600; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cc-btn {
  flex: 1 1 110px;
  font: 700 15px/1 var(--body); cursor: pointer;
  padding: 14px 16px; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  transition: background .15s, color .15s, border-color .15s;
}
.cc-btn:hover { background: var(--ink); color: #fff; }
.cc-btn.solid { background: var(--ink); color: #fff; }
.cc-btn.solid:hover { background: var(--navy-2); border-color: var(--navy-2); }
.cc-btn.link { flex: 1 1 100%; border: 0; padding: 8px; background: none; color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.cc-btn.link:hover { background: none; color: var(--navy-2); }

.cc-backdrop {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(11, 22, 64, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
}
.cc-panel {
  width: min(560px, 100%); max-height: min(88vh, 720px); overflow: auto;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 26px; display: grid; gap: 16px;
  animation: cc-in .35s cubic-bezier(.2,.8,.2,1);
}
.cc-panel h2 { font-size: 24px; font-weight: 800; }
.cc-panel > p { color: var(--ink-2); font-size: 15.5px; }
.cc-cat { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
.cc-cat h3 { font-family: var(--body); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.cc-cat p { grid-column: 1 / -1; color: var(--ink-2); font-size: 14.5px; }
.cc-cat .always { font-size: 13px; font-weight: 700; color: var(--good); }

/* Toggle switch */
.cc-switch { position: relative; width: 50px; height: 30px; flex: none; }
.cc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.cc-switch span { position: absolute; inset: 0; border-radius: 99px; background: #c9d0e4; transition: background .2s; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.cc-switch input:checked + span { background: var(--blue); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:focus-visible + span { outline: 3px solid var(--blue-hi); outline-offset: 2px; }

.cc-toast {
  position: fixed; z-index: 96; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h, 0px) + 20px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 11px 18px; border-radius: 99px; box-shadow: var(--shadow-lg);
  animation: cc-in .3s ease;
}

/* Footer "Cookie settings" looks like the other footer links */
footer.site .legal .cc-open {
  font: inherit; color: var(--on-navy); background: none; border: 0; padding: 9px 0; cursor: pointer;
}
footer.site .legal .cc-open:hover { color: #fff; text-decoration: underline; }
footer.site .legal .links { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }

@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cc-toast { animation-name: cc-toast-in; }
@keyframes cc-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 480px) { .cc-panel { padding: 20px; } .cc-banner { padding: 18px; } }
