/* shared/uv-publish.css
 * Full-screen feedback overlay for the editor Publish flow.
 * Owners need a clear, immediate signal that something is happening when
 * they tap Publish — a tiny status string in the toolbar is invisible on
 * mobile. This overlay covers the editor with a spinner, a clear message,
 * and a CTA when the action lands somewhere (Stripe / dashboard).
 */

.uv-publish-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 32, 0.62);
  backdrop-filter: saturate(140%) blur(4px);
  -webkit-backdrop-filter: saturate(140%) blur(4px);
  padding: 24px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  animation: uvPubFadeIn 180ms ease-out both;
}

@keyframes uvPubFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.uv-publish-overlay__card {
  width: min(420px, 100%);
  background: #fff;
  color: #1a1f29;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  text-align: center;
  animation: uvPubRise 240ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes uvPubRise {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.uv-publish-overlay__spinner {
  width: 44px;
  height: 44px;
  margin: 4px auto 18px;
  border-radius: 50%;
  border: 3px solid rgba(20, 24, 32, 0.12);
  border-top-color: #2f7d4f;
  animation: uvPubSpin 0.85s linear infinite;
}

@keyframes uvPubSpin {
  to { transform: rotate(360deg); }
}

.uv-publish-overlay__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e8f5ee;
  color: #2f7d4f;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uv-publish-overlay__icon svg { width: 28px; height: 28px; }

.uv-publish-overlay__icon--error {
  background: #fbe9e7;
  color: #b3261e;
}

.uv-publish-overlay__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.uv-publish-overlay__msg {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5364;
}

.uv-publish-overlay__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.uv-publish-overlay__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.uv-publish-overlay__btn--primary {
  background: #2f7d4f;
  color: #fff;
}
.uv-publish-overlay__btn--primary:hover { background: #266a42; }
.uv-publish-overlay__btn--ghost {
  background: transparent;
  color: #4a5364;
  border: 1px solid #d8dde5;
}
.uv-publish-overlay__btn--ghost:hover { background: #f5f7fa; }

.uv-publish-overlay__sub {
  font-size: 12px;
  color: #6c7689;
  margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .uv-publish-overlay,
  .uv-publish-overlay__card { animation: none; }
  .uv-publish-overlay__spinner { animation-duration: 1.6s; }
}
