/* ============================================================
   The Quantum Investor's Notebook — analytics consent popup
   Compact dark card, bottom-right on desktop, bottom panel on
   mobile. Uses the site's existing palette tokens. No full-screen
   overlay; position:fixed so it never shifts page layout.
   ============================================================ */

.tqinb-consent {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 2147483000;            /* above page content, below nothing important */
  width: 340px;
  max-width: calc(100vw - 36px);
  box-sizing: border-box;
  background: var(--navy-card, #18181b);
  color: var(--text-light, #e9ebf5);
  border: 1px solid var(--navy-line, #2e2e33);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  padding: 18px 18px 16px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  line-height: 1.5;
}

.tqinb-consent[hidden] { display: none; }

.tqinb-consent__title {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--white, #ffffff);
}

.tqinb-consent__body {
  margin: 0 0 14px;
  font-size: 0.84rem;
  color: var(--text-dim, #9aa0bd);
}

.tqinb-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tqinb-consent__btn {
  flex: 1 1 auto;
  min-width: 130px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tqinb-consent__btn--accept {
  background: var(--purple, #5b54e0);
  color: #ffffff;
}
.tqinb-consent__btn--accept:hover { background: var(--purple-dark, #4842c4); }

.tqinb-consent__btn--reject {
  background: transparent;
  color: var(--text-light, #e9ebf5);
  border-color: var(--navy-line, #2e2e33);
}
.tqinb-consent__btn--reject:hover { border-color: var(--text-dim, #9aa0bd); }

/* Visible, high-contrast focus state for keyboard users */
.tqinb-consent__btn:focus-visible,
.tqinb-consent__privacy a:focus-visible {
  outline: 2px solid var(--purple, #5b54e0);
  outline-offset: 2px;
}

.tqinb-consent__privacy {
  margin: 12px 0 0;
  font-size: 0.78rem;
}
.tqinb-consent__privacy a {
  color: var(--text-dim, #9aa0bd);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tqinb-consent__privacy a:hover { color: var(--text-light, #e9ebf5); }

/* Mobile: a comfortable bottom panel, both buttons easy to tap */
@media (max-width: 600px) {
  .tqinb-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    padding: 16px 16px 14px;
  }
  .tqinb-consent__btn { min-width: 0; padding: 12px 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  .tqinb-consent { animation: tqinb-consent-in 0.18s ease-out; }
  @keyframes tqinb-consent-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Footer links (Privacy + Cookie settings) ---------- */
.tqinb-footer-links {
  display: inline-block;
  margin-left: 10px;
}
/* Even spacing between footer links (Follow on X · Privacy · Cookie settings);
   the first item hugs the disclaimer's own 10px gap. */
.tqinb-footer-links a { margin-left: 10px; }
.tqinb-footer-links > a:first-child { margin-left: 0; }
.tqinb-footer-links a,
.tqinb-cookie-settings {
  color: var(--text-dim, #9aa0bd);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tqinb-cookie-settings {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 10px;
  cursor: pointer;
}
.tqinb-footer-links a:hover,
.tqinb-cookie-settings:hover { color: var(--text-light, #e9ebf5); }
.tqinb-footer-links a:focus-visible,
.tqinb-cookie-settings:focus-visible {
  outline: 2px solid var(--purple, #5b54e0);
  outline-offset: 2px;
}
