/**
 * Ripped and slightly modified from https://cssloaders.github.io
 **/

.loader {
  --color-1: var(--fore-1);
  --color-2: var(--accent);
  --size: 1px;

  width: calc(48 * var(--size));
  height: calc(48 * var(--size));
  display: block;
  margin: calc(15 * var(--size)) auto;
  position: relative;
  color: var(--color-1);
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

.loader::after,
.loader::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  width: calc(24 * var(--size));
  height: calc(24 * var(--size));
  top: 50%;
  left: 50%;
  transform: scale(0.5) translate(0, 0);
  background-color: var(--color-1);
  border-radius: 50%;
  animation: animloader 1s infinite ease-in-out;
}

.loader::before {
  background-color: var(--color-2);
  transform: scale(0.5) translate(calc(-48 * var(--size)), calc(-48 * var(--size)));
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes animloader {
  50% {
    transform: scale(1) translate(-50%, -50%);
  }
}