/* The label beside the unit under the pointer. It follows the unit, so it
   is moved with transform only, and it never takes a click. */
.readout {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-veil);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

.readout__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.readout__owner {
  color: var(--text-dim);
  font-size: var(--text-xs);
}

.readout__detail {
  color: var(--node);
}

/* How long the unit has left out. Still between ticks: it steps once a second. */
.readout__clock {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
}

.readout__clock[hidden] {
  display: none;
}

/* A clock face that empties clockwise from the top. --left is the share left. */
.readout__dial {
  --left: 1;
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: conic-gradient(transparent calc((1 - var(--left)) * 1turn), currentColor 0);
  box-shadow: inset 0 0 0 1px currentColor;
}

/* A guardian's lunge is told in the guardian's own color. */
.readout__hand[data-holds='lunge'] {
  color: var(--guardian);
}

/* Shots left take the color of the dashes around the unit. */
.readout__hand[data-holds='ammo'] {
  color: var(--ammo);
}
