/* ═══════════════════════════════════════════════════════════════
   walletpanel.css — a wallet on a coin (ui-walletpanel.js, round 32d)
   A panel from the right over a Trenches coin's page, the way GMGN shows
   one: the coin, a small chart with the wallet's trades on it, the wallet,
   its numbers on the coin, Track / Portfolio, and its trades. A phone gets
   the same in a sheet from the bottom (.sheet.wlp-sheet).
   ═══════════════════════════════════════════════════════════════ */

/* who made a trade, a holder: a button now (it opens the panel) */
button.tk-mk,button.tk-hwa{font-family:var(--mono);font-size:11.5px;color:var(--text-2);border-radius:4px;padding:1px 3px;margin:-1px -3px}
button.tk-hwa{font-size:12px}
button.tk-mk:hover,button.tk-hwa:hover{color:var(--text);background:var(--hover);text-decoration:underline;text-underline-offset:2px}
button.tk-mk:focus-visible,button.tk-hwa:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
/* the wallet tracker's feed: who traded, on a coin's trade */
button.wt-who{text-align:left;border-radius:8px;margin:-3px -5px;padding:3px 5px;min-width:0}
button.wt-who:hover{background:var(--hover)}
button.wt-who:hover .sf-id b{text-decoration:underline;text-underline-offset:2px}

/* ── the panel ── */
.wlp-side{position:fixed;top:var(--nav-h);right:0;bottom:0;z-index:45;width:clamp(400px,36vw,600px);max-width:100vw;display:flex;flex-direction:column;
  background:var(--card);border-left:1px solid var(--line-2);box-shadow:-28px 0 60px -28px rgba(0,0,0,.75);outline:none;
  transform:translateX(0);transition:transform .28s var(--ease),opacity .2s ease}
.wlp-side.wlp-enter,.wlp-side.wlp-leave{transform:translateX(100%);opacity:.6}
.wlp-side.wlp-leave{pointer-events:none}
.wlp-x{position:absolute;top:10px;right:10px;z-index:2}
/* beside the page when the window has room (ui-walletpanel.js → push): the page narrows by the panel's width */
body.wlp-push .view{right:var(--wlp-w,0px)}
.wlp-side .wlp-b{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}

