/* Overlay khóa màn khi tạo ảnh/video — Android-style spinner */
.app-generation-lock {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: all;
  cursor: wait;
  padding: 16px;
}

.app-generation-lock.is-visible {
  display: flex;
}

.app-generation-lock-panel {
  min-width: 180px;
  max-width: min(320px, 92vw);
  padding: 22px 20px 18px;
  border-radius: 14px;
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.app-generation-lock-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3.5px solid rgba(167, 139, 250, 0.28);
  border-top-color: #a78bfa;
  animation: app-generation-spin 0.75s linear infinite;
}

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

.app-generation-lock-text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
}

.app-generation-lock-hint {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

html.app-generation-locked,
html.app-generation-locked body {
  overflow: hidden !important;
}

/* Light mode panel */
html:not(.app-dark) .app-generation-lock-panel {
  background: #ffffff;
  border-color: #e5e7eb;
}

html:not(.app-dark) .app-generation-lock-text {
  color: #111827;
}

html:not(.app-dark) .app-generation-lock-hint {
  color: #6b7280;
}

html:not(.app-dark) .app-generation-lock-spinner {
  border-color: rgba(124, 58, 237, 0.25);
  border-top-color: #7c3aed;
}
