/* Shared WO爱家 loading motion for portal boot, menu refresh and authentication. */
body.app-loading-active { overflow: hidden; }
.app-loading {
  box-sizing: border-box;
  position: fixed;
  inset: 0 auto 0 50%;
  z-index: 30000;
  display: grid;
  place-items: center;
  width: min(100%, 448px);
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--canvas, #f4f6f8);
  color: var(--text, #0b2e3a);
  opacity: 1;
  visibility: visible;
  transition: opacity .24s ease, visibility 0s linear .24s;
}
.app-loading.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.app-loading[hidden] { display: none; }
.app-loading__content { display: grid; justify-items: center; width: min(100%, 320px); text-align: center; }
.app-loading__brand { margin-top: 24px; font-size: 22px; line-height: 30px; font-weight: 800; }
.app-loading__title { margin-top: 8px; color: var(--secondary, #536970); font-size: 14px; line-height: 22px; font-weight: 600; }
.app-loading__detail { margin-top: 3px; color: var(--muted, #7b8f95); font-size: 12px; line-height: 20px; }

.vi-loader { display: grid; place-items: center; width: 120px; max-width: 100%; aspect-ratio: 280 / 260; }
.vi-loader-animation { display: block; width: 100%; height: 100%; object-fit: contain; }
.vi-loader--large { width: 196px; }

.state-block.is-loading, .admin-state.is-loading { justify-content: center; }
.state-block.is-loading > .vi-loader, .admin-state.is-loading > .vi-loader { margin: 0 auto 10px; animation: none; }
.state-block.is-loading strong, .admin-state.is-loading strong { margin-top: 0; }

.auth-captcha-image[aria-busy="true"] #captcha-placeholder,
.login-submit[aria-busy="true"] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-captcha-image[aria-busy="true"] #captcha-placeholder::before,
.login-submit[aria-busy="true"]::before {
  content: "";
  box-sizing: border-box;
  width: 26px;
  height: 24px;
  flex: 0 0 26px;
  background: url('/assets/brand/woaijia-loader-v2-a-home.svg?v=1.0.5.5&rev=2') center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  .app-loading { transition: none; }
}
