.inv-preview-loading,
.inv-preview-loading * {
  box-sizing: border-box;
}

.inv-preview-loading {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 20, 32, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.inv-preview-loading[hidden] {
  display: none;
}

.inv-preview-loading-card {
  width: min(100%, 430px);
  padding: clamp(28px, 7vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  background: #fffdfb;
  color: #172038;
  box-shadow: 0 28px 90px rgba(4, 10, 25, 0.32);
  text-align: center;
  font-family: Inter, Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.inv-preview-spinner {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border: 2px solid rgba(77, 100, 148, 0.16);
  border-top-color: #687fbd;
  border-radius: 50%;
  animation: inv-preview-spin 0.85s linear infinite;
}

.inv-preview-spinner::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(224, 121, 153, 0.16);
  border-bottom-color: #df7899;
  border-radius: inherit;
  animation: inv-preview-spin 1.15s linear infinite reverse;
}

.inv-preview-loading-card h2 {
  margin: 0 0 9px;
  font-size: clamp(23px, 6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.inv-preview-loading-card p {
  min-height: 3em;
  margin: 0;
  color: #626b7f;
  font-size: 14px;
  line-height: 1.55;
}

.inv-preview-progress {
  width: 100%;
  height: 7px;
  margin-top: 23px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf5;
}

.inv-preview-progress[hidden] {
  display: none;
}

.inv-preview-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #718aca, #da789c);
  transition: width 220ms ease;
}

.inv-preview-retry {
  min-height: 46px;
  margin-top: 22px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #172038;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.inv-preview-retry[hidden] {
  display: none;
}

@keyframes inv-preview-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .inv-preview-spinner,
  .inv-preview-spinner::after {
    animation: none;
  }

  .inv-preview-progress-bar {
    transition: none;
  }
}
