/* public/cookie-consent.css
 * Self-contained stylesheet for the cookie consent banner + preferences
 * modal. Loaded on every page via <link rel="stylesheet" href="/cookie-consent.css">
 * (injected before </body> when the HTML file doesn't ship it itself).
 * Uses the same token names (--navy, --teal, --slate-*) that other pages
 * already define so the banner picks up the right palette if those tokens
 * are in scope; falls back to the same hex values when they aren't.
 */

:root {
  --cc-navy: #0c2340;
  --cc-teal: #0d9488;
  --cc-teal-light: #14b8a6;
  --cc-slate-900: #0f172a;
  --cc-slate-700: #334155;
  --cc-slate-500: #64748b;
  --cc-slate-200: #e2e8f0;
  --cc-slate-100: #f1f5f9;
  --cc-slate-50: #f8fafc;
  --cc-white: #ffffff;
  --cc-red-600: #dc2626;
}

/* ============ BANNER (bottom-of-page strip) ============ */
.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  background: var(--cc-white, #ffffff);
  border: 1px solid var(--cc-slate-200, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--cc-slate-900, #0f172a);
  line-height: 1.5;
}

.cc-banner[hidden] { display: none !important; }

.cc-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.cc-banner-copy {
  flex: 1 1 360px;
  min-width: 0;
}

.cc-banner-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--cc-navy, #0c2340);
  margin-bottom: 4px;
}

.cc-banner-body {
  margin: 0;
  font-size: 14px;
  color: var(--cc-slate-700, #334155);
}

.cc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  line-height: 1.2;
}

.cc-btn:focus-visible {
  outline: 2px solid var(--cc-teal, #0d9488);
  outline-offset: 2px;
}

.cc-btn-accept {
  background: var(--cc-teal, #0d9488);
  color: var(--cc-white, #ffffff);
}

.cc-btn-accept:hover { background: var(--cc-teal-light, #14b8a6); }

.cc-btn-reject {
  background: var(--cc-white, #ffffff);
  color: var(--cc-slate-900, #0f172a);
  border-color: var(--cc-slate-200, #e2e8f0);
}

.cc-btn-reject:hover { background: var(--cc-slate-50, #f8fafc); }

.cc-btn-prefs {
  background: transparent;
  color: var(--cc-teal, #0d9488);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-btn-prefs:hover { color: var(--cc-teal-light, #14b8a6); }

/* ============ PREFERENCES MODAL ============ */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--cc-slate-900, #0f172a);
}

.cc-modal[hidden] { display: none !important; }

.cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.cc-modal-card {
  position: relative;
  background: var(--cc-white, #ffffff);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  max-width: 520px;
  width: calc(100% - 32px);
  margin: 64px auto;
  padding: 24px;
  line-height: 1.5;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cc-modal-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--cc-navy, #0c2340);
  margin: 0;
  line-height: 1.25;
}

.cc-modal-close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--cc-slate-500, #64748b);
  cursor: pointer;
  padding: 0 4px;
}

.cc-modal-close:hover { color: var(--cc-slate-900, #0f172a); }
.cc-modal-close:focus-visible {
  outline: 2px solid var(--cc-teal, #0d9488);
  outline-offset: 2px;
}

.cc-modal-intro {
  margin: 0 0 16px;
  color: var(--cc-slate-700, #334155);
  font-size: 14px;
}

.cc-pref-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  border-top: 1px solid var(--cc-slate-200, #e2e8f0);
  border-bottom: 1px solid var(--cc-slate-200, #e2e8f0);
  padding: 12px 0;
}

.cc-pref-row {
  padding: 0;
}

.cc-pref-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.cc-pref-label input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--cc-teal, #0d9488);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cc-pref-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.cc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============ Mobile tweaks ============ */
@media (max-width: 600px) {
  .cc-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .cc-banner-inner {
    padding: 14px 16px;
  }
  .cc-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .cc-btn { padding: 9px 14px; font-size: 13.5px; }
  .cc-modal-card {
    padding: 18px;
    margin: 32px auto;
  }
}
