/* Shared loading indicator (js/busyIndicator.js, 2.4.0): a dark pill with one rotating ring and
   "Loading…", centred over the screen. No picture, so it is bundled and shows at once. The ring
   alone animates (web-ui-style.md §6.3: the animated element is not the one the UI tool styles).
   States (data-driven, not tool states): --hold = a wait that starts a game holds taps from the
   first moment through a clear layer; --shown = the wait passed 300 ms: the screen dims, every
   tap is held and the pill shows. */
.busy-indicator {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.busy-indicator.busy-indicator--hold {
  pointer-events: auto;
  display: flex;
}

.busy-indicator.busy-indicator--shown {
  display: flex;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.55);
  transition: background-color 120ms linear;
}

.busy-indicator:not(.busy-indicator--shown) .busy-indicator-card {
  visibility: hidden;
}

.busy-indicator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid #ffd34e;
  background: rgba(20, 8, 4, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.busy-indicator-spinner {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffd34e;
  animation: busy-indicator-spin 0.8s linear infinite;
}

@keyframes busy-indicator-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .busy-indicator-spinner { animation-duration: 2.4s; }
}
