/*
  AI Your Business Podcast player - styles for assets/podcast-player.js

  Self-contained on purpose: the site has two page tracks with different token sets, so the brand values are
  copied here as --pp-* variables (AI Collab design system v2: dark canvas, aqua signals, coral small, glass
  cards radius 22 with NO backdrop blur, buttons radius 11/14, Poppins + Inter + JetBrains Mono).
  If the design system changes, change the variables in the first block.
  No inline styles in markup. The seek fill is a CSS variable the script sets on the range input.
*/

.pp {
  --pp-aqua: #37D6CE;
  --pp-aqua-hover: #4FE3DB;
  --pp-coral: #FF7A67;
  --pp-canvas: #1A1A1A;
  --pp-ink: #EDF2F2;
  --pp-white: #FFFFFF;
  --pp-body: #A6B6B6;
  --pp-edge: rgba(255, 255, 255, .16);
  --pp-glass: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  --pp-flat: rgba(255, 255, 255, .035);
  --pp-ease: cubic-bezier(.5, 0, .2, 1);
  --pp-display: 'Poppins', system-ui, sans-serif;
  --pp-text: 'Inter', system-ui, sans-serif;
  --pp-mono: 'JetBrains Mono', ui-monospace, monospace;

  container: pp / inline-size;
  position: relative;
  margin-top: 24px;
  padding: 28px;
  color: var(--pp-ink);
  font-family: var(--pp-text);
  font-size: 15px;
  line-height: 1.5;
  background: var(--pp-glass);
  border: 1px solid var(--pp-edge);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 26px 60px rgba(0, 0, 0, .45);
  text-align: left;
}

.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp button { font: inherit; color: inherit; cursor: pointer; }
.pp a { color: var(--pp-aqua); }
.pp :focus-visible { outline: 2px solid var(--pp-aqua); outline-offset: 4px; border-radius: 11px; }

/* ---------- now playing ---------- */
.pp-now {
  display: grid;
  grid-template-columns: 176px 1fr;
  grid-template-areas: "art head" "art controls" "art seek";
  gap: 14px 28px;
  align-items: start;
}

.pp-art {
  grid-area: art;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0E1616;
  border-radius: 14px;
  border: 1px solid rgba(55, 214, 206, .35);
  box-shadow: 0 18px 44px rgba(14, 140, 132, .38), 0 0 0 1px rgba(0, 0, 0, .4);
}

.pp-head { grid-area: head; min-width: 0; align-self: end; }

.pp-label {
  margin: 0 0 8px;
  font-family: var(--pp-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pp-aqua);
}

.pp-title {
  margin: 0;
  font-family: var(--pp-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  color: var(--pp-white);
  text-wrap: balance;
}

.pp-meta { margin: 8px 0 0; font-size: 13px; color: var(--pp-body); }

.pp-controls { grid-area: controls; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.pp-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  background: var(--pp-aqua);
  color: var(--pp-canvas);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(55, 214, 206, .32);
  transition: background-color .2s var(--pp-ease), box-shadow .2s var(--pp-ease);
}
.pp-play svg { width: 26px; height: 26px; }
.pp-play .pp-i-pause { display: none; }
.pp.is-playing .pp-play .pp-i-play { display: none; }
.pp.is-playing .pp-play .pp-i-pause { display: block; }
.pp.is-loading .pp-play { opacity: .75; }

.pp-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--pp-display);
  font-weight: 600;
  font-size: 13px;
  background: transparent;
  border: 1.5px solid var(--pp-edge);
  border-radius: 11px;
  transition: border-color .2s var(--pp-ease), background-color .2s var(--pp-ease), color .2s var(--pp-ease);
}

.pp-seek { grid-area: seek; display: flex; align-items: center; gap: 12px; }
.pp-time { flex: 0 0 auto; min-width: 44px; font-family: var(--pp-mono); font-size: 12px; color: var(--pp-body); font-variant-numeric: tabular-nums; }
.pp-time:last-child { text-align: right; }

.pp-range {
  --pp-fill: 0%;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pp-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--pp-aqua) var(--pp-fill), rgba(255, 255, 255, .16) var(--pp-fill)); }
.pp-range::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.pp-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--pp-aqua); }
.pp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 3px solid var(--pp-canvas); border-radius: 50%; background: var(--pp-aqua); box-shadow: 0 0 0 1px var(--pp-aqua); }
.pp-range::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid var(--pp-canvas); border-radius: 50%; background: var(--pp-aqua); box-shadow: 0 0 0 1px var(--pp-aqua); }

/* ---------- episode list ---------- */
.pp-list { list-style: none; margin: 26px 0 0; padding: 22px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--pp-edge); }
.pp-list-title { margin: 22px 0 0; font-family: var(--pp-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--pp-body); }
.pp-list-title + .pp-list { margin-top: 14px; padding-top: 0; border-top: 0; }

