/* Player v3.10.124 — mobile wallet spacing + featured-first sticky search. */

/* Lobby reading order: feature the hero first, then keep search available while browsing. */
#gameLobby > .lobby-announcement { order: 0 !important; }
#gameLobby > .mobile-lobby-shortcuts { order: 1 !important; }
#gameLobby > #featuredSection { order: 2 !important; }
#gameLobby > #lobbyStickySearch { order: 3 !important; }
#gameLobby > #lobbyCategoryNav { order: 4 !important; }
#gameLobby > .game-showcase-section:not(#featuredSection),
#gameLobby > .game-provider-section { order: 5 !important; }

#lobbyStickySearch {
  position: sticky;
  top: calc(var(--header-height, 68px) + 8px);
  z-index: 70;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(221,185,79,.22);
  border-radius: 14px;
  background: rgba(10,10,12,.96);
  box-shadow: 0 10px 28px rgba(0,0,0,.24);
  isolation: isolate;
}

#lobbyStickySearch .lobby-filter-tools {
  display: grid !important;
  grid-template-columns: minmax(240px,1fr) minmax(150px,220px) auto !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Categories stay directly below search but do not consume sticky viewport height. */
#gameLobby > #lobbyCategoryNav {
  position: relative !important;
  top: auto !important;
  z-index: 20 !important;
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 7px !important;
  width: 100% !important;
  padding: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
#gameLobby > #lobbyCategoryNav::-webkit-scrollbar { display: none; }
#gameLobby > #lobbyCategoryNav .lobby-category-button { flex: 0 0 auto !important; }

/* Mobile header: reserve real space between balance and refresh, then keep
   Deposit + Withdraw immediately beside the wallet card. */
@media (max-width: 860px) {
  .topbar-actions {
    gap: 6px !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .topbar-wallet-cluster {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .topbar-wallet-card,
  .game-wallet-balance-card.topbar-wallet-card {
    display: grid !important;
    grid-template-columns: 26px minmax(72px,1fr) 30px !important;
    align-items: center !important;
    flex: 0 0 148px !important;
    width: 148px !important;
    max-width: 148px !important;
    min-width: 148px !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 5px 6px !important;
    column-gap: 7px !important;
    overflow: hidden !important;
  }

  .topbar-wallet-card .game-wallet-icon {
    display: grid !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }

  .topbar-wallet-card .game-wallet-copy {
    min-width: 0 !important;
    width: 100% !important;
    padding-right: 1px !important;
  }

  .topbar-wallet-card .game-wallet-copy span { display: none !important; }

  .portal #gamesWalletAmount,
  .topbar-wallet-card .game-wallet-copy strong {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar .wallet-refresh-button,
  .wallet-refresh-button {
    position: static !important;
    justify-self: end !important;
    flex: none !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .topbar-wallet-actions,
  .game-wallet-actions.topbar-wallet-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
  }

  #gamesDepositButton.wallet-quick-action,
  #gamesWithdrawButton.wallet-quick-action {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 70px !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  #gamesDepositButton .wallet-quick-action-icon,
  #gamesWithdrawButton .wallet-quick-action-icon {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 14px !important;
  }

  #gamesDepositButton > span,
  #gamesWithdrawButton > span {
    position: static !important;
    display: inline !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: nowrap !important;
  }

  #lobbyStickySearch {
    top: calc(56px + env(safe-area-inset-top));
    padding: 7px !important;
    border-radius: 12px !important;
    background: rgba(9,9,11,.98) !important;
    box-shadow: 0 7px 20px rgba(0,0,0,.22) !important;
  }

  #lobbyStickySearch .lobby-filter-tools {
    grid-template-columns: minmax(0,1fr) minmax(112px,36%) !important;
    gap: 6px !important;
  }

  #lobbyStickySearch .lobby-filter-count {
    grid-column: 1 / -1 !important;
    padding: 0 3px !important;
    font-size: 8px !important;
  }

  #gameLobby > #lobbyCategoryNav {
    padding: 5px 3px 7px !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 620px) {
  .notification-wrap { display: none !important; }

  .topbar-wallet-card,
  .game-wallet-balance-card.topbar-wallet-card {
    grid-template-columns: minmax(0,1fr) 29px !important;
    flex-basis: 132px !important;
    width: 132px !important;
    max-width: 132px !important;
    min-width: 132px !important;
    padding: 5px 7px 5px 9px !important;
    column-gap: 9px !important;
  }

  .topbar-wallet-card .game-wallet-icon { display: none !important; }

  #gamesDepositButton.wallet-quick-action { min-width: 60px !important; padding-inline: 6px !important; }
  #gamesWithdrawButton.wallet-quick-action { min-width: 66px !important; padding-inline: 6px !important; }
}

@media (max-width: 430px) {
  .topbar-actions { gap: 4px !important; }
  .topbar-wallet-cluster { gap: 4px !important; }

  .topbar-wallet-card,
  .game-wallet-balance-card.topbar-wallet-card {
    grid-template-columns: minmax(0,1fr) 27px !important;
    flex-basis: 124px !important;
    width: 124px !important;
    max-width: 124px !important;
    min-width: 124px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 4px 6px 4px 8px !important;
    column-gap: 8px !important;
  }

  .portal #gamesWalletAmount,
  .topbar-wallet-card .game-wallet-copy strong { font-size: 14px !important; }

  .topbar .wallet-refresh-button,
  .wallet-refresh-button {
    width: 27px !important;
    min-width: 27px !important;
    height: 27px !important;
    min-height: 27px !important;
  }

  #gamesDepositButton.wallet-quick-action,
  #gamesWithdrawButton.wallet-quick-action {
    min-width: 36px !important;
    width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
  }

  #gamesDepositButton > span,
  #gamesWithdrawButton > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
  }

  #gamesDepositButton .wallet-quick-action-icon,
  #gamesWithdrawButton .wallet-quick-action-icon {
    width: 17px !important;
    height: 17px !important;
    flex-basis: 17px !important;
  }

  #lobbyStickySearch .lobby-filter-tools {
    grid-template-columns: minmax(0,1fr) 104px !important;
  }

  #lobbyStickySearch .lobby-filter-count { display: none !important; }
}

@media (max-width: 350px) {
  .topbar-wallet-card,
  .game-wallet-balance-card.topbar-wallet-card {
    flex-basis: 112px !important;
    width: 112px !important;
    max-width: 112px !important;
    min-width: 112px !important;
  }
  .portal #gamesWalletAmount,
  .topbar-wallet-card .game-wallet-copy strong { font-size: 13px !important; }
  #gamesDepositButton.wallet-quick-action,
  #gamesWithdrawButton.wallet-quick-action {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #lobbyStickySearch { scroll-behavior: auto !important; }
}
