/* Comes down from the top as the page is pulled, in the app added to the home screen, and spins while it loads again */
.pull-refresh {
  position: fixed;
  top: calc(env(safe-area-inset-top) + var(--space-2));
  left: 50%;
  z-index: 3000;

  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -1.25rem;

  background-color: var(--card-bg-color);
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--drop-shadow-color);
  pointer-events: none;

  opacity: var(--pull, 0);
  transform: translateY(calc((var(--pull, 0) - 1) * 3rem)) rotate(calc(var(--pull, 0) * 270deg));

  &.ready {
    color: var(--focus-color);
  }

  &.refreshing {
    opacity: 1;
    transform: none;

    .icon {
      animation: spin 0.8s linear infinite;
    }
  }

  .icon {
    display: flex;
  }
}
