/* ============================================================
   DC BEATS — Cookie Consent Banner
   GDPR compliant for EU visitors.
   Supports: Essential, Analytics (GA4), Advertising (Google Ads)
   Google services loaded via Google Tag Manager ONLY after consent.
============================================================ */

/* ── Banner ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: rgba(15, 15, 15, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 260px;
}

.cookie-text p {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: #8a8278;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
}

.cookie-text a {
  color: #c8a96e;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.cookie-text a:hover { opacity: 0.75; }

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Accept all — gold filled */
#cookie-accept-all {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #0a0a0a;
  background: #c8a96e;
  border: 1px solid #c8a96e;
  padding: 0.6rem 1.2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  white-space: nowrap;
}

#cookie-accept-all:hover {
  background: #dfc28e;
  transform: translateY(-1px);
}

/* Essential only — ghost */
#cookie-essential-only {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b6560;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.6rem 1.2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  white-space: nowrap;
}

#cookie-essential-only:hover {
  color: #f0ece4;
  border-color: rgba(255,255,255,0.2);
}

/* Manage preferences — text link style */
#cookie-manage {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a4642;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.5rem;
  transition: color 0.25s;
  white-space: nowrap;
}

#cookie-manage:hover { color: #c8a96e; }


/* ── Preferences modal ── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#cookie-modal.visible {
  opacity: 1;
  pointer-events: all;
}

.cookie-modal-box {
  background: #131313;
  border: 1px solid rgba(255,255,255,0.08);
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f0ece4;
  letter-spacing: -0.02em;
}

.cookie-modal-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #8a8278;
  line-height: 1.7;
  margin: -0.75rem 0 0;
}

/* Cookie category row */
.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.cookie-category-info h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #f0ece4;
  margin-bottom: 0.3rem;
}

.cookie-category-info p {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #6b6560;
  line-height: 1.6;
  max-width: 100%;
  margin: 0;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #2a2a2a;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.3s;
}

.cookie-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #6b6560;
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: rgba(200, 169, 110, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider::after {
  transform: translateX(18px);
  background: #c8a96e;
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Essential badge */
.cookie-required-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4a4642;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Modal actions */
.cookie-modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#cookie-save-prefs {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #0a0a0a;
  background: #c8a96e;
  border: 1px solid #c8a96e;
  padding: 0.65rem 1.4rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s;
}

#cookie-save-prefs:hover { background: #dfc28e; }

#cookie-modal-close {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #4a4642;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.65rem 1.2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

#cookie-modal-close:hover {
  color: #f0ece4;
  border-color: rgba(255,255,255,0.18);
}

/* ── Cookie preferences link (footer / reopener) ── */
.cookie-reopen-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4a4642;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.25s;
  padding: 0;
}

.cookie-reopen-btn:hover { color: #c8a96e; }

@media (max-width: 600px) {
  .cookie-inner   { flex-direction: column; gap: 1rem; }
  .cookie-actions { width: 100%; }
  #cookie-accept-all,
  #cookie-essential-only { flex: 1; text-align: center; }
}
