/* Billing: plans, checkout sheet, return screens, Settings billing card.
   Frosted glass over a soft mesh. Nexcha orange is the only accent; everything else is neutral.
   Dark mode follows the site's body.dark switch. */

.nxb, .nxb-layer {
  --nxb-accent: #E8590C;          /* rings, ticks, icons (3:1 or better on light glass) */
  --nxb-accent-solid: #C84B0A;    /* filled buttons: white text at 4.7:1 */
  --nxb-accent-press: #B3430A;
  --nxb-ink: #1C1A18;
  --nxb-muted: #5F5A54;           /* 5.9:1 on the light glass */
  --nxb-glass: rgba(255, 255, 255, 0.64);
  --nxb-glass-strong: rgba(255, 255, 255, 0.86);
  --nxb-hairline: rgba(28, 26, 24, 0.08);
  --nxb-edge: rgba(255, 255, 255, 0.75);
  --nxb-row: rgba(28, 26, 24, 0.035);
  --nxb-shadow: 0 1px 1px rgba(28, 26, 24, 0.04), 0 8px 24px rgba(28, 26, 24, 0.06), 0 24px 60px rgba(28, 26, 24, 0.08);
  --nxb-good: #1F6B43;
  --nxb-good-bg: rgba(47, 125, 79, 0.12);
  --nxb-warn: #8A4B00;
  --nxb-warn-bg: rgba(232, 140, 12, 0.14);
  --nxb-bad: #9A3412;
  --nxb-bad-bg: rgba(196, 66, 30, 0.10);
  --nxb-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --nxb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--nxb-ink);
  font-family: var(--nxb-font);
}
body.dark .nxb, body.dark .nxb-layer {
  --nxb-accent: #FF7A2E;
  --nxb-ink: #F2EEE9;
  --nxb-muted: #B3ACA3;           /* 7:1 on the dark glass */
  --nxb-glass: rgba(30, 29, 28, 0.62);
  --nxb-glass-strong: rgba(32, 31, 30, 0.9);
  --nxb-hairline: rgba(255, 255, 255, 0.08);
  --nxb-edge: rgba(255, 255, 255, 0.06);
  --nxb-row: rgba(255, 255, 255, 0.04);
  --nxb-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35), 0 30px 80px rgba(0, 0, 0, 0.35);
  --nxb-good: #7DD3A2;
  --nxb-good-bg: rgba(125, 211, 162, 0.12);
  --nxb-warn: #F6B26B;
  --nxb-warn-bg: rgba(246, 178, 107, 0.12);
  --nxb-bad: #F4A38A;
  --nxb-bad-bg: rgba(244, 163, 138, 0.12);
}

/* ---------- Surfaces ---------- */
.nxb-glass, .nxb-plan, .nxb-status {
  background: var(--nxb-glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--nxb-hairline);
  box-shadow: inset 0 1px 0 var(--nxb-edge), var(--nxb-shadow);
  border-radius: 24px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nxb-glass, .nxb-plan, .nxb-status { background: var(--nxb-glass-strong); }
}

/* ---------- Plans page ---------- */
#page-subscription .nxb {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 0 48px;
  isolation: isolate;
}
.nxb-mesh {
  position: absolute;
  inset: -40px -16px 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 18% 12%, rgba(232, 89, 12, 0.13), transparent 70%),
    radial-gradient(30% 30% at 84% 22%, rgba(232, 89, 12, 0.08), transparent 70%),
    radial-gradient(40% 40% at 70% 78%, rgba(120, 113, 105, 0.12), transparent 70%),
    radial-gradient(34% 36% at 10% 82%, rgba(160, 150, 140, 0.12), transparent 70%);
  filter: blur(8px);
}
body.dark .nxb-mesh {
  background:
    radial-gradient(38% 34% at 18% 12%, rgba(232, 89, 12, 0.16), transparent 70%),
    radial-gradient(30% 30% at 84% 22%, rgba(232, 89, 12, 0.08), transparent 70%),
    radial-gradient(40% 40% at 70% 78%, rgba(255, 255, 255, 0.04), transparent 70%);
}
.nxb-head { text-align: center; max-width: 640px; margin: 8px auto 28px; }
.nxb-eyebrow { margin: 0 0 6px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nxb-accent); }
.nxb .nx-page-title { margin: 0; font-family: var(--nxb-font); font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; color: var(--nxb-ink); }
.nxb-lede { margin: 12px auto 0; font-size: 1.02rem; line-height: 1.55; color: var(--nxb-muted); }

