/* =========================
   ScanWin — merchant-analytics.css
   -------------------------
   Merchant Analytics page-specific deltas layered over analytics.css
   (shared with the Influencer build, so we don't edit it).
   Loaded last on merchant/analytics.html.
========================= */

/* Desktop defaults for the mobile-only bits added to the perf rows
   (kept hidden so the desktop table is unchanged). */
.sw-perf-lbl {
  display: none;
  font-size: 10px;
  letter-spacing: 0.6px;
}
.sw-perf-row__plat-dot {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

/* =========================
   Mobile (≤991.98px) — Top performing content becomes 16px cards with
   the full PLATFORM · SCANS · POINTS · CTR detail row (figma 1567:26905)
========================= */
@media (max-width: 991.98px) {
  .sw-perf-table {
    --bs-card-spacer-y: 16px;
    --bs-card-spacer-x: 16px;
  }
  .sw-perf-table__head {
    padding: 0;
    margin-bottom: 14px;
  }

  /* rows become stacked cards */
  .sw-perf-table ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .sw-perf-row {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "post post post post"
      "plat scans points ctr";
    align-items: start;
    gap: 14px 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
  }
  .sw-perf-row.is-top {
    background: #f0ebff;
    border-color: transparent;
  }

  .sw-perf-row__post { grid-area: post; }
  /* reset the shared pill styling so this becomes a plain label+pill column */
  .sw-perf-row__plat {
    grid-area: plat;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: none;
    padding: 0;
    border-radius: 0;
    width: auto;
  }
  .sw-perf-row__plat::before { display: none; }
  .sw-perf-row__num {
    grid-area: scans;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 14px;
  }
  .sw-perf-row__num.sw-perf-row__num--earned { grid-area: points; }
  .sw-perf-row__num.text-end {
    grid-area: ctr;
    text-align: left !important;
    font-size: 13px;
  }

  /* show the mobile labels + platform pill */
  .sw-perf-lbl { display: block; }
  .sw-perf-row__plat-dot { display: inline-block; }
  .sw-perf-row__plat-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f7f4ee;
    border-radius: 999px;
    padding: 3px 10px 3px 8px;
    font-size: 11px;
    color: #1a1232;
  }
}

/* =========================
   Stat cards — "for your Location" account-type caption under the label
   (figma 1567:16242). Stacks label + scope; icon stays centered.
========================= */
.sw-stat__labeltext {
  gap: 1px;
  min-width: 0;
}
.sw-stat__scope {
  font-size: 11px;
  line-height: 1.2;
  color: var(--sw-text-faint);
}
