$loader-animation-duration: 1.8s;

.loader-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  .loader {
    margin: 50px;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 10px;
    background: #38a4cd;
    border-radius: 5px;
    animation: load $loader-animation-duration ease-in-out infinite;

    &:before, &:after {
      position: absolute;
      display: block;
      content: "";
      animation: load $loader-animation-duration ease-in-out infinite;
      height: 10px;
      border-radius: 5px;
    }

    &:before {
      top: -20px;
      left: 10px;
      width: 40px;
      background: grey;
    }

    &:after {
      bottom: -20px;
      width: 35px;
      background: rgb(3, 32, 48);;
    }
  }
}

@keyframes load {
  0% {
    transform: translateX(40px);
  }

  50% {
    transform: translateX(-30px);
  }
  100% {
    transform: translateX(40px);
  }
}