/* Loading icon: an open ring in the headline colours that turns while something is busy
   (subscribing now; later checkout and downloads). Use js/lib/spinner.js.
   The size follows the font size of the element it sits in. */

.spinner {
  display: inline-block;
  width: 1.15em;
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gradient-spinner);
  /* Keep only a thin ring: everything inside the circle is cut away. */
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: spinner-turn 800ms linear infinite; /* a spinner turns at one steady speed */
}

@keyframes spinner-turn {
  to {
    transform: rotate(1turn);
  }
}

/* A button that is busy shows only the spinner, at the same size as before. */
.is-busy {
  display: inline-grid;
  place-items: center;
  cursor: progress;
}

.is-busy > .spinner {
  grid-area: 1 / 1;
}

.is-busy > .busy-label {
  grid-area: 1 / 1;
  visibility: hidden;
}
