/* GDPR Cookie consent banner & preferences modal */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: var(--color-surface, #171717);
  border-top: 1px solid var(--color-border, #1a1a1a);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  font-family: var(--font-family-body, Inter, system-ui, sans-serif);
  font-size: var(--font-size-sm, 0.875rem);
  line-height: 1.5;
  color: var(--color-on-surface, #fff);
}
#cookie-consent-banner.hidden { display: none !important; }
.cookie-banner-inner {
  max-width: var(--content-max-width, 84rem);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cookie-banner-text { flex: 1; min-width: 240px; }
.cookie-banner-text a {
  color: var(--color-brand-primary, #3fae9a);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.cookie-banner-actions .btn {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-md, 8px);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.cookie-banner-actions .btn-accept {
  background: var(--color-brand-primary, #3fae9a);
  color: #fff;
}
.cookie-banner-actions .btn-reject {
  background: transparent;
  color: var(--color-on-surface);
  border: 1px solid var(--color-border, #1a1a1a);
}
.cookie-banner-actions .btn-manage {
  background: transparent;
  color: var(--color-brand-primary);
  border: 1px solid var(--color-brand-primary);
}

#cookie-preferences-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#cookie-preferences-overlay.hidden { display: none !important; }
#cookie-preferences-modal {
  background: var(--color-surface, #171717);
  border: 1px solid var(--color-border, #1a1a1a);
  border-radius: var(--border-radius-lg, 12px);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
#cookie-preferences-modal h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
#cookie-preferences-modal p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--color-on-surface);
  opacity: 0.9;
}
.cookie-pref-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255,255,255,.04);
  border-radius: var(--border-radius-md, 8px);
}
.cookie-pref-group input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--color-brand-primary);
}
.cookie-pref-group label { cursor: pointer; flex: 1; }
.cookie-pref-group .label { font-weight: 500; }
.cookie-pref-group .desc { font-size: 0.8125rem; opacity: 0.85; margin-top: 0.25rem; }
.cookie-pref-group.disabled { opacity: 0.6; pointer-events: none; }
.cookie-pref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.cookie-pref-actions .btn {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-md, 8px);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.cookie-pref-actions .btn-close {
  background: transparent;
  color: var(--color-on-surface);
  border: 1px solid var(--color-border);
}
.cookie-pref-actions .btn-save {
  background: var(--color-brand-primary);
  color: #fff;
}
.cookie-pref-actions .btn-accept-all {
  background: var(--color-brand-primary);
  color: #fff;
}
.cookie-pref-actions .btn-reject-all {
  background: transparent;
  color: var(--color-on-surface);
  border: 1px solid var(--color-border);
}

@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-start; }
}
