/* album.css | split from styles.css (cascade-preserving; see index.html link order) */
/* ── 19. Generating state ──────────────────────────────────────── */

.story-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 0;
}
.voice-polishing--simple { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.voice-polishing-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--coral-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coral);
  animation: pulse 1.4s ease-in-out infinite;
}
.voice-polishing-label { font-size: 14px; color: var(--muted); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.generating-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 263px);
  justify-content: center;
  gap: 20px;
  /* Gap to the completion-actions row is owned by step-inner's `gap: 20px`
     ([data-step="generating"] .step-inner) — adding a margin-bottom here
     would double-count. */
  margin-bottom: 0;
  width: 100%;
}
@media (max-width: 500px) {
  .generating-gallery {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    grid-auto-columns: auto;
    gap: 12px;
    width: 100%;
    max-width: none;
  }
}

/* Gallery cards (generated) */
.gallery-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-sm);
  animation: fadeUp 400ms ease both;
}
/* Stagger card entrances so they don't all pop in simultaneously */
.gallery-card:nth-child(2) { animation-delay: 60ms; }
.gallery-card:nth-child(3) { animation-delay: 120ms; }
.gallery-card:nth-child(4) { animation-delay: 180ms; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* Revealed gradient image fades in smoothly */
.gallery-card-img {
  animation: fadeIn 300ms ease both;
  width: 100%;
  aspect-ratio: 1/1;       /* square crop in grid; full 3:2 opens in detail overlay */
  object-fit: cover;
  object-position: center;
}

/* Retry-card variant — same square slot as a successful image
   (inherits 1:1 from .gallery-card-placeholder), but centered text + a
   single primary button. No box-in-box: the slot border IS the gallery
   card edge. */
.gallery-card-retry {
  background: linear-gradient(140deg, #eeebe8, #f7f4f2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  gap: 10px;
}
.gallery-card-retry .retry-msg {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  max-width: 220px;
}
.gallery-card-retry .retry-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: opacity 120ms ease;
}
.gallery-card-retry .retry-btn:hover { opacity: 0.85; }
.gallery-card-retry .retry-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.gallery-card-retry .retry-sub {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.01em;
}

/* Anonymous throttle overlay — full-screen modal shown when an
   anonymous user trips either the 60s cooldown or the 1/day per-IP
   cap. Two states (cooldown / daily_cap) share the same card; the
   primary CTA copy + countdown vary. */
.anon-throttle-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  animation: fadeIn 180ms ease both;
}
.anon-throttle-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 32px 32px 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: fadeIn 220ms ease both;
}
.anon-throttle-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.anon-throttle-close:hover { color: var(--ink); }
.anon-throttle-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  line-height: 1.25;
}
.anon-throttle-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 22px;
}
.anon-throttle-body strong { color: var(--ink); font-weight: 600; }
.anon-throttle-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anon-throttle-signin {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  background: var(--coral);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 120ms ease;
}
.anon-throttle-signin:hover { background: var(--coral-hover); }
.anon-throttle-retry {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line, #e9e6df);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 120ms ease;
}
.anon-throttle-retry:hover:not(:disabled) { background: #f7f4f2; }
.anon-throttle-retry:disabled { opacity: 0.45; cursor: not-allowed; }
.gallery-card-body { padding: 10px 18px 12px; }
.gallery-card-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}
.gallery-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── 21. Quick picks ───────────────────────────────────────────── */

/* Quick picks — lives inside .context-panel, below the WHAT row */
#quickPicks {
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#quickPicks[hidden] { display: none; }
/* Divider between Quick Picks and the WHERE row below it */
#quickPicks + .context-field { border-top: 1px solid var(--line); }

.quick-picks-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  margin: 0;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip, .quick-pick-chip {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--stone);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: all 120ms;
}
.chip:hover, .quick-pick-chip:hover {
  border-color: rgba(255,90,110,0.3);
  background: var(--coral-soft);
  color: var(--coral);
}
