/* 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, #0f2847);
  color: var(--star-white, #e8f4fc);
  border-top: 1px solid var(--line-soft, rgba(56, 189, 248, 0.22));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  font-family: inherit;
  animation: tgn-cookie-slide-up 0.35s ease-out;
}

@keyframes tgn-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: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--comet-cyan, #34d399);
}

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

.cookie-consent-text a {
  color: var(--comet-cyan, #34d399);
  font-weight: 600;
  text-decoration: underline;
}

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

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

.cookie-btn-accept {
  background: var(--comet-cyan, #34d399);
  color: var(--space-dark, #061220);
  border-color: var(--comet-cyan, #34d399);
}

.cookie-btn-reject,
.cookie-btn-settings {
  background: transparent;
  color: var(--star-white, #e8f4fc);
  border-color: var(--line-soft, rgba(56, 189, 248, 0.35));
}

.cookie-btn-reject:hover,
.cookie-btn-settings:hover {
  background: rgba(15, 40, 71, 0.6);
}

.cookie-settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 18, 32, 0.88);
}

.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(--g16-radius-lg, 20px);
  background: var(--star-white, #e8f4fc);
  color: var(--space-dark, #061220);
  border: 1px solid var(--line-soft, rgba(56, 189, 248, 0.35));
  box-shadow: var(--shadow-card, 0 4px 24px rgba(0, 0, 0, 0.35));
  animation: tgn-cookie-modal-in 0.25s ease-out;
}

@keyframes tgn-cookie-modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(6, 18, 32, 0.12);
}

.cookie-settings-header > div { font-size: 1.2rem; font-weight: 700; }

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

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

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

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

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

.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: 26px;
  background: #cbd5e1;
  transition: background 0.25s ease;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--comet-cyan, #34d399);
}

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

.cookie-toggle.disabled { opacity: 0.55; 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: 1px solid rgba(6, 18, 32, 0.1);
}

.cookie-settings-footer .cookie-btn-accept {
  background: var(--comet-cyan, #34d399);
  color: var(--space-dark, #061220);
}

@media (max-width: 768px) {
  .cookie-consent-banner { bottom: 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%; }
}
