#custom-loader {
  height: 100%;
  display: flex;
  position: fixed;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 99999999;
  background: #fff;
}
#custom-loader .loader {
  animation: rotate 1s infinite;
  height: 50px;
  width: 50px;
}
#custom-loader .loader:before,
#custom-loader .loader:after {
  border-radius: 50%;
  content: "";
  display: block;
  height: 20px;
  width: 20px;
}
#custom-loader .loader:before {
  animation: ball1 1s infinite;
  background-color: #161e31;
  box-shadow: 30px 0 0 #2b9fb8;
  margin-bottom: 10px;
}
#custom-loader .loader:after {
  animation: ball2 1s infinite;
  background-color: #2b9fb8;
  box-shadow: 30px 0 0 #161e31;
}
@keyframes rotate {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  50% {
    transform: rotate(360deg) scale(1.2);
  }
  100% {
    transform: rotate(720deg) scale(0.8);
  }
}
@keyframes ball1 {
  0% {
    box-shadow: 30px 0 0 #2b9fb8;
  }
  50% {
    box-shadow: 0 0 0 #2b9fb8;
    margin-bottom: 0;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #2b9fb8;
    margin-bottom: 10px;
  }
}
@keyframes ball2 {
  0% {
    box-shadow: 30px 0 0 #161e31;
  }
  50% {
    box-shadow: 0 0 0 #161e31;
    margin-top: -20px;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #161e31;
    margin-top: 0;
  }
}

@keyframes ball2-dark {
  0% {
    box-shadow: 30px 0 0 #fff;
  }
  50% {
    box-shadow: 0 0 0 #fff;
    margin-top: -20px;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #fff;
    margin-top: 0;
  }
}
.dark-layout #custom-loader {
  background-color: #161e31;
}
.dark-layout #custom-loader .loader:before {
  background-color: #fff;
}
.dark-layout #custom-loader .loader:after {
  animation: ball2-dark 1s infinite;
  box-shadow: 30px 0 0 #fff;
}
