/* ─────────────────────────────────────────────────────────────
   Cookie banner — dark industrial premium, GDPR-compliant
   Loaded by all pages (index, terms, privacy, about).
   Design tokens mirror site palette: sky #0ea5e9 + deep blue #2563eb.
   ───────────────────────────────────────────────────────────── */

#cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 880px;
  margin: 0 auto;
  z-index: 9999;
  background: rgba(19, 19, 24, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid #2a2a33;
  border-radius: 16px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 22px 24px;
  color: #f5f5f7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.30s ease-out;
}

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

.cb-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

@media (max-width: 720px) {
  .cb-grid { grid-template-columns: 1fr; gap: 16px; }
}

.cb-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0ea5e9;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-title svg { width: 16px; height: 16px; }

.cb-body { color: #a8a8b0; margin: 0; }
.cb-body strong { color: #f5f5f7; font-weight: 600; }
.cb-body a {
  color: #38bdf8;
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.35);
  text-underline-offset: 3px;
}
.cb-body a:hover { text-decoration-color: #38bdf8; }

.cb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.cb-btn {
  appearance: none;
  border: 1px solid #2a2a33;
  background: transparent;
  color: #f5f5f7;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.cb-btn:hover {
  border-color: #3a3a45;
  background: #1a1a20;
}

.cb-btn:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.cb-btn.primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  border-color: transparent;
  color: #0b0b0d;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cb-btn.primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cb-btn.subtle {
  color: #a8a8b0;
  font-weight: 500;
}

.cb-btn.subtle:hover { color: #f5f5f7; }

/* ─── Preference details (expanded view) ─────────────────────────── */
#cookie-banner .cb-details {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #1f1f26;
}

#cookie-banner[data-expanded="true"] .cb-details {
  display: block;
}

.cb-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #1f1f26;
}
.cb-row:last-child { border-bottom: none; }

.cb-row-text { flex: 1; min-width: 0; }
.cb-row-text strong {
  display: block;
  color: #f5f5f7;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.cb-row-text span {
  color: #6b6b75;
  font-size: 12px;
  line-height: 1.5;
}

.cb-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cb-toggle .cb-slider {
  position: absolute;
  inset: 0;
  background: #2a2a33;
  border-radius: 11px;
  transition: background 180ms;
  cursor: pointer;
}
.cb-toggle .cb-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #f5f5f7;
  border-radius: 50%;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cb-toggle input:checked + .cb-slider { background: #0ea5e9; }
.cb-toggle input:checked + .cb-slider::before { transform: translateX(16px); }
.cb-toggle input:disabled + .cb-slider {
  background: #1a1a20;
  cursor: not-allowed;
}
.cb-toggle input:disabled + .cb-slider::before { background: #4a4a52; }

@media (prefers-reduced-motion: reduce) {
  #cookie-banner, .cb-btn, .cb-toggle .cb-slider, .cb-toggle .cb-slider::before {
    transition: none !important;
  }
}