.wlp-h{display:flex;align-items:center;gap:11px;padding:12px 48px 12px 14px;border-bottom:1px solid var(--line);flex-shrink:0}
.wlp-h .av{width:38px;height:38px;border-radius:10px}
.wlp-coin{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.wlp-coin b{font-size:16px;font-weight:700;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wlp-coin small{display:flex;align-items:center;gap:8px;color:var(--mute);font-size:11.5px}
.wlp-age{color:var(--up);font-weight:600}
.wlp-ca{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:11px;color:var(--mute)}
.wlp-ca:hover{color:var(--text)}
.wlp-mc{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.wlp-mc b{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.wlp-mc small{color:var(--faint);font-size:10.5px}

/* the chart, its candle sizes and the Trades switch */
.wlp-cbar{display:flex;align-items:center;gap:2px;padding:8px 12px 0}
.wlp-tfs{display:flex;gap:2px}
.wlp-tfs button{height:24px;min-width:30px;padding:0 7px;border-radius:6px;color:var(--mute);font-size:12px;font-weight:600}
.wlp-tfs button:hover{color:var(--text)}
.wlp-tfs button[aria-pressed=true]{color:var(--text);background:var(--hover)}
.wlp-mk{margin-left:auto;display:inline-flex;align-items:center;gap:6px;color:var(--text-2);font-size:12px;cursor:pointer;user-select:none}
.wlp-mk input{width:14px;height:14px;margin:0;accent-color:var(--brand);cursor:pointer}
.wlp .wlp-chart{position:relative;height:210px;margin:6px 0 0;border-bottom:1px solid var(--line)}      /* beats chartbox's .cbx{height:100%} */
.wlp-chart.cbx .cbx-note{font-size:10.5px}

/* the wallet */
.wlp-who{display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px;padding:13px 14px 4px}
.wlp-who .buddy{flex-shrink:0;border-radius:8px}
.wlp-id{min-width:0;flex:1 1 180px;display:flex;flex-direction:column;gap:1px}
.wlp-nm{font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wlp-addr{font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wlp-nm + .wlp-addr{color:var(--mute);font-size:11.5px}
.wlp-ibs{display:inline-flex;gap:2px}
.wlp-ib{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;color:var(--mute)}
.wlp-ib:hover{color:var(--text);background:var(--hover)}
.wlp-tags{display:inline-flex;gap:5px;flex-wrap:wrap}

/* its numbers: three to a row, the label over the value (GMGN's grid) */
.wlp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 12px;padding:12px 14px 14px}
.wlp-c{min-width:0}
.wlp-c .k{display:block;margin-bottom:4px;color:var(--mute);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wlp-c .v{display:flex;align-items:center;gap:4px;min-height:19px;font-size:13.5px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wlp-c .v .tk-spin{width:12px;height:12px}
.wlp-c .v.mute{color:var(--text-2);font-weight:600}
.wlp-c small{display:block;margin-top:2px;color:var(--mute);font-size:11.5px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wlp-pc{font-weight:600;opacity:.9}
.wlp-c .k .tk-spin{width:10px;height:10px;margin-left:4px;vertical-align:-1px}
.wlp-grid.wlp-busy .wlp-c .v,.wlp-grid.wlp-busy .wlp-c small{opacity:.55;transition:opacity .2s}      /* still reading its history */
.wlp-sold{height:22px;padding:0 8px}

.wlp-acts{display:flex;gap:8px;padding:0 14px 14px}
.wlp-acts .btn{flex:1;gap:7px;height:36px;font-weight:600}
.wlp-trk.on{color:var(--up);border-color:var(--up-line);background:var(--up-soft)}
.wlp-pf .ic:last-child{opacity:.6}

/* its trades */
.wlp-tr{border-top:1px solid var(--line)}
.wlp-tbl th{padding:9px 8px;font-size:11.5px}
.wlp-tbl th:first-child,.wlp-tbl td:first-child{padding-left:14px}
.wlp-tbl th:last-child,.wlp-tbl td:last-child{padding-right:10px}
.wlp-tbl td{padding:8px;font-size:12.5px;font-variant-numeric:tabular-nums}
.wlp-ty{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:22px;padding:0 8px;border-radius:6px;font-size:11.5px;font-weight:650}
.wlp-ty.buy{background:var(--up-soft);color:var(--up)}
.wlp-ty.sell{background:var(--down-soft);color:var(--down)}
.wlp-ty.in,.wlp-ty.out{background:var(--card-2);color:var(--text-2);border:1px solid var(--line-2)}
.wlp-all{display:block;margin:10px 14px 0}
.wlp-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:120px;padding:20px;text-align:center;color:var(--mute);font-size:12.5px}
.wlp-empty b{color:var(--text);font-size:13.5px}
.wlp-empty .tk-spin{width:16px;height:16px}

.wlp-src{display:flex;flex-direction:column;gap:6px;margin:0;padding:12px 14px 18px;color:var(--faint);font-size:11.5px;line-height:1.5}
.wlp-rd,.wlp-er{display:flex;align-items:center;flex-wrap:wrap;gap:7px;color:var(--text-2)}
.wlp-rd .tk-spin{width:12px;height:12px}
.wlp-er{color:var(--warn)}
.wlp-er .tk-more{margin:0}

/* a narrow window: the panel takes most of it */
@media (max-width:980px){
  .wlp-side{width:min(560px,calc(100vw - 40px))}
}

/* a phone: the same, in a sheet from the bottom (UI.modal) */
.sheet.wlp-sheet .sheet-b{padding:0}
.sheet.wlp-sheet .wlp-h{padding:10px 14px}
.sheet.wlp-sheet .wlp-chart{height:160px}
.sheet.wlp-sheet .wlp-grid{gap:13px 10px}
.sheet.wlp-sheet .wlp-c .v{flex-wrap:wrap;row-gap:1px;font-size:13px}
.sheet.wlp-sheet .wlp-pc{flex-basis:100%;font-size:11.5px}
.sheet.wlp-sheet .wlp-c small{white-space:normal}                         /* the percentage under the profit: three columns are narrow */
.sheet.wlp-sheet .wlp-tbl th:nth-child(5),.sheet.wlp-sheet .wlp-tbl td:nth-child(5){display:none}       /* gas: the row would run off the screen */
.sheet.wlp-sheet .wlp-acts .btn{min-height:44px}

@media (prefers-reduced-motion:reduce){
  .wlp-side{transition:none}
}
