/* Cookie consent — matches cookie-consent.js (.cookie-consent-banner) */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
  padding: 18px 20px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0));
  background: var(--space-blue, #1e293b);
  color: var(--star-white, #f1f5f9);
  border-top: var(--g21-border, 1px solid #334155);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
  font-family: var(--g21-font, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  animation: g21-cookie-slide-up 0.3s ease-out;
}

@keyframes g21-cookie-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-banner.show { display: block; }

.cookie-consent-content {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.cookie-consent-text > div:first-child {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--sun-gold, #fbbf24);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cookie-consent-text p {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-muted, #94a3b8);
}

.cookie-consent-text a {
  color: var(--g21-accent-text, #ea580c);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-consent-text a:hover {
  color: var(--nebula-pink, #f97316);
}

.cookie-consent-buttons {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-btn {
  padding: 10px 18px;
  border-radius: var(--g21-radius-sm, 0);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background var(--transition-fast, 0.15s ease), color var(--transition-fast, 0.15s ease);
}

.cookie-btn-accept {
  background: var(--g21-accent-text, #ea580c);
  color: #fff;
  border-color: var(--g21-accent-text, #ea580c);
}

.cookie-btn-accept:hover {
  background: var(--nebula-pink, #f97316);
  border-color: var(--nebula-pink, #f97316);
}

.cookie-btn-reject,
.cookie-btn-settings {
  background: transparent;
  color: var(--star-white, #f1f5f9);
  border-color: var(--line-soft, #334155);
}

.cookie-btn-reject:hover,
.cookie-btn-settings:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--comet-cyan, #64748b);
}

.cookie-settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.9);
}

.cookie-settings-modal.show { display: flex; }

.cookie-settings-content {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--g21-radius, 0);
  background: var(--space-dark, #0f172a);
  color: var(--star-white, #f1f5f9);
  border: var(--g21-border, 1px solid #334155);
  box-shadow: var(--shadow-lift, 0 4px 12px rgba(0, 0, 0, 0.3));
  animation: g21-cookie-modal-in 0.25s ease-out;
}

@keyframes g21-cookie-modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: var(--g21-border, 1px solid #334155);
}

.cookie-settings-header > div {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cookie-settings-close {
  padding: 0;
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink-muted, #94a3b8);
  cursor: pointer;
}

.cookie-settings-close:hover {
  color: var(--star-white, #f1f5f9);
}

.cookie-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: var(--g21-border, 1px solid #334155);
}

.cookie-setting-item:last-child { border-bottom: none; }

.cookie-setting-info > div {
  margin-bottom: 4px;
  font-size: 0.92rem;
  font-weight: 600;
}

.cookie-setting-info p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted, #94a3b8);
}

.cookie-toggle {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 26px;
}

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

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 0;
  background: #334155;
  transition: background 0.2s ease;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 20px;
  height: 20px;
  background: #94a3b8;
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--g21-accent-text, #ea580c);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(22px);
  background: #fff;
}

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

.cookie-settings-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: var(--g21-border, 1px solid #334155);
}

.cookie-settings-footer .cookie-btn-accept {
  background: var(--sun-gold, #fbbf24);
  color: var(--space-dark, #0f172a);
  border-color: var(--sun-gold, #fbbf24);
}

.cookie-settings-footer .cookie-btn-reject {
  background: transparent;
  color: var(--star-white, #f1f5f9);
  border-color: var(--line-soft, #334155);
}

@media (max-width: 768px) {
  .cookie-consent-banner {
    bottom: var(--g21-mobile-nav-h, 72px);
  }

  .cookie-consent-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-consent-buttons {
    width: 100%;
    justify-content: center;
  }

  .cookie-consent-buttons .cookie-btn {
    flex: 1;
    min-width: 0;
  }

  .cookie-setting-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-toggle { align-self: flex-end; }

  .cookie-settings-footer { flex-direction: column; }

  .cookie-settings-footer .cookie-btn { width: 100%; }
}