.nxb-status { max-width: 760px; margin: 0 auto 28px; padding: 18px 22px; }
.nxb-status-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nxb-status-label { font-size: 0.82rem; color: var(--nxb-muted); }
.nxb-status-plan { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.nxb-status-line { margin: 6px 0 0; color: var(--nxb-muted); line-height: 1.5; }
.nxb-status-note { margin: 10px 0 0; font-size: 0.9rem; color: var(--nxb-muted); }
.nxb-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--nxb-row); color: var(--nxb-muted); border: 1px solid var(--nxb-hairline); }
.nxb-status-pill.sm { padding: 2px 9px; font-size: 0.74rem; }
.nxb-status-pill.good { background: var(--nxb-good-bg); color: var(--nxb-good); border-color: transparent; }
.nxb-status-pill.warn { background: var(--nxb-warn-bg); color: var(--nxb-warn); border-color: transparent; }
.nxb-status-pill.bad { background: var(--nxb-bad-bg); color: var(--nxb-bad); border-color: transparent; }

.nxb-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.nxb-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  border-radius: 28px;
  transition: transform 260ms var(--nxb-ease), box-shadow 260ms var(--nxb-ease);
}
.nxb-plan:hover { transform: translateY(-2px); }
.nxb-plan.is-popular { box-shadow: inset 0 1px 0 var(--nxb-edge), 0 0 0 2px var(--nxb-accent), var(--nxb-shadow); }
.nxb-plan.is-current:not(.is-popular) { box-shadow: inset 0 1px 0 var(--nxb-edge), 0 0 0 1.5px var(--nxb-hairline), var(--nxb-shadow); }
.nxb-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nxb-accent);
  background: rgba(232, 89, 12, 0.1);
  border: 1px solid rgba(232, 89, 12, 0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nxb-plan-name { margin: 0; font-family: var(--nxb-font); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; color: var(--nxb-ink); }
.nxb-plan-tag { margin: 4px 0 0; font-size: 0.9rem; color: var(--nxb-muted); }
.nxb-price { display: flex; align-items: baseline; gap: 4px; margin: 18px 0 20px; }
.nxb-amount { font-size: 3rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: var(--nxb-ink); font-feature-settings: 'tnum'; }
.nxb-per { font-size: 1rem; color: var(--nxb-muted); font-weight: 500; }
.nxb-benefits { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 11px; }
.nxb-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; line-height: 1.4; color: var(--nxb-ink); }
.nxb-benefits li::before {
  content: '';
  flex: 0 0 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(232, 89, 12, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%23C84B0A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
body.dark .nxb-benefits li::before { background-color: rgba(255, 122, 46, 0.16); }
.nxb-benefits li.is-off { color: var(--nxb-muted); }
.nxb-benefits li.is-off::before { background: var(--nxb-row) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 8h6' stroke='%238A847C' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.nxb-plan-foot { margin-top: auto; display: grid; gap: 10px; }
.nxb-current { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 48px; font-weight: 600; font-size: 0.95rem; color: var(--nxb-muted); }
.nxb-current::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--nxb-good); }
.nxb-current[hidden] { display: none; }
.nxb-foot { margin: 28px auto 0; text-align: center; font-size: 0.88rem; color: var(--nxb-muted); max-width: 560px; line-height: 1.5; }
.nxb-foot i { margin-right: 6px; }

/* ---------- Buttons ---------- */
.nxb-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: 600 1rem/1 var(--nxb-font);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 200ms var(--nxb-ease), background-color 200ms var(--nxb-ease), box-shadow 200ms var(--nxb-ease), opacity 200ms;
  -webkit-tap-highlight-color: transparent;
}
.nxb-btn:active:not(:disabled) { transform: scale(0.98); }
.nxb-btn:focus-visible, .nxb-close:focus-visible, .nxb-switch:focus-visible, .nxb-sheet:focus-visible { outline: 3px solid rgba(232, 89, 12, 0.5); outline-offset: 2px; }
.nxb-sheet:focus:not(:focus-visible) { outline: none; }
.nxb-primary { background: var(--nxb-accent-solid); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px rgba(200, 75, 10, 0.24); }
.nxb-primary:hover:not(:disabled) { background: var(--nxb-accent-press); }
.nxb-quiet { background: var(--nxb-row); color: var(--nxb-ink); border-color: var(--nxb-hairline); }
.nxb-quiet:hover:not(:disabled) { background: rgba(28, 26, 24, 0.07); }
body.dark .nxb-quiet:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.nxb-btn:disabled { cursor: not-allowed; opacity: 0.5; box-shadow: none; }
.nxb-btn.is-busy:disabled { opacity: 0.85; cursor: progress; }
.nxb-wide { width: 100%; }
.nxb-btn[hidden] { display: none; }

