/* ══════════════════════════════════════════════════════════════════════
   COOKIE CONSENT — banner + preferences panel
   ══════════════════════════════════════════════════════════════════════
   Uses the site's dark surface treatment (#111827 card, rgba(55,65,81,.45)
   border, #2563EB accent, Inter) so the banner reads as part of the site
   on both the light and dark pages. Self-contained: every value is
   literal rather than a var(), because this file loads on pages whose
   :root token names differ slightly.
════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   BANNER
═══════════════════════════════════════════════ */
.cc-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 9000;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .32s cubic-bezier(.22,.61,.36,1),
              transform .32s cubic-bezier(.22,.61,.36,1);
}
.cc-banner.cc-in { opacity: 1; transform: none; }

.cc-inner {
  max-width: 1160px;
  margin: 0 auto;
  background: #111827;
  border: 1px solid rgba(55,65,81,.55);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.15);
}

.cc-copy { flex: 1; min-width: 0; }
.cc-title {
  font-size: 15px; font-weight: 600; color: #F9FAFB;
  margin-bottom: 6px; letter-spacing: -.01em;
}
.cc-text {
  font-size: 13.5px; line-height: 1.6; color: #9CA3AF;
  max-width: 660px; margin: 0;
}
.cc-text a {
  color: #60A5FA; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid rgba(96,165,250,.3);
  transition: border-color .2s, color .2s;
}
.cc-text a:hover { color: #93b4ff; border-bottom-color: rgba(147,180,255,.7); }

.cc-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

/* Accept and Reject are the same size and sit side by side. Rejecting
   must never be the harder path — that is what makes the consent valid. */
.cc-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  padding: 11px 20px; border-radius: 40px; cursor: pointer;
  white-space: nowrap; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s,
              transform .18s cubic-bezier(.22,.61,.36,1), box-shadow .2s;
}
.cc-btn:active { transform: translateY(0) scale(.985); }

.cc-btn-ghost {
  background: transparent; color: #F9FAFB; border-color: rgba(55,65,81,.9);
}
.cc-btn-ghost:hover {
  border-color: #9CA3AF; background: rgba(55,65,81,.28); transform: translateY(-1px);
}
.cc-btn-solid { background: #2563EB; color: #fff; }
.cc-btn-solid:hover {
  background: #1d4ed8; transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37,99,235,.38);
}
.cc-btn:focus-visible { outline: 2px solid #60A5FA; outline-offset: 2px; }

/* ═══════════════════════════════════════════════
   PREFERENCES MODAL
═══════════════════════════════════════════════ */
.cc-modal-wrap {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  opacity: 0; transition: opacity .26s ease;
}
.cc-modal-wrap.cc-in { opacity: 1; }

.cc-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(11,15,25,.62);
  backdrop-filter: blur(3px);
}

.cc-modal {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 48px); overflow-y: auto;
  background: #111827;
  border: 1px solid rgba(55,65,81,.55);
  border-radius: 20px;
  padding: 30px 32px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transform: translateY(10px) scale(.985);
  transition: transform .26s cubic-bezier(.22,.61,.36,1);
}
.cc-modal-wrap.cc-in .cc-modal { transform: none; }

.cc-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.cc-modal-title { font-size: 19px; font-weight: 600; color: #F9FAFB; letter-spacing: -.01em; }
.cc-close {
  background: transparent; border: none; color: #9CA3AF;
  font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px;
  border-radius: 8px; transition: color .2s, background .2s;
}
.cc-close:hover { color: #F9FAFB; background: rgba(55,65,81,.4); }

.cc-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding: 20px 0; border-bottom: 1px solid rgba(55,65,81,.45);
}
.cc-row:last-of-type { border-bottom: none; }
.cc-row-main { flex: 1; min-width: 0; }
.cc-row-title { font-size: 15px; font-weight: 600; color: #F9FAFB; margin-bottom: 6px; }
.cc-row-desc { font-size: 13px; line-height: 1.6; color: #9CA3AF; }
.cc-row-control { flex-shrink: 0; padding-top: 2px; }

.cc-always {
  font-size: 12px; font-weight: 500; color: #60A5FA;
  background: rgba(37,99,235,.12); border: 1px solid rgba(37,99,235,.28);
  padding: 5px 12px; border-radius: 40px; white-space: nowrap;
}

/* Toggle */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; cursor: pointer; }
.cc-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.cc-slider {
  position: absolute; inset: 0;
  background: rgba(55,65,81,.9); border: 1px solid rgba(55,65,81,1);
  border-radius: 40px; transition: background .24s ease, border-color .24s ease;
}
.cc-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; top: 3px;
  background: #9CA3AF; border-radius: 50%;
  transition: transform .24s cubic-bezier(.22,.61,.36,1), background .24s ease;
}
.cc-switch input:checked + .cc-slider { background: #2563EB; border-color: #2563EB; }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); background: #fff; }
.cc-switch input:focus-visible + .cc-slider { outline: 2px solid #60A5FA; outline-offset: 2px; }

.cc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.cc-modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 24px; padding-top: 22px;
  border-top: 1px solid rgba(55,65,81,.45);
}
.cc-modal-link {
  font-size: 13px; font-weight: 500; color: #60A5FA; text-decoration: none;
  transition: color .2s;
}
.cc-modal-link:hover { color: #93b4ff; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .cc-banner { left: 12px; right: 12px; bottom: 12px; }
  .cc-inner { flex-direction: column; align-items: stretch; gap: 18px; padding: 22px 20px; }
  .cc-actions { flex-direction: column-reverse; }
  /* Full-width and stacked, so Accept and Reject stay equally reachable
     with a thumb rather than one being tucked away. */
  .cc-btn { width: 100%; padding: 13px 20px; }
  .cc-modal { padding: 26px 22px 22px; }
  .cc-modal-foot { flex-direction: column; align-items: stretch; gap: 14px; }
  .cc-modal-foot .cc-btn { width: 100%; }
  .cc-modal-link { text-align: center; }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-modal-wrap, .cc-modal,
  .cc-btn, .cc-slider, .cc-slider::before {
    transition: none !important;
  }
  .cc-banner { transform: none; }
}
