/* Podcasts, audiobooks, ad breaks and the AI labels: the parts of the platform that are new on top of
   the music catalog. Uses the tokens from app.css. */

/* ---------------- AI labels ---------------- */
.card .ai-s { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--text-3); font-size: 11.5px; }
.card .ai-s svg.i { width: 12px; height: 12px; color: var(--accent); }
.sp-ai-notes { display: flex; gap: 10px; align-items: flex-start; max-width: 760px; margin: 6px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--surface); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.sp-ai-notes svg.i { margin-top: 2px; color: var(--accent); }
.sp-ai-notes b { color: var(--text); font-weight: 500; }

/* ---------------- categories ---------------- */
.sp-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.sp-cat { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--raised); color: var(--text-2); font-size: 13px; font-weight: 500; transition: background .12s, color .12s; }
.sp-cat:hover { background: var(--sel); color: var(--text); }
.sp-cat.is-on { background: var(--text); color: var(--base); }
@container stage (max-width: 560px) { .sp-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter); } .sp-cats::-webkit-scrollbar { display: none; } .sp-cat { flex: none; } }

/* ---------------- show and book grids ---------------- */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 24px 16px; }
.sp-head .cat-rel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.sp-head .play-sq.lg { width: 52px; height: 52px; border-radius: 50%; }
.sp-continue-btn { height: 46px; padding: 0 22px; font-size: 14.5px; }

/* ---------------- episodes ---------------- */
.ep-list { display: grid; gap: 2px; }
.ep { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 12px; border-radius: var(--r); transition: background .12s; }
/* An episode is also a .tr (for the player's highlight): drop the track table's named areas. */
.ep { grid-template-areas: none; min-height: 0; }
.ep > * { grid-area: auto; }
.ep + .ep { box-shadow: 0 -1px 0 var(--line); }
.ep:hover { background: var(--surface); box-shadow: none; }
.ep:hover + .ep { box-shadow: none; }
.ep.is-current { background: var(--raised); }
.ep-art { width: 72px; height: 72px; border-radius: var(--r); }
.ep-art:hover .play-over, .ep-art:focus-visible .play-over, .ep.is-current .ep-art .play-over { opacity: 1; }
.ep-body { min-width: 0; display: grid; gap: 4px; }
.ep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-3); font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.ep-title { font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.ep-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.ep-show { color: var(--text-2); font-size: 13px; }
.ep-show:hover { color: var(--text); }
.ep-notes { margin: 2px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.ep-len { display: inline-flex; align-items: center; gap: 5px; }
.ep-prog { position: relative; width: 90px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.ep-prog i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); }
.ep-act { display: flex; gap: 2px; }
@container stage (max-width: 560px) {
  .ep { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 4px; }
  .ep-art { width: 56px; height: 56px; }
  .ep-act { grid-column: 2; justify-content: flex-start; margin-top: -4px; }
}

/* ---------------- chapters ---------------- */
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-width: 860px; }
.ch { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: var(--r); }
.ch:hover { background: var(--surface); }
.ch.is-current { background: var(--raised); }
.ch-play { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--raised); color: var(--text-2); }
.ch-play svg.i { display: none; }
.ch:hover .ch-play svg.i, .ch.is-current .ch-play svg.i { display: block; }
.ch:hover .ch-n, .ch.is-current .ch-n { display: none; }
.ch-play:hover { background: var(--text); color: var(--base); }
.ch-n { font-variant-numeric: tabular-nums; font-size: 13px; }
.ch-body { min-width: 0; display: grid; gap: 6px; }
.ch-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch.is-done .ch-title { color: var(--text-3); }
.ch-len { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.ch .ep-prog { width: min(220px, 100%); }

/* ---------------- continue listening ---------------- */
.sp-cc .cover { position: relative; }
.sp-cc-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .55); }
.sp-cc-prog i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); }

