/* SecPaid cookie consent. Uses the site tokens from styles.css (--surface, --ink, --accent ...),
   so light/dark mode and the emerald accent follow the rest of the site automatically.
   Shape rule from styles.css: buttons full-radius, panels 16px. */

.cc-banner {
  position: fixed; z-index: 60; left: 1rem; bottom: 1rem;
  width: min(440px, calc(100vw - 2rem));
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.1rem;
  font-family: var(--font); font-size: .92rem; line-height: 1.5;
  animation: cc-in .35s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes cc-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .cc-banner { animation: none; } }

.cc-title { margin: 0 0 .4rem; font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; color: var(--ink); }
.cc-body { margin: 0 0 .5rem; color: var(--ink-2); }
.cc-links { margin: 0 0 1rem; font-size: .85rem; color: var(--muted); }
.cc-links a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.cc-links a:hover { color: var(--accent); }

.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cc-actions .btn { width: 100%; justify-content: center; }
.cc-actions .btn:last-child { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .cc-banner {
    left: .5rem; right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); width: auto;
    padding: .9rem .9rem .8rem; font-size: .84rem; line-height: 1.45;
    max-height: calc(100dvh - 1rem); overflow-y: auto;
  }
  .cc-title { font-size: .95rem; margin-bottom: .3rem; }
  .cc-links { margin-bottom: .7rem; }
  .cc-actions { gap: .4rem; }
  .cc-actions .btn-sm { height: 36px; }
}

/* Settings dialog */
.cc-dialog {
  width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  font-family: var(--font); font-size: .92rem; line-height: 1.5;
}
.cc-dialog::backdrop { background: rgba(15, 16, 18, .45); backdrop-filter: blur(2px); }
.cc-prefs { padding: 1.4rem; margin: 0; }
.cc-prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.cc-prefs-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.cc-x {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.cc-x:hover { background: var(--surface-2); }
.cc-x:focus-visible, .cc-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.cc-cat { border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; margin: .75rem 0; background: var(--bg); }
.cc-cat p { margin: .35rem 0 0; color: var(--ink-2); font-size: .87rem; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cc-cat-title { font-weight: 700; color: var(--ink); }
.cc-pill {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); background: var(--accent-soft); padding: .3rem .6rem; border-radius: 999px;
}

/* Switch in the site's pill style */
.cc-switch {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong);
  position: relative; transition: background .2s;
}
.cc-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s;
}
.cc-switch:checked { background: var(--accent); }
.cc-switch:checked::after { transform: translateX(18px); }

.cc-prefs .cc-actions { margin-top: .5rem; }
@media (min-width: 561px) {
  .cc-prefs .cc-actions { grid-template-columns: 1fr 1fr 1fr; }
  .cc-prefs .cc-actions .btn:last-child { grid-column: auto; }
}

