/* Legal UI: cookie/consent banner, age check, renewal terms, report buttons, legal footer.
   Works in the dark and light themes (uses the app's own colours when they exist). */
:root {
  --lg-ui-bg: var(--bg-secondary, #11161f);
  --lg-ui-text: var(--text-primary, #e5e7eb);
  --lg-ui-muted: var(--text-secondary, #94a3b8);
  --lg-ui-line: rgba(255, 255, 255, 0.1);
  --lg-ui-accent: #2ee6b6;
  --lg-ui-accent-ink: #052e25;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --lg-ui-bg: #ffffff; --lg-ui-text: #111827; --lg-ui-muted: #4b5563;
    --lg-ui-line: rgba(0, 0, 0, 0.1); --lg-ui-accent: #0d9488; --lg-ui-accent-ink: #ffffff;
  }
}
[data-theme="light"] {
  --lg-ui-bg: #ffffff; --lg-ui-text: #111827; --lg-ui-muted: #4b5563;
  --lg-ui-line: rgba(0, 0, 0, 0.1); --lg-ui-accent: #0d9488; --lg-ui-accent-ink: #ffffff;
}

/* ---------- consent banner ---------- */
.gx-consent {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 100000;
  width: min(720px, calc(100vw - 24px)); background: var(--lg-ui-bg); color: var(--lg-ui-text);
  border: 1px solid var(--lg-ui-line); border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); font: 14px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.gx-consent h2 { font-size: 15px; margin: 0 0 4px; }
.gx-consent p { margin: 0 0 12px; color: var(--lg-ui-muted); }
.gx-consent a { color: var(--lg-ui-accent); }
.gx-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.gx-btn {
  font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--lg-ui-line); background: transparent; color: var(--lg-ui-text);
}
.gx-btn.primary { background: var(--lg-ui-accent); color: var(--lg-ui-accent-ink); border-color: transparent; }
.gx-btn:focus-visible { outline: 2px solid var(--lg-ui-accent); outline-offset: 2px; }
.gx-consent-cats { display: grid; gap: 10px; margin: 4px 0 14px; }
.gx-cat { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--lg-ui-line); border-radius: 12px; }
.gx-cat input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--lg-ui-accent); flex: none; }
.gx-cat b { display: block; }
.gx-cat small { color: var(--lg-ui-muted); }

/* ---------- age check ---------- */
.gx-modal {
  position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 16px;
  background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(6px);
}
.gx-card {
  width: min(420px, 100%); background: var(--lg-ui-bg); color: var(--lg-ui-text); border: 1px solid var(--lg-ui-line);
  border-radius: 18px; padding: 24px; font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.gx-card h2 { margin: 0 0 6px; font-size: 20px; }
.gx-card p { margin: 0 0 14px; color: var(--lg-ui-muted); }
.gx-card label span { display: block; font-weight: 600; margin-bottom: 6px; }
.gx-card input[type="date"] {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--lg-ui-line);
  background: transparent; color: var(--lg-ui-text); color-scheme: dark light;
}
.gx-card .gx-err { color: #f87171; min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.gx-card .gx-consent-actions { margin-top: 16px; }

/* ---------- renewal terms on the plans page ---------- */
.pl-consent {
  display: flex; gap: 10px; align-items: flex-start; max-width: 760px; margin: 0 auto 18px;
  padding: 12px 14px; border: 1px solid var(--lg-ui-line); border-radius: 12px; font-size: 14px; line-height: 1.5;
  color: var(--lg-ui-text); cursor: pointer;
}
.pl-consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--lg-ui-accent); }
.pl-consent a { color: var(--lg-ui-accent); }
.pl-consent.need { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.plan-terms { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--lg-ui-muted); }
.pl-manage { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 18px 0 6px; font-size: 13px; color: var(--lg-ui-muted); }

/* ---------- footer links ---------- */
.gx-legal-foot { margin: 28px auto 8px; text-align: center; font-size: 12.5px; color: var(--lg-ui-muted); }
.gx-legal-foot a, .gx-legal-foot button {
  color: var(--lg-ui-muted); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0;
}
.gx-legal-foot a:hover, .gx-legal-foot button:hover { color: var(--lg-ui-accent); text-decoration: underline; }
.gx-legal-foot .sep { margin: 0 6px; opacity: 0.5; }
