/* Cookie consent banner (views/partials/consent.ejs). Self-contained: loaded by the site, auth and partner sign-in
   layouts, which all load app.css for the tokens (--ink, --bg, --surface, --line, --muted, --accent). Fixed position,
   so it never shifts the page; compact card bottom-left on desktop, bottom sheet on phones. */
.cc { position: fixed; left: 16px; bottom: 16px; z-index: 80; width: calc(100% - 32px); max-width: 420px; font-family: Geist, system-ui, sans-serif; color: var(--ink); }
.cc[hidden] { display: none; }
.cc-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px 20px 18px; box-shadow: 0 18px 50px -18px rgba(17, 20, 23, .35), 0 2px 8px rgba(17, 20, 23, .06); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.cc-title { margin: 0 0 6px; font-family: 'Bricolage Grotesque', 'Inter Tight', Geist, system-ui, sans-serif; font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.cc-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cc-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.cc-settings { margin-top: 10px; }
.cc-summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; padding: 6px 0; border-radius: 6px; }
.cc-summary::-webkit-details-marker { display: none; }
.cc-summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.cc-settings[open] .cc-summary::after { transform: translateY(1px) rotate(-135deg); }
.cc-cats { display: grid; gap: 10px; padding-top: 6px; }
.cc-cat { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.cc-cat-text { display: grid; gap: 2px; min-width: 0; cursor: default; }
label.cc-cat-text { cursor: pointer; }
.cc-cat-t { font-size: 14px; font-weight: 600; }
.cc-cat-d { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
/* Switch: a styled checkbox (keeps native semantics and keyboard support) */
.cc-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background-color .2s; }
.cc-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(17, 20, 23, .25); transition: transform .2s; }
.cc-switch:checked { background: var(--accent); }
.cc-switch:checked::after { transform: translateX(18px); }
.cc-switch:disabled { cursor: not-allowed; opacity: .6; }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
/* Both choices look the same on purpose (equal weight, no nudging) */
.cc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.2; text-align: center; cursor: pointer; transition: transform .2s, filter .2s; }
.cc-btn:hover { filter: brightness(1.25); }
.cc-btn-save { justify-self: start; background: var(--surface); color: var(--ink); border-color: var(--line); min-height: 40px; }
.cc-btn-save:hover { filter: none; border-color: var(--ink); }
.cc-summary:focus-visible, .cc-btn:focus-visible, .cc-switch:focus-visible, .cc-text a:focus-visible { outline: 2px solid var(--accent-ink, #1f7a52); outline-offset: 2px; }
.cc-btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 560px) {
  .cc { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; }
  .cc-card { border-radius: 22px 22px 0 0; border-bottom: 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); max-height: 85vh; max-height: 85dvh; }
  .cc-title { font-size: 17px; }
  .cc-text { font-size: 13.5px; }
  .cc-actions { gap: 8px; margin-top: 12px; }
  .cc-btn { padding: 10px 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .cc-switch, .cc-switch::after, .cc-btn, .cc-summary::after { transition: none; } }
@media print { .cc { display: none !important; } }
