/* gopnik/static/css/nft_marketplace_v2_activity.css
 *
 * Iteration 6 — Activity feed surface.
 *
 * Namespace .mpv2a-* — entirely additive.  Never touches legacy or
 * Iter 1-5 selectors.  Inherits tokens (--mpv2-*) from
 * nft_marketplace_v2.css so theming stays coherent.
 *
 * Layout: a single vertical list under the headline/tab strip.  No
 * rails, no grid — a scrolling timeline is the whole surface.
 */

:root {
  --mpv2a-row-h:     72px;
  --mpv2a-icon-w:    44px;
  --mpv2a-accent:    var(--mpv2-accent, #ff8c42);
  --mpv2a-surface:   var(--mpv2-surface, #14181f);
  --mpv2a-border:    var(--mpv2-border, rgba(255,255,255,0.08));
  --mpv2a-text:      var(--mpv2-text, #f6f8fb);
  --mpv2a-text-dim:  var(--mpv2-text-dim, #a6afbd);
  --mpv2a-bg:        var(--mpv2-bg, #0b0f17);
  --mpv2a-sale:      #3cd391;
  --mpv2a-offer:     #11a7dd;
  --mpv2a-mint:      #ffc942;
  --mpv2a-burn:      #ff4d4d;
  --mpv2a-transfer:  #a055ff;
}

.mpv2a-body { background: var(--mpv2a-bg); color: var(--mpv2a-text); }
.mpv2a-main { max-width: 1160px; margin: 0 auto; padding: 0 20px 64px; }

/* ─── Nav right cluster (bell + wallet chip) ───────────────────── */
.mpv2-nav-right { display: flex; align-items: center; gap: 14px; }
.mpv2n-slot { position: relative; }

/* ─── Headline ─────────────────────────────────────────────────── */
.mpv2a-headline { padding: 28px 0 18px; }
.mpv2a-headline-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.mpv2a-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: var(--mpv2a-text);
}
.mpv2a-subtitle {
  margin: 6px 0 0;
  color: var(--mpv2a-text-dim);
  font-size: 14px;
}

.mpv2a-tele {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, auto));
  gap: 10px;
}
.mpv2a-tele-item {
  background: var(--mpv2a-surface);
  border: 1px solid var(--mpv2a-border);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  min-width: 80px;
}
.mpv2a-tele-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--mpv2a-text);
  line-height: 1.2;
}
.mpv2a-tele-lbl {
  display: block;
  font-size: 11px;
  color: var(--mpv2a-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ─── Tabs + filter chips strip ─────────────────────────────── */
.mpv2a-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mpv2a-border);
  flex-wrap: wrap;
}
.mpv2a-tab {
  background: transparent;
  color: var(--mpv2a-text-dim);
  border: 1px solid var(--mpv2a-border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}
.mpv2a-tab:hover { color: var(--mpv2a-text); border-color: rgba(255,255,255,0.2); }
.mpv2a-tab.is-active {
  color: var(--mpv2a-text);
  background: var(--mpv2a-surface);
  border-color: var(--mpv2a-accent);
  box-shadow: 0 0 0 2px rgba(255, 140, 66, 0.15);
}
.mpv2a-tab[disabled] { opacity: 0.45; cursor: not-allowed; }
.mpv2a-tab-spacer { flex: 1; }

.mpv2a-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.mpv2a-chip {
  background: transparent;
  color: var(--mpv2a-text-dim);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms ease;
}
.mpv2a-chip:hover { color: var(--mpv2a-text); background: rgba(255,255,255,0.03); }
.mpv2a-chip.is-active {
  color: var(--mpv2a-accent);
  background: rgba(255, 140, 66, 0.1);
  border-color: rgba(255, 140, 66, 0.3);
}

/* ─── "By token" search strip ──────────────────────────────── */
.mpv2a-token-strip {
  margin: 14px 0;
  padding: 16px;
  background: var(--mpv2a-surface);
  border: 1px solid var(--mpv2a-border);
  border-radius: 12px;
}
.mpv2a-search { display: flex; gap: 10px; }
.mpv2a-search input {
  flex: 1;
  background: var(--mpv2a-bg);
  color: var(--mpv2a-text);
  border: 1px solid var(--mpv2a-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--mpv2-mono, 'SF Mono', monospace);
}
.mpv2a-search input:focus {
  outline: none;
  border-color: var(--mpv2a-accent);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}
.mpv2a-btn {
  background: var(--mpv2a-accent);
  color: var(--mpv2a-bg);
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 120ms ease;
}
.mpv2a-btn:hover { filter: brightness(1.1); }

/* ─── Feed list ────────────────────────────────────────────── */
.mpv2a-feed-wrap { position: relative; }
.mpv2a-feed {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mpv2a-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--mpv2a-surface);
  border: 1px solid var(--mpv2a-border);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: var(--mpv2a-row-h);
  transition: border-color 120ms ease, transform 120ms ease;
  animation: mpv2a-row-in 220ms ease both;
}
.mpv2a-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
@keyframes mpv2a-row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mpv2a-row-icon {
  flex: 0 0 var(--mpv2a-icon-w);
  width: var(--mpv2a-icon-w);
  height: var(--mpv2a-icon-w);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  font-size: 20px;
  color: var(--mpv2a-text-dim);
}