/* ---------- Checkout layer ---------- */
body.nxb-locked { overflow: hidden; }
.nxb-layer { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 24px 16px; }
.nxb-scrim { position: absolute; inset: 0; background: rgba(20, 18, 16, 0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 260ms var(--nxb-ease); }
.nxb-sheet {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: var(--nxb-glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 260ms var(--nxb-ease), transform 260ms var(--nxb-ease);
}
.nxb-layer.is-open .nxb-scrim { opacity: 1; }
.nxb-layer.is-open .nxb-sheet { opacity: 1; transform: none; }
.nxb-sheet.is-dragging { transition: none; }
.nxb-grabber { display: none; }
.nxb-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--nxb-row); color: var(--nxb-muted);
  display: grid; place-items: center; cursor: pointer; font-size: 0.95rem;
  transition: background-color 200ms;
}
.nxb-close:hover { background: rgba(28, 26, 24, 0.08); }
.nxb-close[hidden] { display: none; }
.nxb-sheet-head { margin: 0 40px 18px 0; }
.nxb-sheet-title { margin: 0; font-family: var(--nxb-font); font-size: 1.45rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: var(--nxb-ink); }
.nxb-group { border-radius: 18px; background: var(--nxb-row); border: 1px solid var(--nxb-hairline); margin: 0 0 12px; overflow: hidden; }
.nxb-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; }
.nxb-row + .nxb-row { border-top: 1px solid var(--nxb-hairline); }
.nxb-row-label { flex: 1; min-width: 0; font-size: 0.97rem; font-weight: 500; }
.nxb-row-label small { display: block; margin-top: 3px; font-size: 0.82rem; font-weight: 400; color: var(--nxb-muted); overflow-wrap: anywhere; }
.nxb-row-value { font-weight: 600; font-feature-settings: 'tnum'; text-align: right; }
.nxb-total .nxb-row-label, .nxb-total .nxb-row-value { font-size: 1.08rem; font-weight: 700; }
.nxb-toggle-row { cursor: pointer; }
.nxb-avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(140deg, #E8590C, #9A3A08); }
.nxb-check-ok { color: var(--nxb-good); font-size: 0.95rem; }
.nxb-switch {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 51px; width: 51px; height: 31px; border-radius: 999px;
  background: rgba(120, 113, 105, 0.32); position: relative; cursor: pointer; margin: 0;
  transition: background-color 220ms var(--nxb-ease);
}
.nxb-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 220ms var(--nxb-ease); }
.nxb-switch:checked { background: var(--nxb-accent-solid); }
.nxb-switch:checked::after { transform: translateX(20px); }
.nxb-fine { margin: 4px 2px 14px; font-size: 0.84rem; line-height: 1.5; color: var(--nxb-muted); }
.nxb-center { text-align: center; margin: 12px 8px 0; }
.nxb-notice { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; background: var(--nxb-warn-bg); color: var(--nxb-ink); }
.nxb-notice i { color: var(--nxb-warn); margin-right: 6px; }
.nxb-error { margin: 0 0 12px; padding: 11px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; background: var(--nxb-bad-bg); color: var(--nxb-ink); }
.nxb-trust { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; font-size: 0.82rem; color: var(--nxb-muted); }
.nxb-secure { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.nxb-marks { display: inline-flex; align-items: center; gap: 8px; filter: grayscale(1); opacity: 0.85; }
.nxb-marks .fab { font-size: 1.55rem; line-height: 1; }
.nxb-mark { padding: 3px 7px; border-radius: 6px; border: 1px solid var(--nxb-hairline); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; }
.nxb-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.86em; overflow-wrap: anywhere; }

