/* Show landing pages (/show/<podcast-guid>), rendered by
 * functions/show/[guid].js. See docs/show-pages-spec.md.
 *
 * Reads its colors as custom properties off :root and defines none of its own,
 * the same contract as nav.css / footer.css — theme.css is the supply. Prefer
 * --brand / --ink / --surface here; the --cream / --navy / --orange aliases are
 * historical and mean something other than their names (see CLAUDE.md).
 *
 * The supporters wall is the visual descendant of localbitcoiners'
 * supporters.html (.sup-* class names carried over deliberately), minus its
 * absolute sat tiers — see the note in the Function.
 */

.show-main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.show-hero {
  margin: 1.75rem 0 2.5rem;
}

.show-hero-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.show-art img,
.show-art-blank {
  width: 148px;
  height: 148px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--cream-d);
}

.show-art-blank {
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.show-ident { min-width: 0; }

.show-eyebrow {
  margin: 0 0 0.2rem;
  font: 700 0.7rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-d);
}

.show-ident h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
  /* Show titles run long and arbitrary; wrap rather than overflow. */
  overflow-wrap: anywhere;
}

.show-sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.show-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.show-main .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.85rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.show-main .btn[hidden] { display: none; }

.show-main .btn-boost {
  background: var(--brand);
  color: #fff;
}
.show-main .btn-boost:hover { background: var(--brand-d); }

.show-main .btn-quiet {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}
.show-main .btn-quiet:hover { border-color: var(--brand); color: var(--brand-d); }

.show-main .btn-sm {
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
}

/* ── Stat row ─────────────────────────────────────────────────────────── */

.show-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.show-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.6rem;
  text-align: center;
}

.show-stat dd {
  margin: 0;
  font: 700 1.5rem/1.1 'Playfair Display', Georgia, serif;
  color: var(--brand-d);
}

.show-stat dt {
  order: 2;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* dt before dd in the DOM is the correct <dl> pairing; flex-column reverses
   the visual order so the number reads first. */
.show-stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
}

/* Caveat line under the stat cards. Quiet enough not to compete with the
   numbers, close enough that nobody reads them without it. */
.show-datanote {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.show-datanote a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.show-datanote a:hover { color: var(--brand-d); }

/* ── Sections ─────────────────────────────────────────────────────────── */

.show-section { margin-top: 2.75rem; }

/* A section with no heading of its own (the episode drawer — its summary
   already names it). Sits closer to what precedes it, since there's no
   heading to provide the separation. */
.show-section--bare { margin-top: 1.5rem; }

.show-section-head { margin-bottom: 1.1rem; }

.show-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--ink);
  margin: 0;
}

.show-count {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--cream-d);
  color: var(--brand-d);
  font: 600 0.72rem/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  vertical-align: middle;
}

.show-section-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.show-empty {
  color: var(--muted);
  font-style: italic;
  margin: 0.5rem 0 0;
}

/* ── Supporters ───────────────────────────────────────────────────────── */

.sup-podium,
.sup-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.sup-podium {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin-bottom: 1.1rem;
}

.sup-grid {
  grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr));
}

.sup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.9rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  position: relative;
  min-width: 0;
}
.sup-card[hidden] { display: none; }

.sup-card--podium {
  padding: 1.3rem 0.75rem;
  border-color: var(--brand);
  box-shadow: 0 2px 14px rgba(0, 175, 240, 0.13);
}

.sup-rank {
  position: absolute;
  top: 0.45rem;
  left: 0.55rem;
  font: 700 0.7rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
}
.sup-card--podium .sup-rank {
  color: var(--brand-d);
  font-size: 0.9rem;
}

.sup-avatar {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--cream-d);
  overflow: hidden;
  cursor: pointer;
  flex: none;
  display: block;
}
.sup-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sup-avatar.is-blank { background: var(--cream-d); }
.sup-avatar:hover { border-color: var(--brand); }
.sup-avatar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sup-card--podium .sup-avatar {
  width: 76px;
  height: 76px;
  border-color: var(--brand);
}

.sup-avatar--sm { width: 38px; height: 38px; border-width: 1px; }

.sup-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  /* Display names are arbitrary user input; clamp to two lines. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.sup-sats {
  font-size: 0.75rem;
  color: var(--muted);
}
.sup-card--podium .sup-sats {
  color: var(--brand-d);
  font-weight: 700;
  font-size: 0.86rem;
}

.show-more { margin-top: 1rem; }

/* ── Recent boosts ────────────────────────────────────────────────────── */

.boost-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.boost-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.boost-body { min-width: 0; flex: 1; }

.boost-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.85rem;
}

.boost-who { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.boost-amt { color: var(--brand-d); font-weight: 700; }
.boost-when { color: var(--muted); font-size: 0.78rem; margin-left: auto; }

.boost-msg {
  margin: 0.4rem 0 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.boost-target {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ── Episodes ─────────────────────────────────────────────────────────── */

.ep-drawer {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.ep-drawer > summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font: 600 0.85rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--brand-d);
  list-style: none;
}
.ep-drawer > summary::-webkit-details-marker { display: none; }
.ep-drawer > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s;
}
.ep-drawer[open] > summary::before { content: "▾ "; }

.ep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  /* A show can carry 500 episode rows; cap the drawer and scroll inside it
     rather than making the page endless. */
  max-height: 32rem;
  overflow-y: auto;
}

.ep-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.ep-row:last-child { border-bottom: 0; }

.ep-main { min-width: 0; flex: 1; }

.ep-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ep-num { color: var(--brand-d); }

.ep-meta {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .show-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .show-art img,
  .show-art-blank { width: 110px; height: 110px; }
  .show-stat dd { font-size: 1.2rem; }
  .sup-grid { grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); }
  .sup-avatar { width: 44px; height: 44px; }
  .sup-card--podium .sup-avatar { width: 62px; height: 62px; }
  .boost-when { margin-left: 0; }
}
