/* casino-deck.css - the CASINO header button, the Gaming Deck window, the
   Store pop-out and the minimised chip (1.11.9.29).
   Tokens only, so the Jade and Red skins carry all of it. The button is built
   from the exchange board's parts: the same dot-matrix face and the same dark
   screen, with three slot reels and a ticker of what is about to start. */

/* The casino and store no longer live in the tab row on a desktop. The tabs
   stay in the DOM (the tutorial, Council and inventory click them); on a
   phone mobile.js still uses them, so this only applies off mobile. */
body:not(.fm-mobile) .tab[data-tab="casino"],
body:not(.fm-mobile) .tab[data-tab="store"]{display:none!important}

/* ── Header button ─────────────────────────────────────────────────────── */
#casinoBtn{display:flex;align-items:center;gap:9px;height:58px;padding:0 12px 0 9px;margin-right:6px;background:#010401;
  border:1px solid var(--panel-edge);border-radius:6px;color:var(--pale);cursor:pointer;font-family:inherit;
  box-shadow:0 0 16px rgba(66,255,126,.10),inset 0 0 18px rgba(0,0,0,.8);transition:box-shadow .18s,border-color .18s,transform .18s}
#casinoBtn:hover,#casinoBtn:focus-visible,#casinoBtn.on{border-color:var(--gold);box-shadow:0 0 22px rgba(255,206,77,.22),inset 0 0 18px rgba(0,0,0,.8);outline:none;transform:translateY(-1px)}
.fmcb-reels{display:flex;gap:3px}
.fmcb-reel{width:22px;height:38px;overflow:hidden;border:1px solid var(--hr);border-radius:3px;background:#000;position:relative;
  box-shadow:inset 0 8px 8px -6px rgba(0,0,0,.9),inset 0 -8px 8px -6px rgba(0,0,0,.9)}
