/* JFun Gaming UI - Menu (menu.php, body.jg-menu).
   menu.php has no PWA layer: jfun-game.css comes from includes/game_head.php (always dark), this file loads after it.
   Every rule is scoped under html body.jg-menu. No jg-sticky: the page's own .navbar is already sticky and sits inside .container. */

/* ---------- shell + top bar ---------- */
html body.jg-menu { background: var(--jf-page-bg); color: var(--text-color); padding-left: 12px; padding-right: 12px; min-height: 100vh; min-height: 100dvh; }
html body.jg-menu .navbar {
  top: calc(8px + env(safe-area-inset-top, 0px)); border-radius: 16px;
  background: var(--jf-solid); border: 1px solid var(--border-color); box-shadow: none;
}
html body.jg-menu .navbar .logo {
  min-width: 44px; min-height: 44px; justify-content: center; border-radius: 12px;
  background: var(--jf-grad); color: #fff;
}
html body.jg-menu .navbar .logo:hover { transform: none; background: var(--jf-grad); }
html body.jg-menu .navbar .user-info .balance-display,
html body.jg-menu .navbar .user-info .balance-display:hover {
  min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: default;
  background: linear-gradient(var(--jf-solid), var(--jf-solid)) padding-box, var(--jf-grad) border-box;
  border: 1.5px solid transparent;
}
html body.jg-menu .navbar .user-info .balance-display .balance-text { font-family: var(--jg-font-display); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-color); }
html body.jg-menu .navbar .user-info .balance-display .currency-text { background: var(--jf-grad-soft); color: var(--text-color); font-family: var(--jg-font-display); font-weight: 700; }
html body.jg-menu .btn-login,
html body.jg-menu .btn-login:hover {
  min-height: 44px; padding: 0 18px; justify-content: center; border-radius: 999px; font: 700 14px var(--jg-font-display);
  letter-spacing: 0.04em; text-transform: uppercase; background: transparent; color: var(--jf-pink); border: 2px solid var(--jf-pink);
}
html body.jg-menu .btn-login:active { transform: scale(0.97); }
html body.jg-menu .currency-option { min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--text-color); }
html body.jg-menu .currency-option:hover,
html body.jg-menu .currency-option.active { background: var(--jf-grad-soft); color: var(--text-color); }

/* ---------- top block (.merged-card) ---------- */
html body.jg-menu .merged-card {
  padding: 16px; border-radius: var(--jg-radius); min-width: 0;
  background: var(--jf-solid); border: 1px solid var(--border-color); box-shadow: var(--jg-glow);
}

/* ---------- action buttons -> single column list of rows ---------- */
html body.jg-menu .actions-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 0; }
html body.jg-menu .action-btn,
html body.jg-menu .action-btn.deposit,
html body.jg-menu .action-btn.transfer,
html body.jg-menu .action-btn.register {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 0; align-items: center; text-align: left; min-height: 64px; padding: 10px 14px;
  border-radius: var(--jg-radius); background: var(--card-bg); border: 1px solid var(--border-color);
  color: var(--text-color); touch-action: manipulation;
}
html body.jg-menu .action-btn:hover { transform: none; box-shadow: none; }
html body.jg-menu .action-btn:active { transform: scale(0.98); }
html body.jg-menu .action-btn .action-icon,
html body.jg-menu .action-btn.deposit .action-icon,
html body.jg-menu .action-btn.transfer .action-icon,
html body.jg-menu .action-btn.register .action-icon {
  grid-column: 1; grid-row: 1 / span 2; width: 44px; height: 44px; margin: 0; font-size: 18px; border-radius: 50%;
  background: var(--jf-grad-soft); color: var(--jf-active); border: 1px solid var(--border-color);
}
html body.jg-menu .action-btn:hover .action-icon { transform: none; }
html body.jg-menu .action-btn .action-title { grid-column: 2; grid-row: 1; align-self: end; margin: 0; font: 700 16px/1.2 var(--jg-font-display); letter-spacing: 0.02em; color: var(--text-color); overflow-wrap: anywhere; }
html body.jg-menu .action-btn .action-subtitle { grid-column: 2; grid-row: 2; align-self: start; font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
/* right chevron, pure CSS (no icon font) */
html body.jg-menu .action-btn::after {
  content: ''; grid-column: 3; grid-row: 1 / span 2; justify-self: center; width: 8px; height: 8px;
  border-top: 2px solid var(--text-secondary); border-right: 2px solid var(--text-secondary); transform: rotate(45deg);
}

/* ---------- download section ---------- */
html body.jg-menu .download-section { margin-top: 10px; }
html body.jg-menu .download-btn,
html body.jg-menu .download-btn:hover {
  max-width: none; min-height: 52px; padding: 0 20px; border-radius: 14px; gap: 10px;
  font: 700 16px var(--jg-font-display); letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--jf-grad); color: #fff; box-shadow: var(--jg-glow); animation: none; touch-action: manipulation;
}
html body.jg-menu .download-btn:hover { transform: none; }
html body.jg-menu .download-btn:active { transform: scale(0.97); }
html body.jg-menu .download-btn i { animation: none; }

/* ---------- toast (solid; inline #333 / #6c757d colours overridden) ---------- */
html body.jg-menu .toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: auto; min-width: 0; max-width: 420px; margin: 0 auto; overflow: hidden;
  background: var(--jf-solid); color: var(--text-color); border: 1px solid var(--border-color);
  border-left-width: 1px; border-radius: 14px; padding: 14px 8px 14px 20px;
}
html body.jg-menu .toast::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--jf-grad); }
html body.jg-menu .toast.success::before { background: var(--jg-ok); }
html body.jg-menu .toast.error::before { background: var(--jg-bad); }
html body.jg-menu .toast > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
html body.jg-menu .toast [style*="color"] { color: var(--text-color) !important; }
html body.jg-menu .toast #toast-message { color: var(--text-secondary) !important; }
html body.jg-menu .toast-icon { color: var(--jf-pink); }
html body.jg-menu .toast.success .toast-icon { color: var(--jg-ok); }
html body.jg-menu .toast.error .toast-icon { color: var(--jg-bad); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html body.jg-menu .download-btn,
  html body.jg-menu .download-btn i { animation: none; }
}
