/*
 * Podcasts — overview grid, teaser cards and episode page.
 * Loaded for anonymous AND authenticated visitors (attach via ho/podcasts),
 * so every token needs a fallback chain: app.css (--color-podcast) is
 * auth-only, tokens.css (--ho-delft-*) is global.
 */

/* ── Overview grid (/podcasts, core grid_responsive style) ───────────────── */

.podcasts-page .views-view-responsive-grid {
  gap: 16px;
}

.podcasts-page .views-view-responsive-grid__item {
  min-width: 0;
}

.podcasts-empty {
  text-align: center;
  color: var(--ho-fg-muted, #6b7280);
  padding: 2.5rem 0;
}

.podcasts-pager {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* ── Teaser card: horizontal row (icon | body | CTA) ─────────────────────── */

.podcast-teaser {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--ho-border, #e5e7eb);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.podcast-teaser:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(28, 26, 20, 0.18);
  border-color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
}

.podcast-teaser__link {
  position: absolute;
  inset: 0;
  border-radius: 12px;
}

.podcast-teaser__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-podcast, var(--ho-delft-500, #1F4FA0)) 10%, white);
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
}

.podcast-teaser__body {
  flex: 1;
  min-width: 0;
}

.podcast-teaser__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.podcast-teaser__title a {
  color: var(--ho-ink-700, #1C1A14);
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.podcast-teaser__title a:hover {
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
}

/* Meta chip row */
.podcast-teaser__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.podcast-teaser__date,
.podcast-teaser__duration,
.podcast-teaser__new,
.podcast-teaser__pending,
.podcast-teaser__level {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: var(--ho-radius-pill, 999px);
  padding: 0.14rem 0.55rem;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.podcast-teaser__date {
  color: var(--ho-fg-subtle, #9ca3af);
  background: var(--ho-bg-sunken, #f5f4f0);
}

.podcast-teaser__duration {
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
  background: var(--ho-delft-50, #EEF3FB);
}

.podcast-teaser__new {
  color: #ffffff;
  background: var(--ho-orange-600, #D9540F);
}

.podcast-teaser__pending {
  color: var(--ho-orange-700, #B84A0E);
  background: var(--ho-orange-50, #FFF4EC);
}

/* CEFR-niveaubadge (teaser + afleveringspagina) */
.podcast-teaser__level,
.podcast-meta__level {
  font-weight: 600;
}
.podcast-teaser__level--a2,
.podcast-meta__level--a2 {
  color: #047857;
  background: #ecfdf5;
}
.podcast-teaser__level--b1,
.podcast-meta__level--b1 {
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
  background: var(--ho-delft-50, #EEF3FB);
}
.podcast-teaser__level--b2c1,
.podcast-meta__level--b2c1 {
  color: #6d28d9;
  background: #f5f3ff;
}

.podcast-teaser__cta {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.podcast-teaser:hover .podcast-teaser__cta {
  text-decoration: underline;
}

/* Audio nog niet klaar: gedempte kaart */
.podcast-teaser--pending {
  opacity: 0.75;
}
.podcast-teaser--pending .podcast-teaser__icon {
  background: var(--ho-bg-sunken, #f5f4f0);
  color: var(--ho-fg-subtle, #9ca3af);
}

/* ── Episode page ─────────────────────────────────────────────────────────── */

.podcast-full {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 1.5rem;
}

.podcast-breadcrumb {
  margin-bottom: 1.25rem;
}
.podcast-breadcrumb a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ho-fg-muted, #6b7280);
  text-decoration: none;
}
.podcast-breadcrumb a:hover {
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
}

.podcast-header {
  margin-bottom: 1.5rem;
}

.podcast-header h1 {
  font-size: var(--ho-text-3xl, 1.9rem);
  margin: 0.6rem 0 0;
  line-height: 1.2;
  color: var(--ho-fg, #1C1A14);
  letter-spacing: -0.02em;
}

.podcast-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.podcast-meta__eyebrow,
.podcast-meta__date,
.podcast-meta__duration,
.podcast-meta__level {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--ho-radius-pill, 999px);
  padding: 0.16rem 0.6rem;
  white-space: nowrap;
}

.podcast-meta__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
}

.podcast-meta__date {
  color: var(--ho-fg-subtle, #9ca3af);
  background: var(--ho-bg-sunken, #f5f4f0);
}

.podcast-meta__duration {
  color: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
  background: var(--ho-delft-50, #EEF3FB);
}

/* Player card — audio bovenaan, zoals bij de luisteroefening */
.podcast-player-container {
  background: var(--ho-bg-sunken, #f8f7f4);
  border: 1px solid var(--ho-border, #e5e7eb);
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--ho-shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.podcast-player-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.player-icon {
  width: 60px;
  height: 60px;
  background: var(--color-podcast, var(--ho-delft-500, #1F4FA0));
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.player-content { flex: 1; min-width: 0; }
.player-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: var(--ho-text-base, 1rem);
}

.podcast-player-container audio {
  width: 100%;
  height: 40px;
  border-radius: var(--ho-radius-sm, 8px);
}

.podcast-pending-note {
  color: var(--ho-fg-muted, #6b7280);
  font-style: italic;
}

/* Inklapbaar transcript — "Lees mee", zoals bij de luisteroefening */
.podcast-transcript {
  margin: 0 0 1.5rem;
  border: 1px solid var(--ho-border, #e5e7eb);
  border-radius: 12px;
  background: #ffffff;
}

.podcast-transcript > summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ho-fg, #1C1A14);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.podcast-transcript > summary::-webkit-details-marker { display: none; }
.podcast-transcript > summary::before {
  content: '';
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--ho-fg-muted, #6b7280);
  border-bottom: 2px solid var(--ho-fg-muted, #6b7280);
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.podcast-transcript[open] > summary::before {
  transform: rotate(45deg);
}
.podcast-transcript[open] > summary {
  border-bottom: 1px solid var(--ho-border, #e5e7eb);
}

.podcast-transcript__text {
  padding: 0.75rem 1rem 1rem;
  line-height: 1.8;
  font-size: var(--ho-text-md, 1.05rem);
  color: var(--ho-fg, #1C1A14);
}

/* Footer nav */
.podcast-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ho-border, #e5e7eb);
  display: flex;
  justify-content: center;
}

@media (max-width: 560px) {
  .podcast-player-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .player-icon { display: none; }
}

/* Intro-tekst op de per-niveau podcastpagina's (/podcasts/a2 etc.). */
.podcasts-header .podcasts-intro {
  max-width: 46rem;
  margin: 0 0 1.5rem;
  color: var(--ho-text-muted, #64748b);
  font-size: 1.0625rem;
  line-height: 1.6;
}