.nxb-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--nxb-warn-bg); color: var(--nxb-warn); letter-spacing: 0.04em; }
.nxb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Manual payment: methods, fields, steps ---------- */
.nxb-steps { margin: 6px 0 10px; padding: 0 0 0 22px; font-size: 0.93rem; line-height: 1.5; color: var(--nxb-muted); }
.nxb-steps strong { color: var(--nxb-ink); font-weight: 600; }
.nxb-steps li::marker { color: var(--nxb-accent); font-weight: 700; }
.nxb-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.nxb-method {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px; min-height: 64px;
  border-radius: 16px; background: var(--nxb-row); border: 1px solid var(--nxb-hairline); cursor: pointer;
  transition: border-color 200ms var(--nxb-ease), background-color 200ms var(--nxb-ease), box-shadow 200ms var(--nxb-ease);
}
.nxb-method:hover { border-color: rgba(232, 89, 12, 0.35); }
.nxb-method input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.nxb-method:has(input:checked) { border-color: var(--nxb-accent); background: rgba(232, 89, 12, 0.07); box-shadow: 0 0 0 1px var(--nxb-accent); }
.nxb-method:has(input:focus-visible) { outline: 3px solid rgba(232, 89, 12, 0.5); outline-offset: 2px; }
.nxb-method-icon { flex: 0 0 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--nxb-accent); background: rgba(232, 89, 12, 0.1); font-size: 0.9rem; }
.nxb-method-text { min-width: 0; font-size: 0.92rem; line-height: 1.3; }
.nxb-method-text small { display: block; margin-top: 3px; font-size: 0.78rem; color: var(--nxb-muted); overflow-wrap: anywhere; }
.nxb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.nxb-field { display: grid; gap: 5px; font-size: 0.82rem; font-weight: 600; color: var(--nxb-muted); }
.nxb-field-wide { grid-column: 1 / -1; }
.nxb-field input {
  -webkit-appearance: none; appearance: none; width: 100%; min-height: 46px; padding: 0 14px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid var(--nxb-hairline); background: var(--nxb-glass-strong); color: var(--nxb-ink);
  font: 500 1rem var(--nxb-font); transition: border-color 200ms, box-shadow 200ms;
}
.nxb-field input:focus { outline: none; border-color: var(--nxb-accent); box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.18); }
.nxb-whatsapp { background: #1E8E4E; color: #fff; text-decoration: none; box-shadow: 0 6px 16px rgba(30, 142, 78, 0.24); }
.nxb-whatsapp:hover { background: #17743F; color: #fff; }
.nxb-history-method { display: block; font-size: 0.78rem; color: var(--nxb-muted); }

/* ---------- Redirecting, confirming, result ---------- */
.nxb-state { text-align: center; padding: 10px 4px 2px; display: grid; gap: 10px; justify-items: center; }
.nxb-state .nxb-btn { margin-top: 4px; }
.nxb-state .nxb-group { width: 100%; text-align: left; margin-top: 6px; }
.nxb-muted { margin: 0; color: var(--nxb-muted); line-height: 1.55; max-width: 34ch; }
.nxb-orb { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; font-size: 1.6rem; color: var(--nxb-accent); background: rgba(232, 89, 12, 0.1); box-shadow: inset 0 1px 0 var(--nxb-edge), 0 0 0 8px rgba(232, 89, 12, 0.05); }
.nxb-orb.nxb-soft { color: var(--nxb-muted); background: var(--nxb-row); box-shadow: inset 0 1px 0 var(--nxb-edge); }
.nxb-pulse { animation: nxb-pulse 1.8s var(--nxb-ease) infinite; }
@keyframes nxb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 89, 12, 0.22); } 60% { box-shadow: 0 0 0 16px rgba(232, 89, 12, 0); } }
.nxb-confirming .nxb-sheet-title { animation: nxb-breathe 2.4s ease-in-out infinite; }
@keyframes nxb-breathe { 50% { opacity: 0.72; } }
.nxb-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: nxb-spin 0.8s linear infinite; opacity: 0.9; }
.nxb-spinner.lg { width: 30px; height: 30px; border-width: 2.5px; color: var(--nxb-accent); }
@keyframes nxb-spin { to { transform: rotate(360deg); } }
.nxb-tick { width: 76px; height: 76px; margin-bottom: 6px; }
.nxb-tick circle { fill: rgba(47, 125, 79, 0.1); stroke: var(--nxb-good); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: nxb-draw 600ms var(--nxb-ease) forwards; }
.nxb-tick path { fill: none; stroke: var(--nxb-good); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: nxb-draw 380ms var(--nxb-ease) 420ms forwards; }
@keyframes nxb-draw { to { stroke-dashoffset: 0; } }

