/* ══════════════════════════════════════════════════════════════
   WALLETS HUB (/wallets) - search + Followed / Top whales / Exchanges.
   Mobile-first; pairs with the bottom tab bar (the page already reserves
   --bottom-nav-h via the global body padding on <=860px).
   ══════════════════════════════════════════════════════════════ */

/* Make the page a full-height flex column so the shared footer hugs the bottom
   (matches profile.css / analytics.css). Without this the footer floats right
   after short content, leaving a dead gap above the fixed bottom tab bar. */
body { min-height: 100vh; display: flex; flex-direction: column; }

.wal-shell {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 28px;
  box-sizing: border-box;
}

.wal-head h1 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  margin: 6px 0 4px; color: var(--text-hi);
}
.wal-sub { margin: 0 0 16px; color: var(--text-md); font-size: 13px; line-height: 1.55; }

/* ── Search ───────────────────────────────────────────────── */
.wal-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 4px 4px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.wal-search:focus-within { border-color: var(--accent-2, #a98bff); box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.wal-search-ic { color: var(--text-lo); flex-shrink: 0; }
.wal-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  color: var(--text-hi); font-family: var(--mono); font-size: 14px; padding: 10px 0;
}
.wal-search input::placeholder { color: var(--text-lo); font-family: var(--font); }
.wal-search-go {
  flex-shrink: 0; border: 0; cursor: pointer;
  background: var(--grad-accent, linear-gradient(135deg, #9171ff, #6a45f5));
  color: #fff; font-weight: 700; font-size: 13px; font-family: var(--font);
  padding: 10px 16px; border-radius: 9px; transition: transform .12s;
}
.wal-search-go:active { transform: scale(.96); }
.wal-search-err { margin: 8px 2px 0; color: #ff8888; font-size: 12px; }

/* ── Segmented tabs ───────────────────────────────────────── */
.wal-tabs {
  display: flex; gap: 4px; margin: 18px 0 14px;
  background: var(--bg-card2, rgba(127,127,127,.08));
  border: 1px solid var(--border); border-radius: 11px; padding: 4px;
}
.wal-tab {
  flex: 1; border: 0; cursor: pointer; background: transparent;
  color: var(--text-md); font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 9px 6px; border-radius: 8px; transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.wal-tab:hover { color: var(--text-hi); }
.wal-tab.active { background: var(--bg-card); color: var(--accent-2, #a98bff); box-shadow: var(--shadow-1, 0 2px 8px rgba(0,0,0,.2)); }

/* ── Lists / rows ─────────────────────────────────────────── */
.wal-panel { min-height: 120px; }
.wal-list { display: flex; flex-direction: column; gap: 8px; }
.wal-row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 34px 1fr auto auto;
  padding: 12px 14px; min-height: 56px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  text-decoration: none; color: inherit; transition: border-color .12s, background .12s;
}
.wal-row:hover { border-color: var(--accent-2, #a98bff); background: var(--bg-hover, var(--bg-card)); }
.wal-row-follow { grid-template-columns: 1fr auto; }
.wal-rank { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-md); text-align: center; }
.wal-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wal-name { font-size: 14px; font-weight: 700; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.wal-addr { font-family: var(--mono); font-size: 11px; color: var(--text-lo); }
.wal-bias { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 3px 8px; border-radius: 100px; white-space: nowrap; }
.wal-bias.acc { background: rgba(0,209,122,.14); color: #00d17a; }
.wal-bias.dis { background: rgba(255,77,77,.13); color: #ff6b6b; }
.wal-bias.bal { background: rgba(143,168,200,.14); color: var(--text-md); }
.wal-vol { font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--text-hi); text-align: right; white-space: nowrap; }
.wal-meta { font-family: var(--mono); font-size: 11px; color: var(--text-lo); text-align: right; white-space: nowrap; }
.wal-go { font-family: var(--mono); font-size: 20px; color: var(--text-lo); }
.wal-alert { width: 7px; height: 7px; border-radius: 50%; background: #00d17a; box-shadow: 0 0 6px rgba(0,209,122,.6); display: inline-block; }

.wal-seeall { display: inline-block; margin: 14px 2px 0; color: var(--accent-2, #a98bff); text-decoration: none; font-size: 13px; font-weight: 700; }
.wal-seeall:hover { text-decoration: underline; }

/* ── Exchanges grid ───────────────────────────────────────── */
.wal-ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.wal-ex {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; text-decoration: none; color: inherit; transition: border-color .12s, transform .12s;
}
.wal-ex:hover { border-color: var(--accent-2, #a98bff); transform: translateY(-1px); }
.wal-ex-ic { display: flex; align-items: center; flex-shrink: 0; }
/* cexIcon() bakes in margin-right:4px; the card's flex gap handles spacing. */
.wal-ex-ic img, .wal-ex-ic > span { margin-right: 0 !important; }
.wal-ex-name { font-size: 13.5px; font-weight: 700; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Rich whale cards (SSR + client share this markup) ────── */
.whale-list { display: flex; flex-direction: column; gap: 9px; }
.whale-card {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 24px 24px 1fr auto;
  padding: 13px 15px; min-height: 64px;
  background: var(--bg-card); background-image: var(--grad-card);
  border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-1, 0 2px 8px rgba(0,0,0,.18));
  transition: border-color .14s, transform .14s, box-shadow .14s;
}
.whale-card:hover { border-color: var(--accent-2, #a98bff); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.32); }
.whale-rank { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-lo); text-align: center; }
.whale-rank.top { color: var(--accent-2, #a98bff); }
/* Decorative generated gradient (not a real logo) - kept small + subtle so it
   reads as a marker, not a focal point. */
.whale-av { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; opacity: .8; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.whale-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.whale-name { font-size: 14.5px; font-weight: 700; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whale-sub { font-family: var(--mono); font-size: 11px; color: var(--text-lo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* In/out flow bar - coloured by the ACCUMULATION/DISTRIBUTION convention so it
   agrees with the bias pill (NOT flow-direction): inflow = deposits onto the
   exchange = distribution = red; outflow = withdrawals = accumulation = green.
   So a "distributing" wallet reads red bar + red pill, "accumulating" reads
   green + green. Matches .whale-bias.acc/.dis below. */
.whale-flow { display: flex; height: 4px; border-radius: 3px; overflow: hidden; background: var(--bg-input, rgba(255,255,255,.05)); margin-top: 1px; }
.whale-flow-in  { background: #ff6b6b; }   /* deposits / inflow -> distribution */
.whale-flow-out { background: #00d17a; }   /* withdrawals / outflow -> accumulation */
.whale-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.whale-vol { font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--text-hi); }
.whale-bias { font-family: var(--mono); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 100px; }
.whale-bias.acc { background: rgba(0,209,122,.14); color: #00d17a; }
.whale-bias.dis { background: rgba(255,77,77,.13); color: #ff6b6b; }
.whale-bias.bal { background: rgba(143,168,200,.14); color: var(--text-md); }
.whale-meta { font-family: var(--mono); font-size: 10.5px; color: var(--text-lo); }

/* ── FAQ (SEO content block) ──────────────────────────────── */
.wal-faq { margin: 30px 0 8px; }
.wal-faq h2 { font-size: 16px; font-weight: 800; margin: 0 0 12px; color: var(--text-hi); }
.wal-faq-item { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); margin-bottom: 8px; overflow: hidden; }
.wal-faq-item summary { cursor: pointer; padding: 12px 14px; font-size: 13px; font-weight: 700; color: var(--text-hi); list-style: none; }
.wal-faq-item summary::-webkit-details-marker { display: none; }
.wal-faq-item summary::before { content: "＋"; color: var(--accent-2, #a98bff); font-family: var(--mono); margin-right: 8px; }
.wal-faq-item[open] summary::before { content: "－"; }
.wal-faq-item p { margin: 0; padding: 0 14px 14px; font-size: 12.5px; line-height: 1.6; color: var(--text-md); }

@media (max-width: 560px) {
  .whale-card { grid-template-columns: 20px 22px 1fr auto; gap: 10px; padding: 11px 12px; }
  .whale-av { width: 22px; height: 22px; }
  .whale-meta { display: none; }
}

/* ── Empty / loading ──────────────────────────────────────── */
.wal-loading, .wal-empty { padding: 40px 20px; text-align: center; color: var(--text-md); }
.wal-loading { font-family: var(--mono); font-size: 12px; color: var(--text-lo); }
.wal-empty p { margin: 0 0 8px; font-size: 14px; }
.wal-empty-sub { color: var(--text-lo); font-size: 12.5px; }
.wal-cta {
  display: inline-block; margin-top: 10px; padding: 10px 18px; border: 0; cursor: pointer;
  background: var(--grad-accent, linear-gradient(135deg, #9171ff, #6a45f5));
  color: #fff; font-weight: 700; font-size: 13px; font-family: var(--font);
  border-radius: 9px; text-decoration: none;
}

@media (max-width: 560px) {
  .wal-row { grid-template-columns: 28px 1fr auto; gap: 9px; padding: 11px 12px; }
  .wal-bias { display: none; }   /* keep the row legible on narrow phones */
  .wal-meta { display: none; }
}
