<template>
  <Teleport to="body">
    <div class="app-modal-loading-backdrop" role="status" aria-live="polite">
      <section class="app-modal-loading-panel" aria-label="正在打开智能工作台">
        <span class="app-modal-loading-spinner" aria-hidden="true"></span>
        <div>
          <strong>正在打开智能工作台</strong>
          <p>基础页面已就绪，正在载入助手模块。</p>
        </div>
      </section>
    </div>
  </Teleport>
</template>

<style scoped>
.app-modal-loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(6px);
}

.app-modal-loading-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(420px, 100%);
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  color: #111827;
}

.app-modal-loading-panel strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.app-modal-loading-panel p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.app-modal-loading-spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 2px solid rgba(59, 130, 246, 0.18);
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: app-modal-loading-spin 0.8s linear infinite;
}

@keyframes app-modal-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-modal-loading-spinner {
    animation: none;
  }
}
</style>
