.small-loader,
.small-loader * {
  box-sizing: border-box;
}

.small-loader {
  position: absolute;
  z-index: 100;
  left: 50%;
  margin-left: calc(15px * -2);
  width: calc(15px * 4);
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;

  &.right {
    left: auto;
    right: 15px;
    margin-left: 0;
  }

  &.left {
    left: 15px;
    right: auto;
    margin-left: 0;
  }
}

.small-loader .rhombus {
  position: absolute;
  left: calc(15px * 4);
  width: 15px;
  height: 15px;
  margin: 0 auto;
  background-color: $primary;
  border-radius: 2px;
  transform: translateY(0) rotate(45deg) scale(0);
  animation: looping-rhombuses-spinner-animation 2500ms linear infinite;
}

.small-loader .rhombus:nth-child(1) {
  animation-delay: calc(2500ms * 1 / -1.5);
}

.small-loader .rhombus:nth-child(2) {
  animation-delay: calc(2500ms * 2 / -1.5);
}

.small-loader .rhombus:nth-child(3) {
  animation-delay: calc(2500ms * 3 / -1.5);
}

@keyframes looping-rhombuses-spinner-animation {
  0% {
    transform: translateX(0) rotate(45deg) scale(0);
  }

  50% {
    transform: translateX(-233%) rotate(45deg) scale(1);
  }

  100% {
    transform: translateX(-466%) rotate(45deg) scale(0);
  }
}
