.loader {
  z-index: 10000;
  position: fixed;
  top: 0;
  right: 0;
  height: 300px;
  background: #2980B9;
  transition: transform 0.3s;
  transform: translateX(100%) translateY(-100%) rotate(45deg);

  &.loader-active {
    transform: translateX(50%) translateY(-50%) rotate(45deg) !important;
  }

  &::before, &::after {
    position: absolute;
    bottom: 30px;
    left: 50%;
    display: block;
    border: 5px solid #fff;
    border-radius: 50%;
    content: "";
  }

  &::before {
    margin-left: -40px;
    width: 80px;
    height: 80px;
    border-right-color: darken(#2980B9, 5%);
    border-left-color: darken(#2980B9, 5%);
    animation: rotation 3s linear infinite;
  }

  &::after {
    bottom: 50px;
    margin-left: -20px;
    width: 40px;
    height: 40px;
    border-top-color: darken(#2980B9, 5%);
    border-bottom-color: darken(#2980B9, 5%);
    animation: rotation 1s linear infinite;
  }
}

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

  50% {
    transform: rotate(180deg);
  }

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