/* ---------------- the player: episodes and chapters ---------------- */
.player .only-spoken { display: none; }
.player.is-spoken .only-spoken { display: inline-grid; }
.player.is-spoken .only-music { display: none; }
.player [data-p=rate] { width: auto; min-width: 38px; padding: 0 6px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.player [data-p=ai] { max-width: 150px; }
@media (max-width: 860px) {
  .player.is-spoken .ctl .only-spoken[data-p=rate] { display: none; }
  .player.is-spoken .ctl [data-p=back15], .player.is-spoken .ctl [data-p=fwd30] { display: inline-grid; }
}

/* ---------------- ad breaks ---------------- */
.player.in-ad .np, .player.in-ad .scrub, .player.in-ad .np-right > :not(.vol-wrap) { opacity: .35; pointer-events: none; }
.player.in-ad .ctl > :not([data-p=play]) { opacity: .35; pointer-events: none; }

/* ---------------- top bar: Premium ---------------- */
.top-go { color: var(--accent); }
.top-premium svg.i { color: var(--accent); }

/* ---------------- creator editor: kinds, AI tool, episode review ---------------- */
.ai-pick { display: grid; gap: 8px; }
.ai-pick > span { display: block; }
.ed-ai { align-items: start; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); }
.tk-review { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); color: var(--text-2); font-size: 13px; }
.tk-review > span { flex: 1 1 260px; min-width: 0; line-height: 1.45; }
.tk-review b { color: var(--text); font-weight: 500; }
.tk-review .check { margin: 0; flex: 1 1 100%; }
.tk-review-live > svg.i { color: var(--ok); }
.tk-review-pending > svg.i { color: var(--warn); }
.tk-review-rejected { background: #211614; }
.tk-review-rejected > svg.i { color: var(--danger); }
.g-season { grid-column: span 3; }
.tk-grid-podcast .g-title { grid-column: span 9; }
.tk-grid-podcast .g-main { grid-column: span 12; }
.g-desc { grid-column: span 12; }
.g-ai { grid-column: span 6; margin-bottom: 14px; }
.tk-grid-audiobook .g-title { grid-column: span 8; }
.tk-grid-audiobook .g-main { grid-column: span 4; }
.rl-st { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.rl-st small { font-size: 11.5px; }
.sl-li-top3, .sl-li-head3 { grid-template-columns: 40px minmax(0, 1fr) 56px 50px; }
@container stage (max-width: 700px) {
  .ed-ai { grid-template-columns: minmax(0, 1fr); }
  .g-ai, .g-season, .tk-grid-podcast .g-title, .tk-grid-audiobook .g-title, .tk-grid-audiobook .g-main { grid-column: span 12; }
}

/* ---------------- admin review: episodes ---------------- */
.a-ep .a-review .cover { width: 120px; }

/* ---------------- Premium plan cards ---------------- */
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--raised); color: var(--text-2); font-size: 11.5px; font-weight: 500; }
.pc-line { margin: 0 0 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.pc-feats { display: flex; flex-direction: column; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; flex: 1; }
.pc-feats li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.pc-feats li svg.i { flex: none; margin-top: 2px; color: var(--ok); }
.pc-feats b { color: var(--text); font-weight: 600; }
.pc-free h3 { color: var(--text); }
.pc-card .btn.is-disabled { opacity: .6; cursor: default; }

/* How it was made (components/made.blade.php) */
.made { max-width: 760px; margin: 14px 0 0; padding: 4px 0 0; }
.made-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.made-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 500; }
.made-head h2 svg.i { color: var(--accent); }
.made-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.made-ver { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--raised); color: var(--text-2); font-size: 12px; }
.human-touch { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; background: #f3e9d2; color: #3b2a08; font-size: 12px; font-weight: 600; white-space: nowrap; }
.human-touch svg.i { width: 13px; height: 13px; }
.human-touch.sm { height: 20px; padding: 0 7px; font-size: 11px; }
.made-facts { display: grid; gap: 10px; margin: 14px 0 0; }
.made-facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.made-facts dt { color: var(--text-3); font-size: 12.5px; }
.made-facts dd { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.made-prompt { font-style: italic; }
.made-more { display: inline-block; margin-top: 12px; color: var(--text-3); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.made-more:hover { color: var(--text); }
@media (max-width: 560px) { .made-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------------- Ads (public/js/ads.js) ----------------
   Computers: a banner in the middle of the screen, the picture or video edge to edge with the text over it.
   Phones: a full screen takeover, the picture big in the middle on a background tinted from it, or a tall
   picture or video filling the whole screen. data-shape on the card: wide | square | tall. */
.ad-dim { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .66); backdrop-filter: blur(3px); }
.adx { position: fixed; z-index: 101; overflow: hidden; color: #fff; background: #0c0c10; isolation: isolate; }
.adx-bg { position: absolute; inset: -60px; z-index: -2; }
.adx-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(46px) saturate(1.35) brightness(.5); }
.adx-bg img:not([src]) { display: none; }
.adx-stage { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; }
.adx-stage img, .adx-stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
.adx-stage .adx-letter { width: 42%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .12); font-size: 72px; font-weight: 600; }
.adx-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.adx-top { display: flex; align-items: center; gap: 10px; }
.adx-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.adx-chip span:not(:empty)::before { content: '·'; margin: 0 4px; }
.adx-note { min-width: 0; flex: 1; font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adx-skip { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.adx-skip:disabled { opacity: .7; cursor: default; }
.adx-skip:not(:disabled):hover { background: #fff; color: #000; }
.adx-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }
.adx-x:hover { background: #fff; color: #000; }
.adx-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adx-logo { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 6px; overflow: hidden; background: #fff; color: #111; font-size: 20px; font-weight: 700; }
.adx-logo img { width: 100%; height: 100%; object-fit: cover; }
.adx-name { min-width: 0; display: grid; gap: 1px; }
.adx-name b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.adx-name span { font-size: 13px; color: rgba(255, 255, 255, .72); }
.adx-track { position: relative; display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.adx-track i { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; transition: width .25s linear; }
.adx-times { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.adx-tag { font-size: 15px; font-weight: 600; line-height: 1.35; }
.adx-tag:empty { display: none; }
.adx-cta.is-empty { display: none; }
.adx-pill { flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 20px; border-radius: 999px; background: #fff; color: #000; font-size: 14px; font-weight: 600; text-decoration: none; }
.adx-pill:hover { background: #e8e8e8; }
.adx-premium { justify-self: start; color: rgba(255, 255, 255, .72); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.adx-premium:hover { color: #fff; }
.adx-tap { justify-self: start; height: 40px; padding: 0 22px; border: 0; border-radius: 999px; background: #fff; color: #000; font: inherit; font-weight: 600; cursor: pointer; }
.adx-ctl { display: none; }
.adx-play svg.i, .adx-next svg.i, .adx-ghost svg.i { width: 26px; height: 26px; }
.adx-play .adx-i-play, .adx.is-paused .adx-play .adx-i-pause { display: none; }
.adx.is-paused .adx-play .adx-i-play { display: block; }
#adshow { opacity: 0; transition: opacity .3s ease, transform .3s ease; }
#adshow.is-on { opacity: 1; }

/* computers: the banner in the middle */
@media (min-width: 861px) {
  .adx { left: 50%; top: 50%; width: min(820px, calc(100vw - 80px)); aspect-ratio: 16 / 9; max-height: calc(100dvh - 80px); border-radius: 16px; box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06); transform: translate(-50%, -50%); }
  #adshow { transform: translate(-50%, calc(-50% + 14px)) scale(.985); }
  #adshow.is-on { transform: translate(-50%, -50%); }
  .adx-shade { background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 42%, rgba(0, 0, 0, 0) 64%), linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 22%); }
  /* a square or tall picture sits on the right, the text on the left, over its own tinted background */
  .adx[data-shape=square] .adx-stage, .adx[data-shape=tall] .adx-stage { inset: 9% 6% 9% auto; width: auto; aspect-ratio: 1; height: 82%; }
  .adx[data-shape=tall] .adx-stage { aspect-ratio: 9 / 16; }
  .adx[data-shape=square] .adx-stage > *, .adx[data-shape=tall] .adx-stage > * { border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
  .adx[data-shape=square] .adx-shade, .adx[data-shape=tall] .adx-shade { background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 55%); }
  .adx[data-shape=square] .adx-info, .adx[data-shape=tall] .adx-info { align-content: center; padding-right: 52%; }
  .adx-stage video { object-fit: contain; background: #000; }
  .adx-top { position: absolute; top: 0; left: 0; right: 0; padding: 18px 20px; }
  .adx-info { position: absolute; inset: 0; padding: 70px 32px 34px; display: grid; align-content: end; gap: 14px; justify-items: start; pointer-events: none; }
  .adx-info > * { pointer-events: auto; }
  .adx-tag { font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; max-width: 30ch; }
  .adx-cta { display: grid; gap: 16px; justify-items: start; }
  .adx-prog { position: absolute; left: 0; right: 0; bottom: 0; }
  .adx-prog .adx-track { height: 4px; border-radius: 0; }
  .adx-times { display: none; }
  .adx-premium { margin-top: -4px; }
}

/* phones: the full screen takeover */
@media (max-width: 860px) {
  .adx { inset: 0; z-index: 160; display: flex; flex-direction: column; padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0); }
  .ad-dim { display: none; }
  .adx-top { order: -1; padding: 14px 18px 6px; }
  .adx-note { text-align: center; }
  .adx-skip { display: none; }
  .adx-stage { position: relative; inset: auto; z-index: 0; flex: 1; min-height: 0; padding: 14px 24px; }
  .adx .adx-stage > * { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
  .adx[data-shape=wide] .adx-stage > * { width: 100%; }
  /* a tall picture or video fills the screen (like Canvas) */
  .adx[data-shape=tall] .adx-stage { position: absolute; inset: 0; z-index: -1; padding: 0; }
  .adx[data-shape=tall] .adx-stage > * { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
  .adx[data-shape=tall] .adx-shade { background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 60%), linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 18%); }
  .adx[data-shape=tall] .adx-top { margin-bottom: auto; }
  .adx[data-shape=tall] .adx-info { margin-top: auto; }
  .adx-info { display: grid; gap: 14px; padding: 6px 22px 20px; }
  .adx-name b { font-size: 21px; }
  .adx-logo { width: 44px; height: 44px; }
  .adx-prog { display: grid; gap: 6px; }
  .adx-track { height: 4px; }
  .adx-ctl { display: flex; align-items: center; justify-content: center; gap: 46px; }
  .adx-ghost, .adx-next { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: #fff; opacity: .35; }
  .adx-next:not(:disabled) { opacity: 1; cursor: pointer; }
  .adx-play { width: 66px; height: 66px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: #000; cursor: pointer; }
  .adx-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(12px); }
  .adx-tag { font-size: 14px; }
  .adx-pill { height: 34px; padding: 0 16px; font-size: 13px; }
  .adx-premium { justify-self: center; }
  .adx-tap { justify-self: stretch; }
  #adshow { transform: scale(.98); }
  #adshow.is-on { transform: none; }
}
