/* 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: 16px max(16px, env(safe-area-inset-left, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
  background: var(--g29-veil, rgba(20, 14, 9, 0.96));
  backdrop-filter: blur(10px);
  color: var(--star-white, #f5efe6);
  border-top: 1px solid var(--g29-border-strong, rgba(232, 93, 4, 0.22));
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.45);
  font-family: var(--g29-font, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  animation: g29-cookie-slide-up 0.3s ease-out;
}

@keyframes g29-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: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.cookie-consent-text {
  flex: 1;
  min-width: min(100%, 280px);
}

.cookie-consent-text > div:first-child {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--comet-cyan, #fb923c);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.cookie-consent-text a {
  color: var(--comet-cyan, #fb923c);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-text a:hover {
  color: var(--sun-gold, #fbbf24);
}

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

.cookie-btn {
  padding: 10px 18px;
  border-radius: var(--g29-radius, 12px);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, var(--nebula-pink, #e85d04), var(--comet-cyan, #fb923c));
  color: #fff;
  border: none;
}

.cookie-btn-accept:hover {
  transform: translateY(-1px);
}

.cookie-btn-reject,
.cookie-btn-settings {
  background: var(--space-blue, #1c1610);
  color: var(--star-white, #f5efe6);
  border-color: var(--line-soft, rgba(232, 93, 4, 0.32));
}

.cookie-btn-reject:hover,
.cookie-btn-settings:hover {
  background: var(--g29-accent-hover, rgba(232, 93, 4, 0.15));
  border-color: var(--nebula-pink, #e85d04);
}

.cookie-settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(12, 9, 6, 0.88);
}

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

.cookie-settings-content {
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  padding: 22px 20px;
  border-radius: var(--g29-radius-lg, 16px);
  background: var(--space-blue, #1c1610);
  color: var(--star-white, #f5efe6);
  border: 1px solid var(--g29-border-mid, rgba(251, 146, 60, 0.14));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  animation: g29-cookie-modal-in 0.25s ease-out;
}

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

.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--g29-border, rgba(251, 191, 36, 0.1));
}

.cookie-settings-header > div {
  font-size: 1rem;
  font-weight: 700;
  color: var(--comet-cyan, #fb923c);
}

.cookie-settings-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--g29-border-mid, rgba(251, 146, 60, 0.14));
  border-radius: 50%;
  background: var(--g29-surface, #2a2218);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--star-white, #f5efe6);
  cursor: pointer;
}

.cookie-settings-close:hover {
  border-color: var(--nebula-pink, #e85d04);
  background: var(--g29-accent-hover, rgba(232, 93, 4, 0.15));
}

.cookie-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--g29-border, rgba(251, 191, 36, 0.1));
}

.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, #a89888);
}

.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: 999px;
  background: var(--g29-surface, #2a2218);
  border: 1px solid var(--g29-border-mid, rgba(251, 146, 60, 0.14));
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-muted, #a89888);
  transition: transform 0.2s ease, background 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--g29-accent-muted, rgba(232, 93, 4, 0.2));
  border-color: var(--nebula-pink, #e85d04);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(22px);
  background: var(--sun-gold, #fbbf24);
}

.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: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--g29-border, rgba(251, 191, 36, 0.1));
}

.cookie-settings-footer .cookie-btn-accept {
  background: linear-gradient(135deg, var(--nebula-pink, #e85d04), var(--comet-cyan, #fb923c));
  color: #fff;
  border: none;
}

.cookie-settings-footer .cookie-btn-reject {
  background: var(--g29-surface, #2a2218);
  color: var(--star-white, #f5efe6);
  border-color: var(--line-soft, rgba(232, 93, 4, 0.32));
}

@media (max-width: 768px) {
  .cookie-consent-banner {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 16px;
  }

  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .cookie-consent-buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookie-consent-buttons .cookie-btn {
    width: 100%;
    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%;
  }
}
