/* Topbar balance pill + topup-return toast. Used by the dashboard
   (index.html) and the public pricing page. Kept separate from
   lx-shell.css so pricing.html doesn't have to pull in the whole shell. */

/* ── Topbar credits pill ────────────────────────────────────────────── */
.lx-credits-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* ── Toast (topup return) ───────────────────────────────────────────── */
.credits-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  background: var(--surface-elevated);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-bright);
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1100;
}
.credits-toast.is-visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ── Out-of-credits modal ───────────────────────────────────────────── */
/* Reuses .lx-vfm-modal* base (defined in lx-shell.css) for backdrop +
   panel + close button. Selectors here only add the body/actions block. */
.lx-credits-modal { z-index: 1200; }
.lx-credits-modal-body {
  padding: 14px 6px 6px;
}
.lx-credits-modal-text {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.lx-credits-modal-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.lx-credits-modal-sub strong { color: var(--text); font-weight: 600; }
.lx-credits-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 0 4px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.lx-credits-modal-cancel,
.lx-credits-modal-cta {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.lx-credits-modal-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.lx-credits-modal-cancel:hover {
  color: var(--text);
  border-color: var(--border-2);
}
.lx-credits-modal-cta {
  background: linear-gradient(135deg, var(--brass-1), var(--brass-0));
  border: 0;
  color: var(--ink-0);
}
.lx-credits-modal-cta:hover { filter: brightness(1.05); }

/* ── Top-up credits modal (the "buy credits" popover) ───────────────── */
.lx-topup-modal { z-index: 1200; }
.lx-topup-modal .lx-vfm-modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.lx-topup-panel {
  position: relative;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--ink-1), var(--ink-0));
  border: 1px solid var(--ink-3);
  border-radius: 22px;
  padding: 24px 24px 18px;
  box-shadow: 0 32px 72px -16px rgba(0, 0, 0, 0.75);
}
.lx-topup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink-3);
  border: 0;
  color: var(--fg-2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.lx-topup-close:hover { background: var(--ink-4); color: var(--text); }
.lx-topup-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-1);
  margin-bottom: 12px;
}
.lx-topup-eyebrow svg { width: 12px; height: 12px; }
.lx-topup-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}
.lx-topup-subtitle {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 6px 0 16px;
}
.lx-topup-divider {
  border: 0;
  border-top: 1px solid var(--ink-3);
  margin: 0 0 16px;
}
.lx-topup-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ink-3);
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.lx-topup-banner svg { width: 14px; height: 14px; color: var(--brass-1); flex: none; }
.lx-topup-banner strong { color: var(--text); font-weight: 600; }
.lx-topup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lx-topup-pack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ink-3);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.lx-topup-pack:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--ink-4);
}
.lx-topup-pack:active { transform: scale(0.998); }
.lx-topup-pack[disabled] { opacity: 0.55; cursor: progress; }
.lx-topup-pack-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lx-topup-pack-clips {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.lx-topup-pack-meta {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.2;
}
.lx-topup-pack-bonus { color: #6fd07a; font-weight: 600; }
.lx-topup-pack-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.lx-topup-pack-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.lx-topup-pack.is-best {
  border-color: var(--brass-1);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), rgba(212, 175, 55, 0.015));
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25), 0 12px 32px -16px rgba(212, 175, 55, 0.45);
}
.lx-topup-pack.is-best:hover {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.09), rgba(212, 175, 55, 0.03));
}
.lx-topup-pack.is-best .lx-topup-pack-price { color: var(--brass-0); }
.lx-topup-best-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--brass-1);
  color: var(--brass-0);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lx-topup-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 16px 4px 4px;
  margin-top: 14px;
  border-top: 1px dashed var(--ink-3);
  font-size: 12.5px;
  color: var(--text-dim);
}
.lx-topup-foot-item { display: inline-flex; align-items: center; gap: 5px; }
.lx-topup-foot-item svg { width: 12px; height: 12px; color: #6fd07a; }
.lx-topup-foot-item .num { color: var(--text); font-weight: 600; }
.lx-topup-foot-item .pct-green { color: #6fd07a; font-weight: 600; }
.lx-topup-foot-sub {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.lx-topup-err {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid rgba(255, 90, 90, 0.35);
  color: #ffb3b3;
  font-size: 12.5px;
}
.lx-topup-err[hidden] { display: none; }

@media (max-width: 520px) {
  .lx-topup-panel { padding: 18px 16px 14px; border-radius: 18px; }
  .lx-topup-title { font-size: 22px; }
  .lx-topup-pack { padding: 14px; }
  .lx-topup-pack-clips { font-size: 17px; }
  .lx-topup-pack-price { font-size: 19px; }
  .lx-topup-best-badge { font-size: 9px; padding: 3px 8px; }
}
