/*
 * /account/subscribe{,-pt,-es,-fr,-it,-de} — the page someone lands on to pay.
 *
 * It looks like the wallet on the computer on purpose: same navy canvas, same surfaces and
 * borders, same type, same card and button shapes. Every value below is taken from
 * api-server/src/main/resources/portfolio.css (the wallet's own sheet) — the --qc-estate-* tokens
 * verbatim, and the "Plan and credits" modal's .portfolio-billing-* rules for the cards — so a
 * person who pays here recognises the product they have been using. When the wallet changes
 * colour, change these with it; do not restyle the wallet to fit this page.
 *
 * Self-contained: it no longer loads legal.css or account-deletion.css, whose light theme is the
 * legal pages', not the wallet's.
 */

:root {
  color-scheme: dark;
  /* portfolio.css :root */
  --qc-estate-canvas: #041436;
  --qc-estate-surface: #071a3f;
  --qc-estate-surface-raised: #0a2048;
  --qc-estate-border: #152a52;
  /* portfolio.css body / .muted / .portfolio-billing-* */
  --text: #e2e8f0;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --price: #dbeafe;
  --accent: #60a5fa;
  --accent-strong: #2563eb;
  --accent-deep: #1d4ed8;
  --savings: #4ade80;
  --topup: #fbbf24;
  --danger: #fca5a5;
  --radius-card: 16px;
  --radius-box: 12px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--qc-estate-canvas);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.ql-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── header / footer ─────────────────────────────────────────────────────────── */

.ql-top {
  border-bottom: 1px solid var(--qc-estate-border);
}

.ql-top .ql-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.ql-brand img {
  display: block;
  height: auto;
  max-height: 40px;
  max-width: min(200px, 50vw);
}

.ql-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  font-size: 12px;
}

.ql-langs a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
}

.ql-langs a[aria-current="page"] {
  color: var(--text);
  background: rgba(59, 130, 246, 0.2);
}

.ql-foot {
  border-top: 1px solid var(--qc-estate-border);
  margin-top: 40px;
  padding: 18px 0 28px;
  font-size: 12px;
  color: var(--muted);
}

.ql-foot a { color: var(--muted); }

.ql-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
}

/* ── the page ────────────────────────────────────────────────────────────────── */

.ql-head {
  padding: 28px 0 18px;
}

.ql-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
}

.ql-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.ql-panel {
  background: var(--qc-estate-surface);
  border: 1px solid var(--qc-estate-border);
  border-radius: var(--radius-card);
  padding: 20px;
}

.ql-section + .ql-section {
  margin-top: 22px;
}

.ql-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── forms (email, code) ─────────────────────────────────────────────────────── */

.ql-form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.ql-label {
  font-size: 14px;
  font-weight: 600;
}

.ql-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--qc-estate-border);
  border-radius: 10px;
  padding: 11px 12px;
}

.ql-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.ql-input-code {
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
  max-width: 200px;
}

.ql-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.ql-sent {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
}

.ql-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.ql-btn-primary {
  background: linear-gradient(180deg, var(--accent-strong) 0%, var(--accent-deep) 100%);
  border-color: var(--accent);
  color: #eff6ff;
}

.ql-btn-primary:hover:not([disabled]) {
  background: linear-gradient(180deg, #3b82f6 0%, var(--accent-strong) 100%);
  transform: translateY(-1px);
}

.ql-btn-quiet {
  background: transparent;
  border-color: var(--qc-estate-border);
  color: var(--text-soft);
}

.ql-btn-quiet:hover:not([disabled]) {
  border-color: #334155;
  background: rgba(148, 163, 184, 0.08);
}

.ql-btn[disabled] {
  cursor: default;
  opacity: 0.6;
}

.ql-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid transparent;
}

.ql-status-info { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); }
.ql-status-ok { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); }
.ql-status-error { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: var(--danger); }

.ql-checkout-banner { margin-bottom: 14px; }

/* ── the wallet you are paying for, and what it has today ────────────────────── */

/* portfolio.css .portfolio-billing-summary */
.ql-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-box);
  border: 1px solid var(--qc-estate-border);
  background: rgba(15, 23, 42, 0.55);
}

.ql-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.ql-summary-row strong {
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
}

.ql-summary + .ql-hint { margin-top: 8px; }

/* ── the three options (portfolio.css .portfolio-billing-plan-*) ─────────────── */

.ql-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 760px) {
  .ql-plans { grid-template-columns: 1fr; }
}

.ql-plan-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--qc-estate-border);
  border-radius: var(--radius-card);
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.ql-plan-card.is-plus {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.ql-plan-card.is-topup {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
}

.ql-plan-name {
  margin: 0 0 4px;
  font-size: 16px;
}

.ql-plan-price {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--price);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ql-plan-card.is-topup .ql-plan-price { color: var(--topup); }

.ql-plan-savings {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--savings);
}

.ql-plan-features {
  margin: 12px 0 16px;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  flex: 1 1 auto;
}

.ql-plan-card .ql-btn {
  width: 100%;
  margin-top: auto;
}

.ql-plan-card .ql-status { margin-top: 10px; }

.ql-manage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
}

.ql-plans + .ql-hint { margin-top: 12px; }

/* A long address must not break letter by letter beside its label on a phone. */
@media (max-width: 520px) {
  .ql-summary-row { flex-direction: column; gap: 0; }
  .ql-summary-row strong { text-align: left; }
}

/* ── the wallet chooser, when one address opens several (account-auth.js) ────── */

.ql-choices {
  display: grid;
  gap: 8px;
}

.ql-choice {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
}

.ql-choice-name {
  color: var(--text);
  font-weight: 700;
}

.ql-choice-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.ql-notice { margin-bottom: 12px; }
