/* /create/preview — Step 3 styles */

.preview-state {
  background: #fff;
  border-radius: 18px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(15, 30, 60, 0.06);
}

.preview-state h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #111;
  margin-bottom: 8px;
}

.preview-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Pending state — Lensa-style scanning treatment over a big version of the
   customer's own photo. The horizontal scan line + dim mask underneath
   give "something is happening to your image" energy while Gemini chews. */
.preview-scan-wrap {
  position: relative;
  max-width: 520px;
  margin: 8px auto 24px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  background: #111;  /* peeks through while img loads */
  aspect-ratio: 4 / 3;
}
#preview-original {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The bright sweep line that scans top→bottom across the photo. */
.preview-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  top: -18%;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0)   0%,
    rgba(135,206,250,.35) 45%,
    rgba(255,255,255,.85) 50%,
    rgba(135,206,250,.35) 55%,
    rgba(255,255,255,0)   100%);
  mix-blend-mode: screen;
  animation: preview-scan 2.6s cubic-bezier(.4,0,.4,1) infinite;
  pointer-events: none;
}
@keyframes preview-scan {
  0%   { top: -18%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Faint scan-grid overlay — "AI is analysing" texture. */
.preview-scan-mask {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,.05) 0px,
      rgba(255,255,255,.05) 1px,
      transparent 1px,
      transparent 4px);
  pointer-events: none;
}

/* Asymptotic progress bar — fast to ~60% in 20s, slow crawl to ~90% by 60s,
   snaps to 100% on done. The fill is wired from preview.js. */
.preview-progress {
  max-width: 520px;
  margin: 0 auto 20px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  overflow: hidden;
}
.preview-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-blue), var(--c-purple));
  border-radius: 999px;
  transition: width .6s ease-out;
}

#preview-status-headline {
  transition: opacity .35s ease;
  min-height: 1.5em;
}

.preview-cancel { margin-top: 8px; }

.preview-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  text-align: left;
}
@media (max-width: 720px) {
  .preview-pair { grid-template-columns: 1fr; }
}
.preview-label {
  font-size: .82rem;
  font-weight: 800;
  color: var(--c-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.preview-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  background: #fff;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.regen-counter {
  font-size: .82rem;
  font-weight: 600;
  margin-left: 6px;
  color: var(--text-soft);
}

.preview-state--failed h2 { color: var(--c-red); }
