/* =================== RPS (mobile button redesign) =================== */
/* RPS has no traditional game-action bar — the primary buttons live inside
   per-view cards (lobby Create, choose-view Confirm/Random, reveal-view
   Play again). The R/P/S choice grid is the core game UI and is left
   alone. We focus the mobile redesign on the lobby Create button (which is
   the entry-point primary action) and the realtime Confirm + Random pair
   inside the choose card.

   The .qk-lobby Create form button (#rps-create-btn) is the obvious move
   for the lobby view. JS sets `.is-legal` on it once the user has picked
   a bet amount (and, for fast mode, an R/P/S choice). The .gp-actions-original
   wrapping does not apply here (RPS doesn't render a .gp-panel), so we
   target IDs directly. */
@media (max-width: 720px) {
  /* Lobby Create button — the entry-point primary action. Always full-width
     since it's the only button in the form; .is-legal hides it during the
     in-flight POST so phones don't show a stale "Create" button while a
     server response is pending. */
  #rps-create-btn {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 14px;
    line-height: 1.1;
  }
  #rps-create-btn:not(.is-legal) {
    display: none !important;
  }

  /* Realtime choose-view: Confirm is the primary action once a choice is
     selected, Random pick is the always-available fallback. Pack them
     side by side; promote whichever is currently legal to full width. */
  #rps-confirm-btn,
  #rps-random-btn {
    flex: 1 1 calc(50% - 6px);
    min-height: 40px;
    padding: 8px 6px;
    font-size: 13px;
    line-height: 1.1;
  }
  #rps-confirm-btn.is-legal {
    flex-basis: 100%;
    min-height: 44px;
    font-size: 14px;
  }
  /* Hide Confirm until a choice is selected — the disabled grey button
     wastes a row of phone screen. Random pick stays visible as the
     reliable fallback. */
  #rps-confirm-btn:not(.is-legal) {
    display: none !important;
  }

  /* Reveal-view Play again button — single primary action, always legal
     once shown. We still flip .is-legal during the in-flight reset so the
     button doesn't double-fire on impatient taps. */
  #rps-play-again {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 14px;
    line-height: 1.1;
  }
  #rps-play-again:not(.is-legal) {
    display: none !important;
  }

  /* Rematch challenge modal — Accept is primary, Decline secondary. Pack
     side by side at 40px each; rely on .is-legal toggling for in-flight
     network calls. */
  #rps-rematch-accept-btn,
  #rps-rematch-decline-btn {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 13px;
    line-height: 1.1;
  }
  #rps-rematch-accept-btn:not(.is-legal),
  #rps-rematch-decline-btn:not(.is-legal) {
    display: none !important;
  }
}
