/* The progress screen's showcase (progress_panel.html, app-status-showcase.js): the checklist, each photo as it is
   handled, the latest few in a strip, running counters and the places found. */
/* minmax(0, 1fr) and min-width: 0: an implicit track grows to its longest unwrapped place name, and the whole showcase
   ran off the right of a phone's screen. */
.showcase { margin: 22px 0 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.showcase > * { min-width: 0; }
.showcase[hidden] { display: none; }

.showcase-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.showcase-steps li { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.showcase-steps li::before { content: ""; width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
/* A step still to come: plainly pending, and still easy to read on a phone, not a shade too faint. */
.showcase-steps li:not(.done):not(.current) { color: color-mix(in srgb, var(--muted) 65%, var(--ink-dim)); }
.showcase-steps li.done { color: var(--ink-dim); }
.showcase-steps li.done::before { background: var(--gold); border-color: var(--gold); }
.showcase-steps li.current { color: var(--ink); font-weight: 600; }
.showcase-step-percent { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
/* "Now: ..." under the current step: its own grid row, lined up with the step's name. */
.showcase-step-now { grid-column: 2; font-size: .78rem; font-weight: 400; color: var(--ink-dim); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-step-now::before { content: "Now: "; color: var(--muted); }
/* Step 2's parts (photos, captions, places), each with its own percent and bar, under the step's name and above "Now". */
.showcase-step-tasks { grid-column: 2; margin: 4px 0 2px; display: grid; gap: 5px; font-weight: 400; min-width: 0; }
.showcase-step-tasks div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 3px; min-width: 0; }
.showcase-step-tasks dt { font-size: .8rem; color: var(--ink-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-step-tasks dd { margin: 0; font-size: .8rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.showcase-task-bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.showcase-task-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .6s ease; }
.showcase-steps li.current::before { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(240, 177, 85, .18); animation: showcase-pulse 1.6s ease-in-out infinite; }

/* The photo being handled: about twice a strip thumbnail (two of its columns and the gap between), with what is known
   about it right under it, one unit (a full-width photo is much too big; a caption beside it leaves
   awkward space around a long place name). */
.showcase-stage { --frame: calc((100% - 30px) / 3 + 6px); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 6px; }
.showcase-stage .showcase-frame { width: var(--frame); }
.showcase-stage-label { margin: 0; }   /* "Currently processing": the photo is the build's own, not an album preview */
.showcase-stage[hidden] { display: none; }
.showcase-frame { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.showcase-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .6s ease, transform 2.4s ease-out; }
.showcase-photo.on { opacity: 1; transform: scale(1); }
.showcase-caption { margin: 0; min-width: 0; font-size: .82rem; line-height: 1.45; color: var(--ink-dim); overflow-wrap: break-word; }
.showcase-caption:empty { display: none; }

.showcase-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.showcase-strip li { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); min-width: 0; animation: showcase-in .4s ease-out; }
.showcase-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

.showcase-facts[hidden] { display: none; }
.showcase-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 104px), 1fr)); gap: 8px; }
.showcase-facts div { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: showcase-in .4s ease-out; }
/* A label wraps onto a second line rather than being cut off ("Without a loc..."). */
.showcase-facts dt { font-size: .72rem; line-height: 1.3; color: var(--muted); overflow-wrap: break-word; hyphens: auto; }
.showcase-facts dd { margin: 2px 0 0; font-family: "Fraunces", Georgia, serif; font-size: 1.55rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* "More details": the counters not among the few that matter at this step (data-folded, app-status-showcase.js) are hidden
   on a phone until it is opened, and shown on a wide screen, where there is room and no button. */
.showcase-facts-more { display: block; min-height: 44px; margin: -6px 0 0; padding: 8px 4px; border: 0; background: none;
  color: var(--accent); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.showcase-facts-more[hidden] { display: none; }
@media (max-width: 719px) {
  .showcase:not(.facts-open) [data-folded] { display: none; }
}
@media (min-width: 720px) {
  .showcase-facts-more { display: none; }
}

/* A group's small muted label: "Album analysis", "Your film", "Places found in your photos". */
.showcase-label { margin: 0 0 -8px; font-size: .78rem; font-weight: 600; color: var(--muted); }
/* Every place, in a box of about four rows that scrolls on its own (a long list is a bit much). */
.showcase-places { list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px;
  max-height: 136px; overflow-y: auto; overscroll-behavior: contain; }
.showcase-places li { max-width: 100%; padding: 5px 11px; border-radius: var(--r-pill); font-size: .8rem; color: var(--ink-dim);
  background: rgba(141, 123, 245, .12); border: 1px solid rgba(141, 123, 245, .3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  animation: showcase-in .4s ease-out; }
.showcase-places li::before { content: "\1F4CD\FE0E  "; }

@keyframes showcase-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes showcase-pulse { 50% { box-shadow: 0 0 0 7px rgba(240, 177, 85, .06); } }
@media (prefers-reduced-motion: reduce) {
  .showcase-photo { transition: none; transform: none; }
  .showcase-strip li, .showcase-facts div, .showcase-places li, .showcase-steps li.current::before { animation: none; }
  .showcase-task-bar i { transition: none; }
}
.showcase-strip li:nth-child(n + 7) { display: none; }   /* one row on a phone... */
@media (min-width: 720px) {
  .showcase-strip { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .showcase-strip li:nth-child(n + 7) { display: block; }   /* ...eight on a wider screen */
  .showcase-stage { --frame: calc((100% - 42px) / 4 + 6px); }   /* still two strip columns wide */
}

/* The page-wide progress bar (app-status.js showPageProgress()): a hairline across the top of the screen while a film
   is being made, on every screen. */
#page-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none;
  background: rgba(var(--wash-rgb), .06); }
#page-progress[hidden] { display: none; }
#page-progress span { display: block; height: 100%; width: 0; border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--gold), var(--violet)); box-shadow: 0 0 10px rgba(240, 177, 85, .55);
  transition: width .6s ease; }
@media (prefers-reduced-motion: reduce) { #page-progress span { transition: none; } }

/* The activity list (app-status-activity.js): a fold a step, the one at work open; a line a photo, opened by a tap. */
.showcase-activity { display: grid; gap: 8px; margin: 16px 0 0; }
.showcase-activity[hidden] { display: none; }
.activity-step { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--wash-rgb), .02); }
.activity-step > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px;
  position: relative; padding: 6px 14px 6px 30px; cursor: pointer; list-style: none; font-weight: 700; }
.activity-step > summary::-webkit-details-marker { display: none; }
.activity-step > summary::before { content: "›"; position: absolute; left: 13px; transition: transform .15s ease; }
.activity-step[open] > summary::before { transform: rotate(90deg); }
.activity-name { min-width: 0; overflow-wrap: anywhere; }
.activity-count { color: var(--muted); font-weight: 600; font-size: .85rem; }
.activity-step.done .activity-name::after { content: " ✓"; color: var(--accent); }
.activity-step.current { border-color: var(--accent); }
.activity-step.current .activity-count::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px;
  border-radius: 50%; background: var(--gold); animation: activity-pulse 1.2s ease-in-out infinite; }
@keyframes activity-pulse { 50% { opacity: .25; } }
.activity-items { list-style: none; margin: 0; padding: 0 8px 8px; max-height: 320px; overflow-y: auto; display: grid; gap: 2px; }
.activity-row { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 44px;
  padding: 2px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem;
  text-align: left; cursor: pointer; }
.activity-row:hover, .activity-row[aria-expanded="true"] { background: var(--surface-hover); }
.activity-row:focus { outline: none; }
.activity-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.activity-step > summary { color: var(--ink); }
.activity-item:last-child .activity-row { animation: activity-in .4s ease-out; }
@keyframes activity-in { from { opacity: 0; transform: translateY(6px); } }
.activity-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.activity-what { min-width: 0; overflow-wrap: anywhere; }
.activity-more { display: grid; gap: 6px; padding: 4px 6px 10px 56px; }
.activity-more[hidden] { display: none; }
.activity-large { width: min(100%, 260px); border-radius: 10px; }
.activity-more p { margin: 0; color: var(--ink-dim); font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .activity-item:last-child .activity-row, .activity-step.current .activity-count::before { animation: none; } }
