/* Modern shell for the Terms & Privacy pages, plus the checkout legal modal.
   Loaded together with the shared modern tokens and components. */

body.inavmLegalPage {
  --modern-shell-measure: 860px;
  background: var(--modern-surface-subtle);
}
.inavm-legal-main {
  padding: clamp(26px, 5vw, 54px) 0 64px;
}

.inavm-legal-card {
  padding: clamp(20px, 3.6vw, 40px);
  border: 1.5px solid var(--modern-line);
  border-radius: var(--modern-radius-lg);
  background: var(--modern-surface);
  box-shadow: var(--modern-shadow-md);
}

.inavm-legal-footnote {
  margin: var(--modern-space-5) 4px 0;
  color: var(--modern-ink-muted);
  font-size: .86rem;
}

/* ------------------------------------------------------------------
   Shared legal document typography (page card and checkout modal).
   ------------------------------------------------------------------ */

.inavm-legal-doc {
  color: var(--modern-ink-soft);
  font-size: .95rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.inavm-legal-doc h1 {
  margin: 0 0 14px;
  color: var(--modern-ink);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 800;
  text-align: left;
}

.inavm-legal-doc h3 {
  margin: 34px 0 10px;
  color: var(--modern-ink);
  font-size: 1.18rem;
  font-weight: 700;
}

.inavm-legal-doc h4,
.inavm-legal-doc h5 {
  margin: 0 0 14px;
  color: var(--modern-ink-soft);
  font-family: var(--modern-font-sans);
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.65;
}

.inavm-legal-doc h4 {
  margin-bottom: 20px;
}

.inavm-legal-doc p {
  margin: 0 0 14px;
}

.inavm-legal-doc ol,
.inavm-legal-doc ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.inavm-legal-doc ol.style-none,
.inavm-legal-doc ul li {
  list-style: none;
  padding-left: 0;
}

.inavm-legal-doc li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.inavm-legal-doc strong {
  color: var(--modern-ink);
  font-weight: 700;
}

.inavm-legal-doc a {
  color: var(--modern-brand-deep);
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   Termly export overrides (privacy policy). The generated markup uses
   [data-custom-class] selectors with !important, so these must too.
   ------------------------------------------------------------------ */

body.inavmModernShell .inavm-legal-doc [data-custom-class],
body.inavmModernShell .inavm-legal-doc [data-custom-class] *,
body.inavmModernShell .inavm-legal-doc [data-custom-class='body_text'],
body.inavmModernShell .inavm-legal-doc [data-custom-class='body_text'] * {
  font-family: var(--modern-font-sans) !important;
  font-size: .95rem !important;
  color: var(--modern-ink-soft) !important;
  line-height: 1.65 !important;
}

body.inavmModernShell .inavm-legal-doc [data-custom-class='title'],
body.inavmModernShell .inavm-legal-doc [data-custom-class='title'] * {
  font-family: var(--modern-font-display) !important;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem) !important;
  font-weight: 800 !important;
  color: var(--modern-ink) !important;
  line-height: 1.2 !important;
}

body.inavmModernShell .inavm-legal-doc [data-custom-class='subtitle'],
body.inavmModernShell .inavm-legal-doc [data-custom-class='subtitle'] * {
  font-size: .86rem !important;
  color: var(--modern-ink-muted) !important;
}

body.inavmModernShell .inavm-legal-doc [data-custom-class='heading_1'],
body.inavmModernShell .inavm-legal-doc [data-custom-class='heading_1'] * {
  font-family: var(--modern-font-display) !important;
  font-size: 1.18rem !important;
  font-weight: 700 !important;
  color: var(--modern-ink) !important;
  line-height: 1.3 !important;
}

body.inavmModernShell .inavm-legal-doc [data-custom-class='heading_2'],
body.inavmModernShell .inavm-legal-doc [data-custom-class='heading_2'] * {
  font-family: var(--modern-font-sans) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--modern-ink) !important;
}

body.inavmModernShell .inavm-legal-doc [data-custom-class='link'],
body.inavmModernShell .inavm-legal-doc [data-custom-class='link'] *,
body.inavmModernShell .inavm-legal-doc a,
body.inavmModernShell .inavm-legal-doc a * {
  color: var(--modern-brand-deep) !important;
  text-decoration: underline !important;
  word-break: break-word !important;
}

/* ------------------------------------------------------------------
   Checkout legal modal.
   ------------------------------------------------------------------ */

.iqv2-modal--legal {
  width: min(760px, 100%);
}

.iqv2-modal--legal .iqv2-modal__head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.iqv2-modal--legal .iqv2-modal__head h2 i {
  color: var(--modern-brand);
  font-size: 1rem;
}

.iqv2-modal--legal .iqv2-modal__foot {
  justify-content: space-between;
  align-items: center;
}

.iqv2-legal-open-full {
  color: var(--modern-brand-deep);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: underline;
}

.iqv2-legal-host {
  min-height: 120px;
  display: grid;
  align-content: start;
  gap: 10px;
  color: var(--modern-ink-soft);
}

.iqv2-legal-host .modern-spinner {
  color: var(--modern-brand);
}

.iqv2-legal-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

/* Inside the modal the dialog header already names the document. */
.iqv2-modal--legal .inavm-legal-doc > h1:first-child,
body.inavmModernShell .iqv2-modal--legal .inavm-legal-doc [data-custom-class='title'] {
  display: none !important;
}
