/* Podcast and media lists (techniques/podcasts*.html, media_list.html): compact show cards, filters, notices and the
   continue-listening row. The player itself (episode and clip pages) is css/media-player.css. Only the site's tokens
   (app.css :root), so light/dark and RTL follow the rest of the site. */

.pod-filters { display: grid; gap: 2px; margin-block-end: 6px; }
.pod-filters .filters { align-items: center; margin-block-end: 8px; }
.pod-filter-h { flex: none; min-inline-size: 44px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.pod-filters .pill small { color: inherit; opacity: 0.7; font-weight: 500; }
.pod-filters .pill .ic { inline-size: 14px; block-size: 14px; }
.pod-count { margin-block: 0 12px; }

.pod-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.pod-card { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: var(--r-lg); background: var(--card);
  border: 1px solid var(--hair); color: var(--ink); text-decoration: none; transition: transform 200ms var(--ease-out), box-shadow 200ms; }
@media (hover: hover) and (pointer: fine) { .pod-card:hover { transform: translateY(-2px); box-shadow: var(--e2); } }
.pod-card:active { transform: scale(0.985); }
.pod-card:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.pod-sq { display: grid; place-content: center; justify-items: center; gap: 4px; aspect-ratio: 1; border-radius: var(--r-md); color: #fff; }
.pod-sq .ic { inline-size: 22px; block-size: 22px; opacity: 0.9; }
.pod-sq b { font-size: var(--fs-xs); line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.pod-body { display: grid; gap: 4px; min-inline-size: 0; font-size: var(--fs-sm); }
.pod-title { line-height: 1.5; }
.pod-en { color: var(--ink-2); text-align: end; }
.pod-tags { gap: 4px; }
.pod-desc { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; }
.tag.warn { background: color-mix(in srgb, var(--saffron) 26%, var(--card)); color: var(--ink); }
@media (max-width: 480px) {
  .pod-card { grid-template-columns: 56px 1fr; padding: 10px; gap: 10px; }
  .pod-sq .ic { inline-size: 18px; block-size: 18px; }
}

.pod-notice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.8;
  background: var(--paper-2); color: var(--ink); }
.pod-notice .ic { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 4px; }
.pod-notice.warn { background: color-mix(in srgb, var(--saffron) 22%, var(--card)); }
.pod-notice.ok { background: color-mix(in srgb, var(--ok) 13%, var(--card)); }
.pod-notice[hidden] { display: none; }
.pod-no-tr .ic { display: inline; inline-size: 14px; block-size: 14px; vertical-align: -2px; }
.pod-licence { margin-block-start: 14px; }
.pod-licence summary { cursor: pointer; min-block-size: 32px; }

/* continue listening */
.pod-continue { margin-block-end: 18px; }
.pod-continue[hidden] { display: none; }
.pod-continue-list { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.pod-continue-list::-webkit-scrollbar { display: none; }
.pod-continue-list li { flex: 0 0 min(78%, 280px); scroll-snap-align: start; }
.pod-resume { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.pod-resume small { color: var(--ink-2); }
.pod-resume b { line-height: 1.5; text-align: start; }
.pod-resume i { display: block; block-size: 4px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.pod-resume i > span { display: block; block-size: 100%; background: var(--indigo); transform-origin: left center; }
:root[dir="rtl"] .pod-resume i > span, [dir="rtl"] .pod-resume i > span { transform-origin: right center; }
@media (hover: hover) and (pointer: fine) { .pod-resume:hover { border-color: var(--indigo); } }

/* media library on a phone: two cards per row (the 16:9 art made one card fill the screen; a series has dozens of lessons) */
@media (max-width: 520px) {
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .media-grid .mc-body { padding: 8px 10px 10px; gap: 3px; font-size: var(--fs-xs); }
  .media-grid .mc-body b { font-size: var(--fs-sm); line-height: 1.5; }
  .media-grid .mc-body .row { gap: 4px; flex-wrap: wrap; }
  .media-grid .mc-body .tag, .media-grid .mc-body .lvl { font-size: 0.7rem; padding-inline: 6px; }
  .media-grid .mc-body small { display: none; }
}

.pod-body small .ic { inline-size: 13px; block-size: 13px; vertical-align: -2px; }

/* an episode that has our own learner notes (techniques/podcast_notes.py) */
.tag.pn-chip { background: color-mix(in srgb, var(--indigo) 14%, var(--card)); color: var(--indigo); }

/* an audiobook section: «فصل ۳» above its title (LibriVox books, listed in reading order) */
.ep-list .ep-sec { color: var(--muted); font-size: .8rem; font-weight: 600; }

/* show artwork (our own static copies: static/podcasts/covers, techniques/podcast_covers.py) with the level on its corner.
   Explicit sizes (img width/height + aspect-ratio) so nothing shifts while it loads; without a cover the tile stays. */
.pod-card { grid-template-columns: 88px minmax(0, 1fr); }
@media (max-width: 480px) { .pod-card { grid-template-columns: 72px minmax(0, 1fr); } }
.pod-cover { position: relative; display: block; inline-size: 100%; aspect-ratio: 1; border-radius: var(--r-md); background: var(--paper-2); }
.pod-cover img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 1; object-fit: cover; border-radius: inherit;
  outline: 1px solid rgb(0 0 0 / 0.08); outline-offset: -1px; }
/* physical insets: .lvl is direction:ltr, so logical ones would flip (same as dictionary.css) */
.pod-cover .pod-lvl.lvl { position: absolute; bottom: 4px; right: 4px; min-inline-size: 0; padding: 0 5px; border-radius: var(--r-xs);
  font-size: 0.7rem; line-height: 1.6; white-space: nowrap; color: var(--ink); background: var(--card); box-shadow: 0 1px 3px rgb(0 0 0 / 0.35); }
html[dir="ltr"] .pod-cover .pod-lvl.lvl { right: auto; left: 4px; }
/* the .lvl colours of ui.css (tokens, so dark mode follows); a WebView before color-mix (Chrome 111) gets the plain card:
   a declaration with var() always parses, so a fallback line in front of it would never be used; @supports is needed */
.pod-cover .pod-lvl.A1, .pod-cover .pod-lvl.A2 { background: color-mix(in srgb, var(--teal-deco) 18%, var(--card)); }
.pod-cover .pod-lvl.B1, .pod-cover .pod-lvl.B2 { background: color-mix(in srgb, var(--indigo) 16%, var(--card)); }
.pod-cover .pod-lvl.C1, .pod-cover .pod-lvl.C2 { background: color-mix(in srgb, var(--saffron) 30%, var(--card)); }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .pod-cover .pod-lvl.lvl { background: var(--card); }
}

/* show page header: the cover beside the tags and title (phone: the description runs full width under both) */
.intro-hero.has-cover { grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.intro-hero.has-cover > * { grid-column: 1 / -1; }
.intro-hero.has-cover > .pod-cover { grid-column: 1; grid-row: 1 / span 2; }
.intro-hero.has-cover > .row, .intro-hero.has-cover > h1 { grid-column: 2; }
@media (min-width: 640px) {
  .intro-hero.has-cover { grid-template-columns: 132px minmax(0, 1fr); column-gap: 20px; }
  .intro-hero.has-cover > * { grid-column: 2; }
  .intro-hero.has-cover > .pod-cover { grid-column: 1; grid-row: 1 / span 3; }
}
.pod-cover.lg { box-shadow: 0 6px 18px rgb(0 0 0 / 0.35); }
.pod-cover.lg img { outline-color: rgb(255 255 255 / 0.18); }
.pod-cover.lg .pod-lvl.lvl { bottom: 6px; right: 6px; font-size: var(--fs-xs); padding: 1px 7px; }
html[dir="ltr"] .pod-cover.lg .pod-lvl.lvl { right: auto; left: 6px; }

/* episode page header, ready for templates/techniques/podcast_episode.html: <header class="stack mp-head has-cover"> with
   {% include "techniques/_pod_cover.html" with p=show size=64 cls="sm" eager=True %} as its first child */
.mp-head.has-cover { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.mp-head.has-cover > * { grid-column: 2; }
.mp-head.has-cover > .pod-cover { grid-column: 1; grid-row: 1 / span 2; }
.pod-cover.sm .pod-lvl.lvl { bottom: 3px; right: 3px; padding: 0 4px; font-size: 0.62rem; }
html[dir="ltr"] .pod-cover.sm .pod-lvl.lvl { right: auto; left: 3px; }
