/* https://codepen.io/alanshortis/pen/eJLVXr */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.root {
  display: inline-block;
  position: relative;
  overflow: hidden;
  color: var(--color-outline);
}

.root::before,
.root::after {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: var(--border-width) solid currentColor;
}

.root::before {
  opacity: 0.3;
}

.root::after {
  border: solid transparent;
  border-top-color: currentColor;
  animation: spin 0.85s infinite linear;
}

/** Size modifiers */
.small {
  --border-width: 2px;
  width: var(--space-small);
  height: var(--space-small);
}

.medium {
  --border-width: 3px;
  width: var(--space-medium);
  height: var(--space-medium);
}

.large {
  --border-width: 4px;
  width: var(--space-large);
  height: var(--space-large);
}
