/*
 * TV shows: a show's page, its season tabs and episode list (see shows.js).
 * Same stone and gold as the rest of the app (style.css); the episode up
 * next sits on a lighter row.
 */

.badge.count { min-width: 24px; text-align: center; }

/* The frame (picture, poster, words) is the shared .detail-head (style.css). */
.show-form { padding: 14px 32px 0; }
.match-show-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 12px; }
.match-show-pick {
  display: grid; gap: 6px; padding: 6px; text-align: left; font-size: var(--fs-sm);
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm);
}
.match-show-pick img, .match-show-pick div { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-xs); background: var(--canvas); }

.show-body { padding: 18px 32px 32px; }
.show-seasons { margin-bottom: 14px; }
.show-season-about { margin: 0 0 14px; font-size: var(--fs-md); }

.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.episode {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
  border-radius: var(--r-md); padding: 4px;
}
@media (hover: hover) { .episode:hover { background: var(--surface-2); } }
.episode.next { background: var(--surface-2); }
.episode-play {
  display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start;
  padding: 6px; text-align: left; background: none; border: 0; color: inherit; border-radius: var(--r-sm);
}
.episode-play:hover:not(:disabled) { background: none; transform: none; }
.episode-still {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}
.episode-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.episode-glyph {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0;
  background: rgb(12 10 9 / 0.35); color: #fff; transition: opacity 0.15s;
}
.episode-glyph svg { width: 34px; height: 34px; }
.episode-play:hover .episode-glyph, .episode-play:focus-visible .episode-glyph { opacity: 1; }
.episode-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.episode-number { font-family: "Geist Mono", ui-monospace, monospace; font-size: var(--fs-sm); color: var(--muted); min-width: 1.5em; }
.episode-name { font-weight: 600; font-size: var(--fs-md); }
.episode-tag {
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--text-strong);
}
.episode-meta { font-size: var(--fs-sm); color: var(--muted); margin-top: 3px; }
.episode-about {
  margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.episode-watched {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: var(--r-pill);
  background: none; border: 1px solid var(--hairline); color: var(--muted);
}
.episode-watched svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.episode-watched.on { background: var(--select-bg); border-color: transparent; color: var(--select-fg); }

/* On a phone the backdrop says enough: no poster beside the title, and narrower stills. */
@media (max-width: 640px) {
  .show-body, .show-form { padding-left: 12px; padding-right: 12px; }
  .episode { gap: 4px; padding: 2px; }
  .episode-play { grid-template-columns: 112px 1fr; gap: 10px; padding: 4px; }
  /* A thumb's width, not a fingertip's. */
  .episode-watched { width: 44px; height: 44px; }
}
