/* TROIKA.RUN (window.css): the bar under the canvas: the obstacle ahead on
   the left, the keys on the right, in the style of the status bar */
.troika-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.3em 1.2em;
  min-height: 1.8em;
  padding: 0.3em 0.8em;
  color: var(--haze);
  border-top: 1px solid var(--rib);
}
/* The obstacle ahead takes the room left by the keys; text wider than
   that scrolls to its end and back (hud.js sets --shift and --time), or
   with motion reduced ends in an ellipsis */
.troika-ahead {
  flex: 1 1 10em;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html[data-motion="full"] .troika-ahead {
  text-overflow: clip;
}
html[data-motion="full"] .troika-ahead span {
  display: inline-block;
}
html[data-motion="full"] .troika-ahead span.scroll {
  animation: troika-scroll var(--time, 4s) ease-in-out infinite alternate;
}
@keyframes troika-scroll {
  0%, 20% { transform: none; }
  80%, 100% { transform: translateX(var(--shift, 0)); }
}
/* The controls stay on one row; window.js lowers --keys-scale when the row
   is wider than the window */
.troika-keys {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4em;
  color: var(--dust);
  font-size: calc(0.9em * var(--keys-scale, 1));
  text-transform: uppercase;
  white-space: nowrap;
}
/* Each control in its own box: the keys, then what they do */
.troika-key {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.5em 0.15em 0.25em;
  border: 1px solid var(--rib);
  background: rgba(10, 12, 13, 0.35);
}
.troika-key kbd {
  font: inherit;
  padding: 0 0.4em;
  color: var(--haze);
  border: 1px solid var(--rib);
  border-bottom-width: 2px;
}
