/* live-game-bar.css — the rescue control for an in-progress game.
   ------------------------------------------------------------------------
   Sits directly above the bottom nav (z-index 30: over the nav at 25, under the
   payment/sheet modals at 40 and 80, so it can never cover the top-up flow).
   Pointer events stay off the sides so the nav underneath remains reachable. */

#liveGameBar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 30;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--brand, #22c55e) 42%, transparent);
  background: color-mix(in srgb, var(--s2, #14161b) 92%, var(--brand, #22c55e));
  color: var(--text, #f2f4f8);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: lgbIn .22s ease-out;
}

#liveGameBar[hidden] { display: none !important; }

#liveGameBar:active { transform: scale(.988); }

#liveGameBar:focus-visible {
  outline: 2px solid var(--brand, #22c55e);
  outline-offset: 2px;
}

.lgb-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand, #22c55e);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand, #22c55e) 70%, transparent);
  animation: lgbPulse 1.8s ease-out infinite;
}

.lgb-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.lgb-txt b {
  font-size: var(--fs-sm, 13px);
  font-weight: 800;
  line-height: 1.5;
}

.lgb-txt [data-lgb-sub] {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #9aa4b2);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lgb-x {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--line2, #2a2f3a) 70%, transparent);
  color: var(--muted, #9aa4b2);
  font-size: 12px;
  font-weight: 700;
}

.lgb-x:active { transform: scale(.94); }

@keyframes lgbIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lgbPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand, #22c55e) 65%, transparent); }
  70%  { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand, #22c55e) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand, #22c55e) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  #liveGameBar { animation: none; }
  .lgb-dot { animation: none; }
}

/* Wide screens put the nav in the header strip, so the bar only needs a small
   bottom offset and should not stretch across the desktop width. */
@media (min-width: 900px) {
  #liveGameBar { bottom: 18px; right: auto; width: 360px; }
}