/* Commerce suite — console, portal and storefront additions. Uses the platform tokens. */

/* ── Storefront: wishlist hearts ─────────────────────────────────────── */
.xc-heart {
  grid-area: media; align-self: start; justify-self: end; z-index: 2; margin: .6rem;
  width: 38px; height: 38px; border-radius: 999px; border: 0; cursor: pointer;
  display: inline-grid; place-items: center; font-size: .95rem;
  background: var(--bg, #fff); color: var(--ink, #111); box-shadow: 0 4px 14px rgba(0,0,0,.14);
  transition: transform .2s ease, color .2s ease;
}
.xc-heart:hover { transform: scale(1.08); }
.xc-heart:focus-visible { outline: 2px solid var(--ink, #111); outline-offset: 2px; }
.xc-heart.is-on { color: #d92d4a; }
.xc-heart.is-busy { opacity: .55; pointer-events: none; }
.xc-heart-pdp {
  display: inline-flex; align-items: center; gap: .5rem; margin: -.6rem 0 1.2rem; padding: .55rem .9rem;
  border: 1px solid var(--line, #e5e7eb); border-radius: 999px; background: var(--bg, #fff); color: var(--ink, #111);
  font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer;
}
.xc-heart-pdp.is-on { color: #d92d4a; border-color: #f3b7c2; background: #fff5f7; }
.xc-heart-pdp.is-on span::after { content: ''; }

/* ── Storefront: variant picker ──────────────────────────────────────── */
.xc-var { display: grid; gap: .9rem; margin: 0 0 1.3rem; }
.xc-var fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.xc-var legend { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2, #6b7280); font-weight: 700; margin-bottom: .45rem; }
.xc-var legend b { color: var(--ink, #111); letter-spacing: 0; text-transform: none; font-size: .9rem; margin-left: .35rem; font-weight: 650; }
.xc-var-opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.xc-var-opt {
  min-width: 46px; padding: .55rem .85rem; border-radius: 12px; border: 1px solid var(--line, #d9dbe1);
  background: var(--bg, #fff); color: var(--ink, #111); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.xc-var-opt[aria-pressed="true"] { border-color: var(--ink, #111); box-shadow: inset 0 0 0 1px var(--ink, #111); }
.xc-var-opt.is-na { color: var(--muted-3, #9ca3af); text-decoration: line-through; }
.xc-var-sku { font-size: .8rem; color: var(--muted-2, #6b7280); margin: -.4rem 0 1rem; }

/* ── Receipt: licences ───────────────────────────────────────────────── */
.xc-order-lic { margin: 0 0 1.4rem; }
.xc-lic-list { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .6rem; }
.xc-lic-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.xc-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; letter-spacing: .04em;
  padding: .35rem .6rem; border-radius: 8px; background: var(--surface-2, #f4f4f5); border: 1px dashed var(--line, #d4d4d8);
  user-select: all; word-break: break-all;
}

/* ── Console & portal ────────────────────────────────────────────────── */
.xc-muted { color: var(--muted-2, #6b7280); }
.xc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.xc-flash { padding: .75rem 1rem; border-radius: 14px; margin: 0 0 1rem; font-weight: 600; }
.xc-flash.is-ok { background: #eef8f1; color: #14532d; }
.xc-flash.is-err { background: #fff3f2; color: #8a1c13; }
.xc-pill {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700;
  background: var(--surface-3, #eef0f3); color: var(--ink-3, #374151); white-space: nowrap;
}
.xc-pill.is-active, .xc-pill.is-ready, .xc-pill.is-available, .xc-pill.is-received, .xc-pill.is-earn, .xc-pill.is-paid { background: #e5f6ea; color: #166534; }
.xc-pill.is-trialing, .xc-pill.is-sent, .xc-pill.is-pending, .xc-pill.is-open, .xc-pill.is-adjust { background: #e8f0ff; color: #1e40af; }
.xc-pill.is-past_due, .xc-pill.is-pending_key, .xc-pill.is-low, .xc-pill.is-redeem, .xc-pill.is-draft { background: #fff4e0; color: #92400e; }
.xc-pill.is-cancelled, .xc-pill.is-expired, .xc-pill.is-revoked, .xc-pill.is-refunded, .xc-pill.is-reverse, .xc-pill.is-used, .xc-pill.is-gone, .xc-pill.is-void { background: #f3f4f6; color: #6b7280; }
.xc-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.xc-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.xc-inline > label { flex: 1 1 160px; }
.xc-acts { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.xc-acts form { margin: 0; }
.vx-table td.xc-num, .vx-table th.xc-num { text-align: right; font-variant-numeric: tabular-nums; }
.xc-cell-low { color: #b45309; font-weight: 700; }
.xc-cell-neg { color: #b91c1c; font-weight: 700; }
.xc-mini { width: 5.5rem; }
.xc-empty { display: grid; place-items: center; gap: .5rem; padding: 2rem 1rem; text-align: center; color: var(--muted-2, #6b7280); }
.xc-empty .fas { font-size: 1.6rem; opacity: .6; }
.xc-lic-card { display: grid; gap: .6rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--surface-2, #f7f7f8); }
.xc-lic-card + .xc-lic-card { margin-top: .8rem; }
.xc-lic-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; }
.xc-lic-top h4 { margin: 0; font-size: 1.05rem; }
.xc-lic-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .85rem; color: var(--muted-2, #6b7280); }
.xc-dl { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.xc-balance { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.xc-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.xc-plan { display: grid; gap: .7rem; align-content: start; padding: 1.4rem; border-radius: 20px; border: 1px solid var(--line, #e5e7eb); background: var(--bg, #fff); }
.xc-plan h3 { margin: 0; }
.xc-plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.xc-plan-price small { font-size: .9rem; font-weight: 500; color: var(--muted-2, #6b7280); letter-spacing: 0; }
.xc-plan ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.xc-wish-grid { margin-top: 1rem; }
.xc-textarea-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
@media (max-width: 720px) {
  .xc-balance { font-size: 2rem; }
  .xc-heart { width: 34px; height: 34px; margin: .45rem; }
}
.xc-under { margin-top: .5rem; }
.xc-inline-form { display: inline; margin-left: .4rem; }
.xc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.xc-tile { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border-radius: 16px; background: var(--surface-2, #f7f7f8); text-decoration: none; color: inherit; }
.xc-tile:hover, .xc-tile:focus-visible { box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.xc-tile .fas { font-size: 1.2rem; }
.xc-tile small { color: var(--muted-2, #6b7280); }
.xc-tile.is-off { opacity: .6; }
.xc-grid2 > *, .xc-inline > * { min-width: 0; }
.xc-grid2 select, .xc-grid2 input, .xc-inline select, .dash-panel .bcos-form-grid select { max-width: 100%; min-width: 0; width: 100%; }
.xc-grid2 .bcos-form-grid, .dash-panel .bcos-form-grid { min-width: 0; }
.xc-grid2 .bcos-form-grid > label { min-width: 0; }
.dash-panel + .dash-panel, .xc-grid2 + .dash-panel, .dash-panel + .xc-grid2, .xc-grid2 + .xc-grid2 { margin-top: 1rem; }
.vx-table input:not([type="checkbox"]), .dash-panel > header .xc-inline input, .dash-panel > header .xc-inline select {
  padding: .4rem .55rem; border: 1px solid var(--line, #d9dbe1); border-radius: 8px; font: inherit; font-size: .88rem;
  background: var(--bg, #fff); color: var(--ink, #111); width: auto; max-width: 100%;
}
.vx-table input[name="sku"] { width: 12rem; }
.dash-panel > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.dash-panel > header .xc-inline { flex-wrap: nowrap; align-items: center; }
.dash-panel .xc-acts + .xc-acts, .dash-panel .xc-acts + form, .dash-panel form + .xc-acts { margin-top: .6rem; }
.dash-panel .xc-acts + .vx-table-wrap { margin-top: 1rem; }
