/* ============================================================
   COOKIE CONSENT — banner + preferences modal
   ============================================================ */

.cc-banner,
.cc-modal { display: none; }

.cc-banner.cc-open,
.cc-modal.cc-open { display: block; }

/* ============== BANNER ============== */
.cc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9998;
  background: var(--navy-deep);
  border-top: 1px solid var(--d-line-2);
  color: var(--d-text);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  animation: cc-slide-up 0.35s var(--ease);
}
@keyframes cc-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cc-banner-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cc-banner-text {
  flex: 1 1 420px;
  min-width: 0;
}
.cc-banner-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.cc-banner-text p {
  font-size: 13.5px;
  color: var(--d-soft);
  line-height: 1.5;
}
.cc-banner-text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cc-banner-text a:hover { color: var(--cobalt-100); }

.cc-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============== MODAL ============== */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 38, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cc-modal-dialog {
  position: relative;
  max-width: 560px;
  margin: 6vh auto;
  background: var(--navy);
  color: var(--d-text);
  border: 1px solid var(--d-line-2);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  animation: cc-pop-in 0.25s var(--ease);
}
@keyframes cc-pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cc-modal-header {
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--d-line);
}
.cc-modal-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.cc-modal-intro {
  font-size: 13.5px;
  color: var(--d-soft);
  margin-top: 6px;
}

.cc-modal-body {
  padding: 8px 24px;
  overflow-y: auto;
  flex: 1;
}

.cc-category {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--d-line);
}
.cc-category:last-child { border-bottom: none; }

.cc-category-text { flex: 1; min-width: 0; }
.cc-category-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.cc-category-locked {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--d-mute);
  border: 1px solid var(--d-line-2);
  padding: 2px 8px;
  border-radius: 999px;
}
.cc-category-desc {
  font-size: 13px;
  color: var(--d-soft);
  line-height: 1.5;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}
.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.cc-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--navy-soft);
  border: 1px solid var(--d-line-2);
  border-radius: 999px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cc-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
}
.cc-toggle input:checked ~ .cc-toggle-track {
  background: var(--cobalt);
  border-color: var(--cobalt);
}
.cc-toggle input:checked ~ .cc-toggle-thumb {
  transform: translateX(20px);
}
.cc-toggle input:focus-visible ~ .cc-toggle-track {
  outline: 2px solid var(--cobalt-100);
  outline-offset: 2px;
}
.cc-toggle input:disabled {
  cursor: not-allowed;
}
.cc-toggle input:disabled ~ .cc-toggle-track {
  background: var(--navy-soft);
  border-color: var(--d-line);
  opacity: 0.7;
}
.cc-toggle input:disabled:checked ~ .cc-toggle-track {
  background: var(--cobalt-600);
  border-color: var(--cobalt-600);
  opacity: 0.55;
}

.cc-modal-footer {
  padding: 16px 24px 22px;
  border-top: 1px solid var(--d-line);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Reuse .btn from main stylesheet; .cc-btn-sm trims padding for the dense banner */
.cc-btn-sm { padding: 9px 14px; font-size: 13px; }

/* Footer "Cookie preferences" trigger — matches the muted footer-bottom links */
.footer-bottom [data-cc-open] {
  color: var(--d-mute);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
  cursor: pointer;
}
.footer-bottom [data-cc-open]:hover { color: #fff; }

/* ============== RESPONSIVE ============== */
@media (max-width: 720px) {
  .cc-banner-inner {
    padding: 16px 20px;
    gap: 14px;
  }
  .cc-banner-actions {
    width: 100%;
  }
  .cc-banner-actions .btn { flex: 1 1 auto; }

  .cc-modal-dialog {
    margin: 0;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    min-height: 100vh;
  }
  .cc-modal-footer {
    flex-direction: column-reverse;
  }
  .cc-modal-footer .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal-dialog { animation: none; }
  .cc-toggle-thumb,
  .cc-toggle-track { transition: none; }
}
