/* Plan picker (static/checkout.js) — Convergence Grid: Ink Navy #0D1F3C on
   Ice #F7F8FA, Plus Jakarta Sans text, IBM Plex Mono for prices/labels,
   2px radius, hairline borders, no shadows/gradients. Selected plan = Ink
   Navy border + filled dot, not colour. z-index 300 matches the auth and
   embedded-checkout overlays (above the paywall screen at 290). */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

.qr-plans-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(13, 31, 60, 0.55);
}
.qr-plans-overlay[hidden] { display: none; }

html.qr-plans-open,
html.qr-plans-open body { overflow: hidden; }

.qr-plans {
  box-sizing: border-box;
  width: 100%;
  max-width: 480px;
  padding: 24px 20px;
  background: #F7F8FA;
  color: #0D1F3C;
  border: 1px solid rgba(13, 31, 60, 0.16);
  border-radius: 2px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.qr-plans *, .qr-plans *::before { box-sizing: border-box; }

.qr-plans-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.qr-plans-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: #0D1F3C;
}
.qr-plans-title:focus { outline: none; }
.qr-plans-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(13, 31, 60, 0.16);
  border-radius: 2px;
  background: transparent;
  color: #0D1F3C;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* The guarantee — the most important element: full width, above the plans. */
.qr-guarantee {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #0D1F3C;
  border-radius: 2px;
}
.qr-guarantee-title {
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.qr-guarantee-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.qr-plan-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.qr-plan-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(13, 31, 60, 0.18);
  border-radius: 2px;
  cursor: pointer;
}
.qr-plan-opt[aria-checked="true"] {
  border: 2px solid #0D1F3C;
  padding: 13px 15px;
}
.qr-plan-opt:focus-visible { outline: 2px solid #0D1F3C; outline-offset: 2px; }
.qr-plan-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #0D1F3C;
  border-radius: 50%;
  align-self: center;
}
.qr-plan-opt[aria-checked="true"] .qr-plan-dot { background: #0D1F3C; }
.qr-plan-name { font-size: 15px; font-weight: 600; }
.qr-plan-price {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.qr-plan-detail {
  grid-column: 2 / -1;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(13, 31, 60, 0.72);
}
/* QuantumAI daily cap, stated before purchase: muted and small. */
.qr-plan-limit {
  grid-column: 2 / -1;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(13, 31, 60, 0.6);
}

.qr-plans-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #0D1F3C;
  border-radius: 2px;
  background: #0D1F3C;
  color: #F7F8FA;
  font: 600 15px 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
}
.qr-plans-btn:disabled { opacity: 0.55; cursor: default; }
.qr-plans-btn:focus-visible,
.qr-plans-close:focus-visible { outline: 2px solid #0D1F3C; outline-offset: 2px; }

/* Cancel flow: hairline secondary action under the primary button. */
.qr-plans-btn-secondary {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(13, 31, 60, 0.24);
  border-radius: 2px;
  background: transparent;
  color: #0D1F3C;
  font: 600 14px 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
}
.qr-plans-btn-secondary:disabled { opacity: 0.55; cursor: default; }
.qr-plans-btn-secondary:focus-visible { outline: 2px solid #0D1F3C; outline-offset: 2px; }
.qr-plans-notice {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid #0D1F3C;
  border-radius: 2px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.45;
}

/* Premium card in Account settings: guarantee countdown + cancel. These sit
   inside each page's own settings modal, so colours come from its tokens. */
.qr-sub-guarantee {
  margin: 0 0 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-primary, #0D1F3C);
}
.qr-sub-cancel {
  width: 100%;
  margin-top: 8px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border, rgba(13, 31, 60, 0.24));
  border-radius: 2px;
  background: transparent;
  color: var(--text-primary, #0D1F3C);
  font: 600 0.85rem 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
}
.qr-sub-cancel:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.qr-plans-error {
  min-height: 0;
  margin-top: 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #0D1F3C;
}
.qr-plans-error:empty { display: none; }

.qr-plans-msg {
  margin: 16px 0;
  font-size: 15px;
  line-height: 1.5;
}

.qr-plans-small {
  margin: 10px 0 0;
  text-align: center;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: rgba(13, 31, 60, 0.66);
}

/* Narrow screens: plans already stack; keep a 16px gutter, tighten the
   top so the guarantee sits in the first screenful at ~380px wide. */
@media (max-width: 480px) {
  .qr-plans-overlay { padding: 12px 16px; }
  .qr-plans { padding: 18px 16px; }
  .qr-guarantee { margin: 12px 0; }
  .qr-plan-opt { grid-template-columns: auto 1fr; }
  .qr-plan-price { grid-column: 2; }
}