/* ---------- Settings: billing card ---------- */
.nxb-settings { display: grid; gap: 14px; margin-bottom: 24px; }
.nxb-plan-summary, .nxb-history { padding: 18px 20px; }
.nxb-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.nxb-history-title { margin: 0 0 10px; font-family: var(--nxb-font); font-size: 1rem; font-weight: 650; color: var(--nxb-ink); }
.nxb-history-list { display: grid; }
.nxb-history-row { display: grid; grid-template-columns: 1.1fr 0.9fr 0.8fr 1fr 1.6fr; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--nxb-hairline); font-size: 0.9rem; }
.nxb-history-headings { border-top: 0; padding-top: 0; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--nxb-muted); }

/* ---------- Phones: stacked plans and an Apple Pay style bottom sheet ---------- */
@media (max-width: 860px) {
  .nxb-plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .nxb-plan.is-popular { order: -1; }
}
@media (max-width: 640px) {
  .nxb-head { margin-bottom: 22px; }
  .nxb-plan { padding: 24px 20px 20px; border-radius: 24px; }
  .nxb-amount { font-size: 2.6rem; }
  .nxb-layer { place-items: end stretch; padding: 0; }
  .nxb-sheet {
    width: 100%;
    max-height: 92vh;
    border-radius: 28px 28px 0 0;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    opacity: 1;
    transition: transform 300ms var(--nxb-ease);
  }
  .nxb-layer.is-open .nxb-sheet { transform: none; }
  .nxb-grabber { display: block; width: 38px; height: 5px; border-radius: 999px; background: rgba(120, 113, 105, 0.4); margin: 0 auto 14px; touch-action: none; }
  .nxb-close { top: 18px; }
  .nxb-sheet-head { touch-action: none; }
  .nxb-fields { grid-template-columns: 1fr; }
  .nxb-history-headings { display: none; }
  .nxb-history-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 0; }
  .nxb-history-row > span::before { content: attr(data-label); display: block; font-size: 0.72rem; color: var(--nxb-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .nxb-plan, .nxb-btn, .nxb-sheet, .nxb-scrim, .nxb-switch, .nxb-switch::after { transition: none !important; }
  .nxb-plan:hover { transform: none; }
  .nxb-btn:active:not(:disabled) { transform: none; }
  .nxb-pulse, .nxb-confirming .nxb-sheet-title { animation: none; }
  .nxb-spinner { animation-duration: 2s; }
  .nxb-tick circle, .nxb-tick path { animation: none; stroke-dashoffset: 0; }
}

/* Receipt link in the payment history, and printing a receipt on its own. */
.nxb-link { background: none; border: 0; padding: 0 0 0 6px; color: var(--nxb-accent-solid, #C84B0A); font: inherit; font-size: 0.85em; font-weight: 600; text-decoration: underline; cursor: pointer; }
.nxb-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
@media print {
  body.nxb-locked > *:not(.nxb-layer) { display: none !important; }
  .nxb-layer, .nxb-sheet { position: static !important; transform: none !important; box-shadow: none !important; background: #fff !important; color: #000 !important; max-height: none !important; overflow: visible !important; }
  .nxb-scrim, .nxb-close, .nxb-grabber, .nxb-layer .nxb-btn { display: none !important; }
}
