/* Watchlist: starred coins, live prices, alerts. Everything is scoped under .wl.
   A page title and pill controls on the page background, then one bordered panel (radius 4px) with the coin table:
   framed pictures, sentence-case grey headers, right-aligned figures, a blue "Buy" pill and round icon buttons. */
.wl { height: 100%; min-height: 0; max-width: 100vw; display: flex; flex-direction: column; contain: inline-size; padding: 0 16px 14px; }
.wl > * { flex: none; }
.wl-bar { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 0; flex-wrap: wrap; }
.wl-title { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.wl-title h1 { margin: 0; font: 500 18px/1 var(--sans); letter-spacing: -.015em; }
.wl-n { padding: 3px 8px; border-radius: var(--pill); background: var(--fill); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.wl-n:empty { display: none; }
.wl-q { display: flex; align-items: center; gap: 7px; width: 220px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel); color: var(--dim); transition: border-color .12s, box-shadow .12s; }
.wl-q:hover, .wl-add input:hover { border-color: var(--line-2); }
.wl-q:focus-within, .wl-add input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.wl-q input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: 500 12.5px/1 var(--sans); }
.wl-q input:focus-visible, .wl-add input:focus-visible { outline: 0; }
.wl-add { display: flex; gap: 6px; min-width: 0; }
.wl-add input { width: 280px; min-width: 0; height: 30px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel); color: var(--fg); font: 500 12px/1 var(--mono); outline: 0; transition: border-color .12s, box-shadow .12s; }
.wl-add .btn, .wl-alert .btn { height: 30px; }
.wl-upd { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; color: var(--muted); font: 500 12px/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-upd:empty { display: none; }
.wl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }

