.app-loader {
  --wf-accent-50: #e9f7f9;
  --wf-white: #ffffff;
  --wf-navy-blue: #014b7c;

  position: fixed;
  inset: 0;
  overflow: hidden;
  background-color: var(--wf-white);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.2s ease-in-out,
    visibility 0.2s ease-in-out;
}

.app-loader.app-loader--hidden {
  opacity: 0;
  visibility: hidden;
}

.app-loader .app-loader__main {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-loader .app-loader__main::before,
.app-loader .app-loader__main::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 300vw;
  height: 100vw;
  min-height: 100dvh;
  border-radius: 0 0 100% 100%;
  box-shadow: inset 0 -2px 10px 2px rgb(68 189 202 / 10%);
  z-index: -1;
}

.app-loader .app-loader__main::before {
  background-color: var(--wf-accent-50);
}

.app-loader .app-loader__main::after {
  background-image: url('assets/backgrounds/medical.png');
  background-size: 300px;
  opacity: 0.07;
}

.app-loader .app-loader__logo {
  width: 150px;
  margin-bottom: 25px;
}

.app-loader .app-loader__logo img {
  width: 100%;
}

.app-loader .app-loader__progress-bar {
  position: relative;
  width: 150px;
  height: 4px;
  background-color: var(--wf-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}

.app-loader .app-loader__progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 10px;
  animation:
    progress-bar-loader-motion 1s infinite linear,
    progress-bar-loader-background 3s infinite;
}

@keyframes progress-bar-loader-motion {
  0% {
    left: 0;
    width: 0;
  }

  20% {
    left: 0;
    width: 30%;
  }

  40% {
    left: 30%;
    width: 70%;
  }

  60% {
    left: 70%;
    width: 30%;
  }

  80% {
    left: 100%;
    width: 0;
  }

  100% {
    left: 100%;
    width: 0;
  }
}

@keyframes progress-bar-loader-background {
  0% {
    background: linear-gradient(90deg, rgb(124 209 218 / 50%) 0%, #7cd1da 100%);
  }

  33% {
    background: linear-gradient(90deg, rgb(124 209 218 / 50%) 0%, #7cd1da 100%);
  }

  34% {
    background: linear-gradient(90deg, rgb(239 192 43 / 50%) 0%, #efc02b 100%);
  }

  66% {
    background: linear-gradient(90deg, rgb(239 192 43 / 50%) 0%, #efc02b 100%);
  }

  67% {
    background: linear-gradient(90deg, rgb(39 102 144 / 50%) 0%, #276690 100%);
  }

  100% {
    background: linear-gradient(90deg, rgb(39 102 144 / 50%) 0%, #276690 100%);
  }
}

.app-loader .app-loader__footer {
  height: 160px;
  margin: 1rem;
  display: flex;
  align-items: end;
  justify-content: center;
}

.app-loader .app-loader__footer > img {
  height: 100%;
}
