/* Player v3.10.125 — mobile lobby cleanup, refresh centering, and modal navigation fix.
   UI-only: no wallet/betting/payment/Core behavior changes. */

/* The old quick-action strip was mobile-only and duplicated the persistent header/bottom-nav controls. */
.mobile-lobby-shortcuts {
  display: none !important;
}

/* The refresh SVG is absolutely centered by v3.10.114. Make the button its containing block. */
@media (max-width: 860px) {
  .topbar .topbar-wallet-card > .wallet-refresh-button,
  .portal.game-active .topbar .topbar-wallet-card > .wallet-refresh-button {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    align-self: center !important;
    justify-self: end !important;
    line-height: 0 !important;
    padding: 0 !important;
  }

  .topbar .topbar-wallet-card > .wallet-refresh-button > svg,
  .portal.game-active .topbar .topbar-wallet-card > .wallet-refresh-button > svg {
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: 50% 50% !important;
  }
}

/* Account Center: one viewport-contained shell with one internal scroll surface.
   Bottom navigation remains accessible; selecting another destination closes this modal in JS. */
#accountCenterModal {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
}

#accountCenterModal .account-center-modal-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#accountCenterModal .account-center-modal-header,
#accountCenterModal .account-center-tabs {
  flex: 0 0 auto !important;
}

#accountCenterModal .account-center-modal-panel:not(.hidden) {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

#accountCenterModal .account-center-modal-panel.hidden {
  display: none !important;
}

#accountCenterModal .account-center-modal-panel > .view.account-modal-hosted {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

@media (max-width: 860px) {
  #accountCenterModal {
    z-index: 205 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding:
      max(8px, env(safe-area-inset-top))
      8px
      calc(68px + env(safe-area-inset-bottom)) !important;
  }

  #accountCenterModal.hidden {
    display: none !important;
  }

  body:has(#accountCenterModal:not(.hidden)) .mobile-bottom-nav {
    z-index: 210 !important;
  }

  #accountCenterModal .account-center-modal-card {
    width: min(680px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    height: min(760px, calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom))) !important;
    max-height: calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    margin: 0 auto !important;
    padding: 12px !important;
    border-radius: 16px !important;
  }

  #accountCenterModal .account-center-modal-header {
    margin-bottom: 8px !important;
  }

  #accountCenterModal .account-center-tabs {
    position: static !important;
    margin-bottom: 8px !important;
  }

  #accountCenterModal .account-center-modal-panel:not(.hidden) {
    padding: 0 2px calc(18px + env(safe-area-inset-bottom)) 0 !important;
  }
}

@media (max-width: 430px) {
  #accountCenterModal .account-center-modal-card {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    height: calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    padding: 10px !important;
    border-radius: 14px !important;
  }

  #accountCenterModal .account-center-tab {
    min-width: 0 !important;
    padding-inline: 5px !important;
    font-size: 10.5px !important;
  }
}
