:root {
  --q-loading-color: #167b74;
  --q-loading-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill-rule='evenodd' d='M30 4C14.5 4 4 15.1 4 30.5S14.5 57 30 57s26-11.1 26-26.5S45.5 4 30 4Zm0 12c8.8 0 14 6 14 14.5S38.8 45 30 45s-14-6-14-14.5S21.2 16 30 16Z'/%3E%3Cpath d='M34 36h13l15 25H49Z'/%3E%3C/svg%3E");
}

.q-loading {
  --q-loading-size: 48px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: var(--q-loading-size);
  height: var(--q-loading-size);
  color: var(--q-loading-color);
  vertical-align: middle;
}

.q-loading--large {
  --q-loading-size: 76px;
}

/* Also covers Element UI buttons, inline indicators and theme loading icons. */
html .el-icon-loading {
  --q-loading-size: 1em;
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -0.12em;
  animation: none !important;
}

.q-loading::before,
.q-loading::after,
html .el-icon-loading::before,
html .el-icon-loading::after,
.el-loading-mask .el-loading-spinner::before,
.el-loading-mask .el-loading-spinner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: var(--q-loading-size);
  height: var(--q-loading-size);
  background-color: currentColor;
  -webkit-mask: var(--q-loading-mask) center / contain no-repeat;
  mask: var(--q-loading-mask) center / contain no-repeat;
  pointer-events: none;
}

.q-loading::before,
html .el-icon-loading::before,
.el-loading-mask .el-loading-spinner::before {
  opacity: 0.2;
}

.q-loading::after,
html .el-icon-loading::after,
.el-loading-mask .el-loading-spinner::after {
  background-image: linear-gradient(to top, transparent 15%, rgba(255, 255, 255, 0.32));
  clip-path: inset(100% 0 0);
  animation: q-loading-fill 2.4s ease-in-out infinite;
}

/* Keep every v-loading / Loading.service mask and its original hint text. */
.el-loading-mask .el-loading-spinner {
  --q-loading-size: 48px;
  margin-top: 0 !important;
  padding-top: var(--q-loading-size);
  color: var(--q-loading-color);
  transform: translateY(-50%);
}

.el-loading-mask.is-fullscreen .el-loading-spinner {
  --q-loading-size: 76px;
}

.el-loading-mask .el-loading-spinner::before,
.el-loading-mask .el-loading-spinner::after {
  left: 50%;
  margin-left: calc(var(--q-loading-size) / -2);
}

.el-loading-mask .el-loading-spinner > .circular,
.el-loading-mask .el-loading-spinner > i {
  display: none !important;
}

.el-loading-mask .el-loading-spinner .el-loading-text {
  margin-top: 10px;
}

/* NProgress still owns the route start/end lifecycle; only its visual changes. */
#nprogress .bar {
  display: none;
}

#nprogress .q-route-loading {
  position: fixed;
  z-index: 1031;
  top: 18px;
  right: 24px;
  padding: 10px;
  border: 1px solid rgba(22, 123, 116, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(22, 123, 116, 0.1);
  line-height: 0;
  pointer-events: none;
}

#nprogress .q-route-loading .q-loading {
  --q-loading-size: 36px;
}

.q-loading-startup {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #f7f8fa;
  color: #626c78;
  font: 15px/1.5 "Microsoft YaHei", "Segoe UI", sans-serif;
}

@keyframes q-loading-fill {
  0%, 6% { clip-path: inset(100% 0 0); }
  88%, 100% { clip-path: inset(0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .q-loading::after,
  html .el-icon-loading::after,
  .el-loading-mask .el-loading-spinner::after {
    animation: none;
    clip-path: inset(25% 0 0);
  }
}
