/* Information pages share the Figma navy surface hierarchy with the app. */

body:has(.privacy-page) {
  min-height: 100vh;
  color: var(--ui-ink, #f3f6ff);
  background:
    radial-gradient(circle at 50% -10%, rgba(18, 191, 255, 0.14), transparent 32rem),
    linear-gradient(180deg, #020b1c 0%, #06152c 56%, #020812 100%) !important;
  background-color: #020b1c !important;
}

body:has(.privacy-page)::before {
  display: none;
}

.privacy-page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.privacy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--ui-line, rgba(99, 181, 255, 0.42));
  border-radius: var(--radius-lg, 14px);
  background: rgba(3, 20, 49, 0.88);
  box-shadow: var(--ui-shadow, 0 16px 36px rgba(0, 0, 0, 0.24));
  /* Positioning anchor for .menu-drawer's absolute placement (mirrors .topbar in the main app). */
  position: relative;
}

.privacy-brand {
  width: 156px;
  height: auto;
}

.privacy-back-link,
.privacy-document a {
  color: var(--ui-ink, #f3f6ff);
  text-decoration-color: var(--ui-blue-soft, #63b5ff);
  text-underline-offset: 0.22em;
}

.privacy-back-link {
  font-weight: 800;
}

.privacy-language {
  display: grid;
  gap: 5px;
  color: var(--ui-muted, #9fb4d2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.privacy-language select {
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--ui-line, rgba(99, 181, 255, 0.42));
  border-radius: var(--radius-sm, 8px);
  background: rgba(2, 13, 31, 0.78);
  color: var(--ui-ink, #f3f6ff);
}

.privacy-document {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--ui-line, rgba(99, 181, 255, 0.42));
  border-radius: var(--radius-lg, 14px);
  background: linear-gradient(145deg, rgba(18, 109, 184, 0.12), transparent 42%), rgba(3, 20, 49, 0.88);
  box-shadow: var(--ui-shadow, 0 16px 36px rgba(0, 0, 0, 0.24));
}

.privacy-document .eyebrow {
  color: var(--ui-blue-soft, #63b5ff);
}

.privacy-document h1,
.privacy-document h2 {
  color: var(--ui-ink, #f3f6ff);
}

.privacy-document h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.privacy-document h2 {
  margin-top: 14px;
  font-size: 1.2rem;
}

.privacy-document p {
  color: var(--ui-muted, #9fb4d2);
}

@media (max-width: 560px) {
  .privacy-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-page {
    width: min(100% - 20px, 920px);
    padding-top: 10px;
  }
}


/* Inside the popup (?embed=1): the popup provides the close button, so the page drops its own header. */
html.embedded .privacy-header { display: none; }
html.embedded .privacy-page { padding-top: 16px; }
html.embedded .privacy-document { position: relative; }

.embedded-close { display: none; }

/* The X sits inside the card, in its top right corner. */
html.embedded .embedded-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--ds-border-strong, rgba(255, 255, 255, 0.28));
  border-radius: 999px;
  background: rgba(6, 21, 44, 0.92);
  color: var(--text-primary, #f3f6ff);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

html.embedded .embedded-close:hover,
html.embedded .embedded-close:focus-visible {
  border-color: var(--gold-bright, #f5c04a);
  color: var(--gold-bright, #f5c04a);
}

html.embedded .privacy-document h1 { padding-right: 52px; }
