/* Server tab, feed channel: one Discord-style activity stream (js/feed-fill.js). Tokens only, so a re-theme of the room carries over.
   On the feed channel it replaces the room's own message list and the old "Mining right now" panel (js/challenges-live.js). */

/* ---------- the old panel and the room's own message list are not shown on the feed channel ---------- */
html body.ff-on.ff-on:has(#chanList button.on[data-key="c:wins-feed"]) .stage:not(.chal-open)>.cl-now{display:none!important}
html body.ff-on .stage>.cl-now{display:none!important}
html body.ff-on.ff-on:has(#chanList button.on[data-key="c:wins-feed"]) .stage:not(.chal-open)>.stage-body{flex:none}
html body.ff-on.ff-on:has(#chanList button.on[data-key="c:wins-feed"]) .stage:not(.chal-open)>.stage-body>.msgs,
html body.ff-on.ff-on:has(#chanList button.on[data-key="c:wins-feed"]) .stage:not(.chal-open)>.stage-body>.typing{display:none!important}

/* order inside the stage (a column): header, the panel, the (read-only) footer line */
body.ff-on .stage>.stage-head{order:1}
body.ff-on .stage>.stage-body{order:3}
.stage>.ff-panel{order:2;flex:1 1 0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--ground)}
.stage>.ff-panel[hidden]{display:none!important}

/* ---------- the pools strip ---------- */
.ff-mine{flex:none;padding:4px 16px 6px;border-bottom:1px solid var(--line);max-height:96px;overflow:hidden}
.ff-mine[hidden]{display:none}
.ff-hd{display:flex;align-items:center;gap:4px 12px;min-height:28px}
.ff-t{font:600 13px var(--font-display);letter-spacing:.1em;text-transform:uppercase;color:var(--text);white-space:nowrap}
.ff-sum{flex:1 1 auto;min-width:0;font-size:var(--fs-small);color:var(--text-muted);line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ff-more{margin-left:auto;min-height:32px;padding:0 6px;border:0;background:none;color:var(--accent-text);font:500 var(--fs-small) var(--font-body);white-space:nowrap;cursor:pointer}
.ff-more:hover{text-decoration:underline}
.ff-more:focus-visible,.ff-act:focus-visible,.ff-stream:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}
/* collapsed on a wide screen: three small cells side by side, two short lines each */
.ff-coins{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 12px;margin-top:2px}
.ff-coin{display:grid;min-width:0;padding:1px 0 1px 8px;border-left:3px solid var(--accent)}
.ff-c-btc{border-left-color:var(--coin-btc)}
.ff-c-bch{border-left-color:var(--coin-bch)}
.ff-c-ltc_doge{border-left-color:var(--coin-ltc)}
.ff-cn{font:600 13px var(--font-display);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ff-cs{font-size:12px;color:var(--text-muted);line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ff-on1{color:var(--text)}
.ff-one{grid-column:1/-1;margin:0;font-size:12px;line-height:1.35;color:var(--text-muted);max-height:2.7em;overflow:hidden;overflow-wrap:anywhere}
.ff-one .ff-cn{font-size:12px}
.ff-who{display:none}
/* expanded: full rows, the strip scrolls inside itself (never more than half of the panel) */
.ff-panel.more .ff-mine{max-height:var(--ff-minemax,50%);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent}
.ff-panel.more .ff-coins{grid-template-columns:minmax(0,1fr);gap:3px}
.ff-panel.more .ff-coin{display:flex;flex-wrap:wrap;align-items:center;gap:2px 12px;min-height:34px;padding:3px 10px;border:1px solid var(--line-strong);border-left-width:3px;border-radius:var(--r-sm);background:var(--surface-1)}
.ff-panel.more .ff-cn{font-size:14px;overflow:visible;white-space:normal}
.ff-panel.more .ff-cs{font-size:var(--fs-small);white-space:normal;overflow:visible}
.ff-panel.more .ff-who{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:2px 12px;flex:1 1 100%;padding-top:2px}
.ff-m{display:inline-flex;align-items:center;gap:6px;min-width:0;min-height:24px;font-size:var(--fs-small)}
.ff-av{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;flex:none;background:hsl(var(--h,140) 30% 24%);color:hsl(var(--h,140) 60% 86%);font:500 9px var(--font-body);user-select:none}
.ff-mn{font:500 13px var(--font-mono);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:16ch}
.ff-mh{font:500 12px var(--font-mono);color:var(--text-muted);white-space:nowrap}

/* ---------- the stream ---------- */
.ff-stream{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 0 10px;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent}
.ff-rows{display:flex;flex-direction:column}
.ff-empty{margin:10px 16px;font-size:var(--fs-small);color:var(--text-muted);line-height:1.4}
.ff-day{display:flex;align-items:center;gap:12px;margin:10px 16px 4px;font:600 12px var(--font-body);color:var(--text-muted)}
.ff-day::before,.ff-day::after{content:"";flex:1 1 0;height:1px;background:var(--line-strong)}
.ff-row{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:start;gap:0 8px;padding:7px 16px}
.ff-ic{display:grid;place-items:center;width:36px;min-height:24px;font-size:16px;line-height:1}
.ff-ic-join{color:var(--success)}
.ff-ic svg{display:block}
.ff-b{min-width:0}
.ff-s{margin:0;font-size:var(--fs-body);line-height:1.45;color:var(--text-muted);overflow-wrap:anywhere}
.ff-s2{margin-top:1px}
.ff-hi{color:var(--text);font-weight:600}
.ff-ts{margin-left:2px;font-size:12px;color:var(--text-muted);white-space:nowrap}
.ff-actrow{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px;margin-top:6px}
.ff-act{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border:1px solid var(--line-strong);border-radius:var(--r-md);background:var(--surface-2);color:var(--text);font:500 var(--fs-body) var(--font-body);cursor:pointer}
.ff-act:hover{border-color:var(--accent-line);background:var(--surface-3)}
.ff-act:disabled{opacity:.6;cursor:default}
.ff-ae{font-size:18px;line-height:1}
.ff-note{flex:1 1 100%;font-size:var(--fs-small);color:var(--danger)}
.ff-note:not(:empty){margin-top:4px}
.ff-note:empty{display:none}
.ff-done{margin:6px 0 0;font-size:var(--fs-small);color:var(--text-muted)}

/* ---------- narrow: the stage itself is narrow (set by the script) or the screen is ---------- */
.ff-panel.nw .ff-mine{padding:2px 12px 4px;max-height:72px}
.ff-panel.nw.more .ff-mine{max-height:var(--ff-minemax,50%)}
.ff-panel.nw .ff-hd{min-height:30px;flex-wrap:nowrap}
.ff-panel.nw .ff-sum{font-size:12px}
.ff-panel.nw .ff-more{min-height:40px;margin-block:-6px}
.ff-panel.nw .ff-row{padding:6px 12px;grid-template-columns:28px minmax(0,1fr);gap:0 6px}
.ff-panel.nw .ff-ic{width:28px}
.ff-panel.nw .ff-day{margin-inline:12px}
.ff-panel.nw.more .ff-who{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
@media (max-width:820px){
  .ff-mine{padding-left:12px;padding-right:12px}
}
/* collapsed strip: the hashrate waits for Show more, so the two short lines never clip */
.ff-panel:not(.more) .ff-hs{display:none}
