/* GpuSwitchPanel: the quality section at the top of a statistics panel. */
.gpu-switch {
  min-width: 28ch;
}

.gpu-switch-fps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: baseline;
}

.gpu-switch-fps-value {
  font-size: var(--font-size-lg);
}

/* Two runs side by side, ruled off above and below. The status carries
   the gaps to both rules, so the divider between the runs reaches them.
   Items centre in the min-height (the divider stretches on its own). */
.gpu-switch-status {
  display: flex;
  align-items: center;
  gap: 1ch;
  min-height: 1.4em;
  margin-top: var(--space-1);
  border-top: 1px solid var(--overlay-white-25);
  padding: var(--space-1) 0;
}

.gpu-switch-divider {
  align-self: stretch;
  margin: calc(-1 * var(--space-1)) 0; /* through the padding, rule to rule */
  border-left: 1px solid var(--overlay-white-25);
}

/* A run: w1, w2, decision, w3 (or the wait), mark. Natural widths, but
   the slot itself is fixed so the divider between the two never moves. */
.gpu-switch-run {
  display: inline-flex;
  gap: 1ch;
  min-width: 14ch;
  white-space: nowrap;
}

.gpu-switch-run > span:empty {
  display: none;
}

.gpu-switch-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gpu-switch-row {
  display: grid;
  grid-template-columns: 1em 1fr;
  /* One character, like the space it stands in for: the rows read as a
     line of text, not as two columns held apart. */
  gap: 1ch;
}

/* Switches this device does not have. */
.gpu-switch-row.skip {
  color: var(--overlay-white-50);
}

/* Switches tried and declined: they bought too little, so they stay on. */
.gpu-switch-row.declined > .gpu-switch-label {
  text-decoration: line-through;
}

.gpu-switch-mark {
  text-align: center;
}

/* The window being collected. */
.gpu-switch-spinner {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border: 2px solid var(--overlay-white-50);
  border-top-color: var(--color-text);
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: spin 0.75s linear infinite;
}