.pp-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: var(--pp-flat);
  border: 1px solid var(--pp-edge);
  border-radius: 14px;
  transition: transform .3s var(--pp-ease), border-color .3s var(--pp-ease), background-color .3s var(--pp-ease);
}
.pp-row-num { font-family: var(--pp-display); font-weight: 800; font-size: 15px; color: var(--pp-coral); }
.pp-row-main { min-width: 0; }
.pp-row-title { display: block; font-family: var(--pp-display); font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--pp-white); }
.pp-row-sub { display: block; margin-top: 3px; font-size: 13px; color: var(--pp-body); }
.pp-row-dur { font-family: var(--pp-mono); font-size: 12px; color: var(--pp-body); white-space: nowrap; }
.pp-row.is-current { border-color: rgba(55, 214, 206, .6); background: rgba(55, 214, 206, .08); }
.pp-row.is-current .pp-row-num { color: var(--pp-aqua); }

.pp-more { margin-top: 14px; }

/* ---------- links and messages ---------- */
.pp-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--pp-edge); font-size: 13px; color: var(--pp-body); }
.pp-links a { font-family: var(--pp-display); font-weight: 600; font-size: 13px; text-decoration: none; }
.pp-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pp-note { margin: 14px 0 0; font-size: 13px; color: var(--pp-body); }
.pp-error { margin: 16px 0 0; padding: 12px 16px; font-size: 13px; color: var(--pp-ink); background: rgba(255, 122, 103, .12); border: 1px solid rgba(255, 122, 103, .35); border-radius: 11px; }
.pp-loading { margin: 0; font-size: 15px; color: var(--pp-body); }

/* one-episode mode (episode pages): no list, no "show all" */
.pp.is-single { padding: 24px; }

/* ---------- hover only where hover exists ---------- */
@media (hover: hover) {
  .pp-play:hover { background: var(--pp-aqua-hover); box-shadow: 0 10px 36px rgba(55, 214, 206, .46); }
  .pp-btn:hover { border-color: rgba(55, 214, 206, .55); background: rgba(55, 214, 206, .08); }
  .pp-row:hover { transform: translateY(-5px); border-color: rgba(55, 214, 206, .45); background: rgba(255, 255, 255, .05); }
}

/* ---------- narrow players: a phone, or a small panel (the inner layout follows the player's own width) ---------- */
@media (max-width: 620px) {
  .pp { padding: 22px; }
}
@container pp (max-width: 620px) {
  .pp-now { grid-template-columns: 92px 1fr; grid-template-areas: "art head" "controls controls" "seek seek"; gap: 16px; align-items: center; }
  .pp-head { align-self: center; }
  .pp-title { font-size: 19px; }
  .pp-art { border-radius: 11px; }
  .pp-controls { justify-content: space-between; }
  .pp-play { width: 64px; height: 64px; }
  .pp-row { grid-template-columns: 30px 1fr; padding: 14px; gap: 12px; }
  .pp-row-dur { grid-column: 2; }
}
@container pp (max-width: 380px) {
  .pp-now { grid-template-columns: 76px 1fr; gap: 12px; }
  .pp-title { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pp-label { margin-bottom: 5px; }
  .pp-meta { margin-top: 5px; }
  .pp-controls { gap: 8px; }
  .pp-play { width: 56px; height: 56px; }
  .pp-btn { padding: 0 10px; }
  .pp-time { min-width: 36px; font-size: 11px; }
  .pp-seek { gap: 8px; }
}

/* inside another glass panel (e.g. the article hero "Listen" panel) the player drops its own card */
.article-panel .pp { margin-top: 18px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
/* the article stylesheet styles every paragraph in the panel; restore the player's own text */
.article-panel .pp p { margin: 0; font-size: inherit; line-height: 1.5; color: inherit; }
.article-panel .pp .pp-label { margin-bottom: 8px; font-size: 11px; color: var(--pp-aqua); }
.article-panel .pp .pp-meta { margin-top: 8px; font-size: 13px; color: var(--pp-body); }
.article-panel .pp .pp-note { margin-top: 14px; font-size: 13px; color: var(--pp-body); }
.article-panel .pp .pp-links { margin-top: 14px; padding-top: 14px; font-size: 13px; color: var(--pp-body); }
.article-panel .pp .pp-error { margin-top: 16px; font-size: 13px; color: var(--pp-ink); }
.article-panel .pp a { color: var(--pp-aqua); text-decoration: none; }
.article-panel .pp a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-panel .pp .pp-list-title { font-size: 11px; color: var(--pp-body); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp *, .pp *::before, .pp *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
