/* Corre, Flávio!: the runner page. Everything else comes from css/game.css; this adds the news crawl. */

/* Breaking-news crawl along the bottom while running, like a TV news channel */
.r-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 14;
  display: none;
  align-items: stretch;
  height: 26px;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
  background: #f6f1e7;
  color: #17140f;
  border-top: 3px solid #b3261e;
  font: 600 13px/26px var(--body);
  pointer-events: none;
}
body.is-playing .r-ticker { display: flex; }
.r-ticker b {
  flex: none;
  padding: 0 10px;
  background: #b3261e;
  color: #fff;
  font: 9px/26px var(--pixel);
  letter-spacing: 0.04em;
}
.r-ticker__win { position: relative; flex: 1; overflow: hidden; }
.r-ticker__track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  white-space: nowrap;
  animation: r-crawl 70s linear infinite;
}
.r-ticker__track span { padding-right: 40px; }
.r-ticker__track i { padding: 0 16px; font-style: normal; color: #b3261e; }
body.is-paused .r-ticker__track { animation-play-state: paused; }
@keyframes r-crawl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* No crawl for readers who asked for less motion: the first headline stays put */
body.is-still .r-ticker__track { animation: none; }

/* The runner is at the bottom of the screen, so real-life facts drop in from the top, under the score */
body.runner .g-toast {
  top: calc(max(8px, env(safe-area-inset-top)) + 54px);
  bottom: auto;
  transform: translate(-50%, -30px);
}
body.runner .g-toast.is-on { transform: translate(-50%, 0); }
@media (max-width: 520px) {
  body.runner .g-toast { top: calc(max(8px, env(safe-area-inset-top)) + 96px); }
}

@media (max-height: 520px) {
  .r-ticker { height: 22px; font-size: 12px; line-height: 22px; }
  .r-ticker b { line-height: 22px; }
}