/* Kind-colored icon tints */
.mpv2a-row.is-offer_accepted .mpv2a-row-icon { color: var(--mpv2a-sale); background: rgba(60, 211, 145, 0.08); }
.mpv2a-row.is-offer_created  .mpv2a-row-icon,
.mpv2a-row.is-list           .mpv2a-row-icon { color: var(--mpv2a-offer); background: rgba(17, 167, 221, 0.08); }
.mpv2a-row.is-mint           .mpv2a-row-icon { color: var(--mpv2a-mint); background: rgba(255, 201, 66, 0.08); }
.mpv2a-row.is-burn           .mpv2a-row-icon { color: var(--mpv2a-burn); background: rgba(255, 77, 77, 0.08); }
.mpv2a-row.is-transfer_in    .mpv2a-row-icon,
.mpv2a-row.is-transfer_out   .mpv2a-row-icon { color: var(--mpv2a-transfer); background: rgba(160, 85, 255, 0.08); }

.mpv2a-row-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mpv2a-row-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.mpv2a-row-kind {
  font-weight: 600;
  font-size: 14px;
  color: var(--mpv2a-text);
}
.mpv2a-row-amount {
  font-weight: 700;
  font-size: 14px;
  color: var(--mpv2a-accent);
  font-variant-numeric: tabular-nums;
}
.mpv2a-row-cp {
  font-size: 12px;
  color: var(--mpv2a-text-dim);
}
.mpv2a-row-cp a { color: inherit; }
.mpv2a-row-cp a:hover { color: var(--mpv2a-accent); }

.mpv2a-row-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--mpv2a-text-dim);
  font-family: var(--mpv2-mono, 'SF Mono', monospace);
}
.mpv2a-row-token { color: inherit; text-decoration: none; }
.mpv2a-row-token:hover { color: var(--mpv2a-text); }
.mpv2a-row-when { flex: 1; }
.mpv2a-row-tx {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mpv2a-text-dim);
  text-decoration: none;
  border: 1px solid var(--mpv2a-border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}
.mpv2a-row-tx:hover { color: var(--mpv2a-accent); border-color: var(--mpv2a-accent); }

/* ─── Empty / loader ───────────────────────────────────────── */
.mpv2a-feed-empty {
  margin: 48px 0;
  text-align: center;
  color: var(--mpv2a-text-dim);
  font-size: 14px;
}
.mpv2a-feed-sentinel { height: 1px; margin-top: 12px; }
.mpv2a-feed-loader {
  margin: 20px 0;
  text-align: center;
  color: var(--mpv2a-text-dim);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: mpv2a-pulse 1.6s ease-in-out infinite;
}
@keyframes mpv2a-pulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.9; }
}

/* ─── Mobile collapse ──────────────────────────────────────── */
@media (max-width: 640px) {
  .mpv2a-main { padding: 0 14px 48px; }
  .mpv2a-headline-inner { flex-direction: column; align-items: flex-start; }
  .mpv2a-tele { grid-template-columns: repeat(4, 1fr); width: 100%; }
  .mpv2a-tele-item { padding: 8px 4px; min-width: 0; }
  .mpv2a-tele-num { font-size: 16px; }
  .mpv2a-tabs { gap: 6px; }
  .mpv2a-tab-spacer { flex: 1 0 100%; height: 0; }
  .mpv2a-filters { width: 100%; }
  .mpv2a-row { padding: 10px 12px; gap: 10px; }
  .mpv2a-row-icon { flex-basis: 36px; width: 36px; height: 36px; font-size: 16px; }
  .mpv2a-row-main { gap: 8px; }
  .mpv2a-row-kind { font-size: 13px; }
  .mpv2a-row-amount { font-size: 13px; }
  .mpv2a-row-sub { gap: 8px; font-size: 11px; flex-wrap: wrap; }
}

/* ─── Motion-reduced preference ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mpv2a-row { animation: none; }
  .mpv2a-feed-loader { animation: none; opacity: 0.7; }
  .mpv2a-row.is-new { animation: none; }
  .mpv2a-tele-num.is-pulse { animation: none; }
}

/* ─── Iter 7 — live-push highlights ────────────────────────── */
/* When the SSE client prepends a row it gets ``.is-new`` for
   NEW_ROW_FLASH_MS (1.5 s).  The row slides in from the top with a
   brief orange glow on the left edge so the eye catches it. */
.mpv2a-row.is-new {
  animation: mpv2a-row-in 1.5s ease-out 1;
  box-shadow:
    inset 3px 0 0 0 var(--mpv2a-accent),
    0 0 0 1px rgba(255, 140, 66, 0.28),
    0 0 24px -6px rgba(255, 140, 66, 0.45);
}
@keyframes mpv2a-row-in {
  0%   { transform: translateY(-8px); opacity: 0; }
  18%  { transform: translateY(0);    opacity: 1; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* Hero tile bump — same duration so the row + tile animations
   sync when an event triggers both simultaneously. */
.mpv2a-tele-num.is-pulse {
  animation: mpv2a-tile-pulse 1.5s ease-out 1;
  color: var(--mpv2a-accent);
}
@keyframes mpv2a-tile-pulse {
  0%   { transform: scale(1);    color: var(--mpv2a-accent); }
  22%  { transform: scale(1.16); color: var(--mpv2a-accent); }
  100% { transform: scale(1);    color: var(--mpv2a-text); }
}
