/* Shared app styles. */

/* Podium rows fade in as they arrive. Opacity only — no transform, and no
   transition on position: while a round is live the buzz order is the
   information, and animating rows into place would obscure who was first. */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* The buzzer.
   touch-action and the tap-highlight reset are not polish: without them mobile
   Safari/Chrome wait ~300ms to see whether a tap is a double-tap zoom, which
   silently destroys the precision the whole clock-sync design exists to buy. */
.buzzer {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, transform 80ms ease;
}

.buzzer-armed {
  background-color: #dc2626;
  color: #fff;
  cursor: pointer;
}

.buzzer-armed:active {
  transform: scale(0.97);
  background-color: #b91c1c;
}

/* Counting down to the open. Visibly not-yet-live, but clearly about to be. */
.buzzer-countdown {
  background-color: #78350f;
  color: #fbbf24;
  cursor: not-allowed;
}

.buzzer-locked {
  background-color: #3b4252;
  color: #6b7280;
  cursor: not-allowed;
}

.buzzer-buzzed {
  background-color: #0f766e;
  color: #fff;
  cursor: default;
}

/* Stops the whole page bouncing when a thumb lands hard on the button. */
html,
body {
  overscroll-behavior: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