.fmcb-strip{display:flex;flex-direction:column;transform:translateY(0)}
.fmcb-strip b{display:block;height:38px;line-height:38px;text-align:center;font-family:'Doto','Share Tech Mono',monospace;font-weight:700;font-size:17px;color:var(--gold);text-shadow:0 0 6px rgba(255,206,77,.6)}
.fmcb-txt{display:flex;flex-direction:column;gap:4px;min-width:0;text-align:left}
.fmcb-nm{font-family:'Doto','Share Tech Mono',monospace;font-weight:700;font-size:24px;line-height:1;letter-spacing:.08em;color:var(--amber);text-shadow:0 0 8px rgba(240,180,84,.45)}
.fmcb-tick{width:180px;overflow:hidden;white-space:nowrap;font-size:10px;letter-spacing:.06em;color:var(--muted);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
#fmcbRun{display:inline-block;padding-left:100%;animation:fmcbTick 16s linear infinite}
@keyframes fmcbTick{to{transform:translateX(-100%)}}
/* Tight header (set by fitHeader in casino-deck.js from a measurement).
   fmh-0 comes first: Edit Profile, Tutorial and Support shrink to their
   glyphs. Those three are the lowest-traffic controls in the row and each has
   a glyph that already says what it is; the text stays in the DOM, so the
   accessible name, the tooltip and i18n are unchanged. A guest (12-letter
   Drifter name plus Claim Account) at 1920 fits on one line with this. */
body.fmh-0:not(.fm-mobile) #fm-edit-profile-btn,
body.fmh-0:not(.fm-mobile) #fm-tutorial-btn,
body.fmh-0:not(.fm-mobile) #fm-support-btn{font-size:0;padding:3px 9px}
body.fmh-0:not(.fm-mobile) #fm-edit-profile-btn::before{content:'\270E';font-size:.9rem}
body.fmh-0:not(.fm-mobile) #fm-tutorial-btn::before{content:'?';font-size:.85rem}
body.fmh-0:not(.fm-mobile) #fm-support-btn::before{content:'\2630';font-size:.85rem}
body.fmh-1 .fmcb-tick{display:none}
body.fmh-1 .fmcb-nm{font-size:22px}
body.fmh-2 #calcBtnLabel,body.fmh-2 #radioBtnLabel,body.fmh-2 #ledgerBtnLabel,body.fmh-2 #libBtnLabel,
body.fmh-2 #decoderBtnLabel,body.fmh-2 .fm-toollb{display:none}
body.fmh-3:not(.fm-mobile) .wrap > .row:first-child{flex-wrap:wrap;row-gap:6px}
body.fmh-3:not(.fm-mobile) .wrap > .row:first-child > .row{margin-left:auto}
@media(prefers-reduced-motion:reduce){#fmcbRun{animation:none;padding-left:0}}

/* STORE sits with the other header tools and looks like them. */
.fm-toolbtn{display:flex;flex-direction:column;align-items:center;gap:1px;cursor:pointer;user-select:none;padding:2px 6px;border:1px solid transparent;border-radius:4px;transition:border-color .18s,transform .18s}
.fm-toolbtn:hover,.fm-toolbtn:focus-visible,.fm-toolbtn.on{border-color:#1f5a33;transform:translateY(-1px);outline:none}
.fm-toolic{font-size:20px;line-height:26px;height:26px;filter:drop-shadow(0 0 5px rgba(255,206,77,.35))}
.fm-toollb{font-size:.58rem;letter-spacing:.12em;color:var(--gold);white-space:nowrap;font-family:'Share Tech Mono',ui-monospace,monospace}
@media (max-width:760px){.fm-toollb{display:none}}

/* ── Windows ───────────────────────────────────────────────────────────── */
.fm-deckwin{position:fixed;z-index:9123;display:none;flex-direction:column;min-width:560px;min-height:380px;max-width:calc(100vw - 8px);max-height:calc(100vh - 8px);
  resize:both;overflow:hidden;background:var(--bg);border:2px solid var(--panel-edge);box-shadow:0 18px 50px rgba(0,0,0,.75);color:var(--pale)}
.fm-deckwin.open{display:flex}
.fmd-bar{display:flex;align-items:center;gap:12px;padding:7px 8px 7px 12px;cursor:move;touch-action:none;user-select:none;flex-shrink:0;
  border-bottom:1px solid var(--hr);background:linear-gradient(var(--surface-2),var(--surface))}
.fmd-ttl{font-family:'Doto','Share Tech Mono',monospace;font-weight:700;font-size:18px;letter-spacing:.12em;color:var(--amber);flex:1;min-width:0;text-shadow:0 0 8px rgba(240,180,84,.35)}
.fmd-cr{display:flex;gap:16px;font-size:.74rem;color:var(--muted);font-variant-numeric:tabular-nums}
.fmd-cr b{font-weight:400;color:var(--gold)}
.fmd-cr b.up{color:var(--good)}.fmd-cr b.dn{color:var(--bad)}
.fmd-wb{width:30px;height:28px;background:none;border:1px solid var(--panel-edge);color:var(--pale);font-family:inherit;font-size:.9rem;cursor:pointer;border-radius:3px}
.fmd-wb:hover,.fmd-wb:focus-visible{border-color:var(--green);color:var(--green);outline:none}
.fmd-body{flex:1;min-height:0;display:flex}
.fmd-rail{width:190px;flex-shrink:0;overflow-y:auto;padding:6px 0 10px;border-right:1px solid var(--hr);background:var(--input-bg)}
.fmd-grp{font-size:.6rem;letter-spacing:.22em;color:var(--muted);opacity:.7;padding:12px 12px 4px}
.fmd-cart{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;border:0;border-left:3px solid transparent;background:none;color:var(--pale);
  padding:5px 10px 5px 9px;text-align:left;font-family:inherit;font-size:.8rem;cursor:pointer}
.fmd-cart i{font-style:normal;width:16px;text-align:center;color:var(--muted);flex-shrink:0}
.fmd-cart span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fmd-cart em{font-style:normal;font-size:.7rem;color:var(--amber);font-variant-numeric:tabular-nums}
.fmd-cart em.hot{color:var(--bad);animation:fmdBlink 1s steps(1) infinite}
@keyframes fmdBlink{50%{opacity:.35}}
.fmd-cart:hover,.fmd-cart:focus-visible{background:rgba(66,255,126,.06);outline:none}
.fmd-cart.on{border-left-color:var(--gold);background:rgba(255,206,77,.07);color:var(--gold)}
.fmd-cart.on i{color:var(--gold)}
.fmd-slot{flex:1;min-width:0;min-height:0;overflow:auto;display:flex;flex-direction:column}

/* The moved panes. Inline display:none from the tab switchers is overridden
   here: inside a window, the pane is always showing. */
.fm-deckwin #casinoTab{display:block!important;flex:1;min-height:0;overflow:auto;padding:8px 12px}
.fm-deckwin #casinoTabs{display:none!important}
.fm-deckwin #casinoContent{margin-top:0!important}
.fm-deckwin #storeTab{display:block!important;flex:1;min-height:0;overflow:auto}

/* Minimised */
.fm-deckchip{position:fixed;left:14px;bottom:14px;z-index:9122;display:none;align-items:center;gap:12px;padding:8px 14px;border-radius:999px;cursor:pointer;
  background:var(--surface);border:1px solid var(--gold);color:var(--pale);font-family:'Share Tech Mono',ui-monospace,monospace;font-size:.78rem;
  box-shadow:0 10px 26px rgba(0,0,0,.7),0 0 14px rgba(255,206,77,.18);font-variant-numeric:tabular-nums}
.fm-deckchip.on{display:flex}
.fm-deckchip b{font-family:'Doto','Share Tech Mono',monospace;font-weight:700;color:var(--amber);letter-spacing:.1em}
.fm-deckchip span{color:var(--muted)}
.fm-deckchip:hover,.fm-deckchip:focus-visible{border-color:var(--green);outline:none}
body.fm-mobile .fm-deckchip,body.fm-mobile .fm-deckwin{display:none!important}