/* alert editor */
.wl-alert { display: grid; gap: 10px; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--sel-line); border-radius: var(--radius); background: var(--panel); }
.wl-al-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wl-al-h > b { font-size: 14px; font-weight: 600; }
.wl-al-h .mono { color: var(--muted); font-size: 12px; }
.wl-al-h .mono b { color: var(--fg); font-weight: 500; }
.wl-x { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.wl-x:hover { color: var(--fg); background: var(--hover); }
.wl-al-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wl-al-list li { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); font: 500 12.5px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.wl-al-list li span { flex: 1; min-width: 0; }
.wl-al-list em { padding: 3px 8px; border-radius: var(--pill); background: color-mix(in srgb, var(--up) 12%, transparent); font: 600 11px/1 var(--sans); font-style: normal; color: var(--up); }
.wl-al-list li.fired { color: var(--muted); }
.wl-al-list li.fired em { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.wl-mini { height: 26px; padding: 0 11px; border: 0; border-radius: var(--pill); background: var(--fill); color: var(--fg-2); font: 600 11.5px/1 var(--sans); }
.wl-mini:hover { color: var(--fg); background: var(--fill-2); }
.wl-al-f { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-al-f select, .wl-al-f input { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--fg); font: 500 12.5px/1 var(--sans); outline: 0; transition: border-color .12s, box-shadow .12s; }
.wl-al-f input { width: 160px; font-family: var(--mono); }
.wl-al-f select:hover, .wl-al-f input:hover { border-color: var(--line-2); }
.wl-al-f select:focus, .wl-al-f input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.wl-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

/* table: the bordered panel scrolls; the header row sticks, and so does the coin column when the table is wider */
.wl > .wl-tw { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.wl-t { width: 100%; min-width: 1060px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.wl-t th { position: sticky; top: 0; z-index: 2; height: 40px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); font: 400 12px/1 var(--sans); white-space: nowrap; }
.wl-t th.n, .wl-t td.n { text-align: right; }
.wl-t td { height: 64px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; vertical-align: middle; background: var(--panel); transition: background-color .1s; }
.wl-t tbody tr:last-child td { border-bottom: 0; }
.wl-t td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 500; }
.wl-t td.n b { font-weight: 500; }
.wl-t td.c-x { color: var(--fg-2); }
.wl-t tbody tr { cursor: pointer; }
.wl-t tbody tr:hover td { background-color: var(--panel-2); }
.wl .srt { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.wl .srt:hover, .wl .srt.on { color: var(--fg); }
.wl .srt i { font-style: normal; color: var(--accent); margin-left: 3px; }
.wl-t .c-coin { position: sticky; left: 0; z-index: 1; min-width: 230px; }
.wl-t th.c-coin { z-index: 3; }
.wl-coin { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 280px; }
/* the frame: a 2px ring in the launchpad's colour (grey when it has none) around the picture */
.wl-av { flex: none; display: grid; padding: 2px; border-radius: var(--radius); background: color-mix(in srgb, var(--lp, var(--line-2)) 38%, transparent); }
.wl-av .av { width: 40px; height: 40px; border: 0; border-radius: 2px; }
.wl-ct { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; min-width: 0; }
.wl-c1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wl-c1 .copy { flex: none; }
.wl-c1 b { min-width: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.wl-c2 { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; }
.wl-nm { min-width: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.wl .c-spark { width: 104px; }
.wl .spark { display: block; width: 96px; height: 30px; }
.wl .spark svg { display: block; }
.wl .spark-wait { display: block; width: 96px; height: 22px; margin-top: 4px; border-radius: var(--radius); opacity: .8; }
.wl .spark-none { display: block; color: var(--dim); font: 12px/30px var(--sans); }
.wl-t td.fl-up { animation: wl-up 1.2s ease-out; }
.wl-t td.fl-dn { animation: wl-dn 1.2s ease-out; }
@keyframes wl-up { from { background-color: color-mix(in srgb, var(--up) 20%, var(--panel)); } }
@keyframes wl-dn { from { background-color: color-mix(in srgb, var(--down) 20%, var(--panel)); } }
/* organic score: a tinted pill; a low score stays neutral (low is common, not an alarm) */
.wl-org { display: inline-block; min-width: 32px; padding: 3px 8px; border-radius: var(--pill); background: var(--fill); color: var(--muted); text-align: center; font: 600 12px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.wl-org.ok { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.wl-org.mid { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.wl .c-al, .wl .c-act { width: 1%; }
.wl-t th.c-al { text-align: center; }
.wl-t td.c-al { text-align: center; }
.wl-bell { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--pill); background: none; color: var(--dim); transition: color .12s, border-color .12s, background-color .12s; }
.wl-bell:hover { color: var(--fg); border-color: var(--line-2); background: var(--hover); }
.wl-bell.on { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.wl-bell.open { color: var(--sel-fg); border-color: var(--sel-line); background: var(--sel-bg); }
.wl-bell b { font: 600 11.5px/1 var(--mono); font-variant-numeric: tabular-nums; }
.wl-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
/* quick buy: the shared solid pill (.qb.fill), sized for the 64px rows: "⚡ 0.1 SOL" */
.wl .wl-t .qb.nc-qb { height: 30px; min-width: 86px; margin: 0; padding: 0 14px; font: 700 12.5px/1 var(--sans); font-variant-numeric: tabular-nums; }
.wl-t .qb em { font-style: normal; }
.wl-rm { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--dim); transition: color .12s, background-color .12s; }
.wl-rm:hover { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
/* empty states (the shared .empty-state look) and the "Trending now" starter list */
.wl .empty-state { max-width: 500px; padding: 48px 20px; }
.wl-es .es-ic { color: var(--warn); --f: color-mix(in srgb, var(--warn) 30%, transparent); }
.wl-tr { justify-self: stretch; display: grid; gap: 0; margin-top: 18px; padding: 0 0 4px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); text-align: left; overflow: hidden; }
.wl-tr h4 { display: flex; align-items: center; justify-content: space-between; height: 40px; margin: 0 0 4px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--fg-2); font: 600 13px/1.2 var(--sans); }
.wl-tr h4 span { color: var(--muted); font-weight: 500; font-size: 12px; }
.wl-tr-r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 30px; align-items: center; gap: 12px; min-height: 52px; margin: 0 4px; padding: 0 10px; border-radius: 6px; cursor: pointer; }
.wl-tr-r:hover { background: var(--hover); }
.wl-tr-r .wl-av .av { width: 32px; height: 32px; font-size: 10.5px; }
.wl-tr-n { display: grid; gap: 3px; min-width: 0; }
.wl-tr-n b { color: var(--fg); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-tr-n span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-tr-v { display: grid; justify-items: end; gap: 3px; font: 500 13px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); }
.wl-tr-v small { font-size: 12px; }
.wl-tr-star { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--muted); transition: color .12s, border-color .12s; }
.wl-tr-star:hover { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); --f: color-mix(in srgb, var(--warn) 30%, transparent); }
.wl-tr-r.sk { cursor: default; grid-template-columns: 36px minmax(0, 1fr) 60px; }
.wl-tr-r.sk:hover { background: none; }
.wl-tr-r.sk .skel:nth-child(1) { width: 36px; height: 36px; border-radius: var(--radius); }
.wl-tr-r.sk .skel:nth-child(2) { width: 55%; height: 11px; }
.wl-tr-r.sk .skel:nth-child(3) { height: 11px; }
.wl-tr-msg { margin: 0; padding: 12px 14px; }
.wl .skel { display: block; border-radius: var(--radius); background: linear-gradient(90deg, var(--panel-2) 0 40%, color-mix(in srgb, var(--panel-2) 50%, var(--line-2)) 50%, var(--panel-2) 60% 100%); background-size: 250% 100%; animation: wl-skel 1.3s linear infinite; }
@keyframes wl-skel { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .wl .skel { animation: none; } }

@media (max-width: 900px) {
  .wl-title { flex-basis: 100%; }
  .wl-q { flex: 1 1 160px; width: auto; }
  .wl-add { flex: 1 1 240px; }
  .wl-add input { flex: 1; width: auto; }
}
@media (max-width: 760px) {
  .wl { padding: 0 10px 10px; }
  .wl .empty-state { padding: 32px 16px; }
  .wl-bar { gap: 8px; padding: 10px 0; }
  .wl-title h1 { font-size: 16px; }
  .wl-upd { flex-basis: 100%; margin-left: 2px; }
  .wl-alert { margin: 0 0 8px; }
  .wl-al-f input { flex: 1 1 120px; width: auto; }
  .wl-al-f .btn { flex: 1 1 100%; }
  .wl-av .av { width: 30px; height: 30px; }
  .wl-nm { max-width: none; }
  .wl-c2 .soc { display: none; } /* the name gets the room; the token page has the links */
  /* the table becomes a list: coin | price over 24h change | alerts | quick buy and remove */
  .wl-t { display: block; min-width: 0; }
  .wl-t thead { display: block; position: sticky; top: 0; z-index: 2; }
  .wl-t tbody { display: block; }
  .wl-t tr { display: grid; grid-template-columns: minmax(0, 1fr) 86px 34px auto; grid-template-areas: "coin px al act" "coin chg al act"; align-items: center; column-gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line-soft); background: var(--panel); }
  .wl-t tbody tr:last-child { border-bottom: 0; }
  .wl-t thead tr { grid-template-areas: "coin px al act"; border-bottom-color: var(--line); }
  .wl .wl-t :is(th, td) { display: block; position: static; width: auto; min-width: 0; height: auto; padding: 0; border: 0; background: none; }
  .wl .wl-t th { height: 38px; line-height: 38px; }
  .wl .wl-t :is(.c-spark, .c-x), .wl .wl-t th.c-chg { display: none; }
  .wl .wl-t .c-coin { grid-area: coin; }
  .wl .wl-t td.c-coin { padding: 10px 0; }
  .wl-t .c-px { grid-area: px; }
  .wl-t .c-chg { grid-area: chg; font-size: 12px; }
  .wl-t td.c-px { align-self: end; }
  .wl-t td.c-chg { align-self: start; padding-top: 3px; }
  .wl-t .c-al { grid-area: al; justify-self: end; }
  .wl-t th.c-al { visibility: hidden; }
  .wl-t .c-act { grid-area: act; }
  .wl-t td.c-px b { font-size: 13px; }
  .wl-bell { min-width: 30px; padding: 0 6px; }
  .wl .wl-t .qb.nc-qb { min-width: 0; height: 28px; padding: 0 11px; }
  .wl-t .qb em { display: none; }
  .wl-acts { gap: 2px; }
  .wl-coin { max-width: none; gap: 10px; }
  .wl-t tbody tr:hover { background: var(--panel-2); }
  .wl-t tbody tr:hover td { background: none; }
}
