/* 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 ---------------- */
.adb { position: fixed; left: 50%; bottom: calc(var(--player-h) + 14px); transform: translateX(-50%); z-index: 60; width: min(720px, calc(100vw - 32px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border-radius: 8px; background: var(--raised); box-shadow: var(--shadow); }
.adb-media:empty { display: none; }
.adb-media img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r); }
.adb-media video { display: block; width: 240px; max-width: 42vw; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); background: #000; }
.adb-text { min-width: 0; display: grid; gap: 3px; }
.adb-k { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.adb-text b { font-size: 15px; font-weight: 500; }
.adb-h { color: var(--text-2); font-size: 13px; line-height: 1.4; }
.adb-left { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.adb-act { display: grid; gap: 6px; justify-items: stretch; }
.adb-act .btn:disabled { opacity: .55; cursor: default; }
.adb-premium { color: var(--accent); font-size: 12px; text-align: center; text-decoration: underline; text-underline-offset: 2px; }
.adshow { position: fixed; right: 16px; bottom: calc(var(--player-h) + 14px); z-index: 59; width: min(380px, calc(100vw - 32px)); display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 8px; background: var(--raised); box-shadow: var(--shadow); overflow: hidden; opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease; }
.adshow.is-on { opacity: 1; transform: none; }
.adshow-pic img { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: var(--r); }
.adshow-text { min-width: 0; display: grid; gap: 3px; justify-items: start; }
.adshow-text b { font-size: 14px; font-weight: 500; max-width: 100%; }
.adshow-text .btn { margin-top: 4px; }
.adshow-x { align-self: start; }
.adshow-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .2s linear; }
.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; }
@media (max-width: 860px) {
  .adb { grid-template-columns: minmax(0, 1fr); bottom: calc(var(--player-h) + var(--tabbar-h, 56px) + 10px); gap: 10px; }
  .adb-media video { width: 100%; max-width: none; }
  .adb-media img { width: 100%; height: auto; max-height: 220px; }
  .adb-act { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .adshow { left: 16px; right: 16px; width: auto; bottom: calc(var(--player-h) + var(--tabbar-h, 56px) + 10px); grid-template-columns: 72px minmax(0, 1fr) auto; }
  .adshow-pic img { width: 72px; height: 72px; }
}

/* ---------------- 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; } }
