/* Shared by the pre-Vue startup screen and Element Plus fullscreen masks. */

.admin-loading,
.el-loading-mask.is-fullscreen {
  background: rgba(232, 242, 255, 0.6) !important;
  background-image: radial-gradient(
    ellipse at center,
    rgba(229, 240, 255, 0.6) 0%,
    rgba(234, 243, 255, 0.6) 100%
  ) !important;
  backdrop-filter: none;
}
.admin-loading {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
}

.admin-loading .admin-loading-content,
.el-loading-mask.is-fullscreen .el-loading-spinner {
  --loading-art-width: min(512px, 72vw, 65vh);
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, 92vw);
  margin: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.admin-loading-content::before,
.el-loading-mask.is-fullscreen .el-loading-spinner::before {
  content: '';
  order: 0;
  display: block;
  width: var(--loading-art-width);
  aspect-ratio: 512 / 305;
  flex-shrink: 0;
  background: url('./service-repair.webp') center / contain no-repeat;
}

.admin-loading-content::after,
.el-loading-mask.is-fullscreen .el-loading-spinner::after {
  content: '';
  order: 1;
  width: 13px;
  height: 13px;
  margin: 18px 0 24px;
  border-radius: 50%;
  background: #74a7f3;
  box-shadow: -29px 0 #74a7f3, 29px 0 #c2d9fa;
  animation: admin-loading-dots 1.4s ease-in-out infinite;
}

.admin-loading .admin-loading-text,
.el-loading-mask.is-fullscreen .el-loading-spinner .el-loading-text {
  order: 2;
  margin: 0;
  padding: 0 16px;
  color: #8d98aa;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: clamp(14px, 1.65vw, 16px);
  /* font-weight: 500; */
  line-height: 1.6;
  letter-spacing: 0.02em;
}

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

@keyframes admin-loading-dots {
  0%, 100% { background: #c2d9fa; box-shadow: -29px 0 #74a7f3, 29px 0 #c2d9fa; }
  33% { background: #74a7f3; box-shadow: -29px 0 #a5c7f8, 29px 0 #c2d9fa; }
  66% { background: #a5c7f8; box-shadow: -29px 0 #c2d9fa, 29px 0 #74a7f3; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-loading-content::after,
  .el-loading-mask.is-fullscreen .el-loading-spinner::after { animation: none; }
}
