/* 98CashWin — lottery game screens (WinGo / K3 / 5D)

   The game header has no balance, so users cannot see their money.
   game-page.js inserts a compact balance chip into that exact header slot
   (.navbar__content-right .WinGo__C-head-more).

   Here we style that chip, keep it clear of the two existing icon buttons,
   hide the oversized wallet card and notice strip, and give the game board
   the freed space.

   Everything is scoped to body[data-ws-game="1"], which the script sets only
   on game screens. Add data-ws-keep-cards="1" on <body> to keep the big cards. */

/* ---------- balance chip ---------- */
body[data-ws-game="1"] .ws-game-balance{
  display:inline-flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:1px;
  min-width:1.05rem;
  max-width:1.75rem;
  height:.7rem;
  padding:.05rem .18rem;
  margin-right:.12rem;
  border-radius:.35rem;
  background:linear-gradient(135deg,#12a866,#0b8f55);
  color:#fff;
  font-family:'Plus Jakarta Sans','Segoe UI',system-ui,sans-serif;
  line-height:1.05;
  box-shadow:0 .03rem .1rem rgba(11,143,85,.3);
  cursor:pointer;
  position:static !important;
  order:2;                    /* icons first, balance last (= rightmost) */
  flex:0 0 auto;
  overflow:hidden;
}
body[data-ws-game="1"] .ws-game-balance .wsgb-label{
  font-size:.17rem;
  font-weight:600;
  opacity:.8;
  white-space:nowrap;
}
body[data-ws-game="1"] .ws-game-balance .wsgb-amount{
  font-size:.24rem;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
body[data-ws-game="1"] .ws-game-balance.is-loading{opacity:.65}
body[data-ws-game="1"] .ws-game-balance:active{transform:scale(.97)}

@media (max-width:340px){
  body[data-ws-game="1"] .ws-game-balance{min-width:.95rem;max-width:1.5rem;padding:.04rem .14rem}
  body[data-ws-game="1"] .ws-game-balance .wsgb-amount{font-size:.22rem}
}

/* ---------- header row layout ---------- */
/* The right cluster holds [balance][icon][icon]. Make it a clean flex row
   so nothing overlaps and the icons are pushed to the left of the balance. */
body[data-ws-game="1"] .navbar__content-right{
  position:absolute !important;
  right:.24rem;
  left:auto !important;
  top:0;
  height:100%;
  width:auto !important;
  max-width:62%;
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  gap:.1rem;
  z-index:20;
}
body[data-ws-game="1"] .navbar__content-right > *{flex:0 0 auto}
/* The icon wrapper is absolute in the stock stylesheet (right: 0.34667rem),
   which made it ignore the row and sit under the balance. Make it a normal
   flex item so the layout can never overlap, however wide the balance gets. */
body[data-ws-game="1"] .navbar__content-right .WinGo__C-head-more{
  position:static !important;
  right:auto !important;
  left:auto !important;
  top:auto !important;
  transform:none !important;
  order:1;                    /* icons on the left */
  flex:0 0 auto;
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:.06rem;
  width:1.54667rem;
  height:.64rem;
}
/* the two existing round icon buttons must never be covered */
body[data-ws-game="1"] .navbar__content-right .WinGo__C-head-more > div{
  flex:0 0 auto;
  visibility:visible !important;
  opacity:1 !important;
}

/* keep the centred logo clear of the chip */
body[data-ws-game="1"] .navbar__content-center{max-width:46%}

/* ---------- hide the bulky wallet card + notice strip ---------- */
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .Wallet__C,
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .lottery-wallet-card,
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .wallet-banner,
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .balance-box,
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .noticeBar__container,
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .notice-bar,
body[data-ws-game="1"]:not([data-ws-keep-cards="1"]) .site-message-bar{
  display:none !important;
}
