html,
body {
  font-family: var(--sc-font-family);
  margin: 0;
  padding: 0;
}

.main-loader {
  display: flex;
  justify-content: center;
  position: absolute;
  top: calc(50% - 10rem);
  width: 100%;

  /*
  text-align: center;
  color: #999;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  */
}

/*
.main-loader label::before {
  content: 'Loading…';
}

:lang(zh) .main-loader label::before,
:lang(zh-CN) .main-loader label::before {
  content: '正在装载系统…';
}
*/

.main-loader > .loader > .inner {
  animation: loading-bar 3s forwards;
  animation-direction: normal;
  background-color: var(--sc-color-text-brand);
  height: 0.25rem;
  transform: translateZ(0);
  transform-origin: top left;
  width: 1%;
}

.main-loader.secondary > .loader > .inner {
  animation: loading-bar-secondary 3s forwards;
}

.main-loader > .loader {
  /* stylelint-disable-next-line color-function-notation */
  background-color: rgba(255, 255, 255, 10%);
  height: 0.25rem;
  max-width: 40rem;
  width: 50%;
}

/* stylelint-disable-next-line selector-attribute-name-disallowed-list */
[data-display-theme='light'] .main-loader > .loader {
  /* stylelint-disable-next-line color-function-notation */
  background-color: rgba(0, 0, 0, 5%);
}

@keyframes loading-bar {
  0% {
    transform: scale(1, 1);
  }

  25% {
    transform: scale(45, 1);
  }

  75% {
    transform: scale(50, 1);
  }

  100% {
    transform: scale(60, 1);
  }
}

@keyframes loading-bar-secondary {
  0% {
    transform: scale(60, 1);
  }

  20% {
    transform: scale(85, 1);
  }

  50% {
    transform: scale(90, 1);
  }

  100% {
    transform: scale(100, 1);
  }
}
