/**
 * DiDaDi Cast — sección de Podcasts (P-41c). Estilos namespaced bajo `.erp-podcasts`
 * para no chocar con el theme. Neutro y responsive; hereda tipografía del sitio.
 */

.erp-podcasts {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.erp-podcasts__loading,
.erp-podcasts__empty,
.erp-podcasts__error {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0;
}

.erp-podcasts__error {
  color: #b91c1c;
}

/*
 * La tarjeta es visualmente autónoma: fondo claro + colores de texto EXPLÍCITOS,
 * para que sea legible en cualquier theme y sin depender del modo oscuro del sistema
 * (el portal es claro y no responde a `prefers-color-scheme`; si dejábamos que el
 * texto heredara el color del theme, en un navegador en modo oscuro salía texto
 * oscuro sobre tarjeta oscura).
 */
.erp-podcast {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: #ffffff;
  color: #1f2937;
}

.erp-podcast__head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.erp-podcast__art {
  width: 160px;
  height: 160px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f3f4f6;
}

.erp-podcast__headtext {
  min-width: 0;
}

.erp-podcast__title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  line-height: 1.3;
  color: #111827;
}

.erp-podcast__desc {
  margin: 0 0 0.5rem;
  color: #4b5563;
  font-size: 0.95rem;
}

.erp-podcast__subscribe {
  margin-top: 0.25rem;
}

/* Botón "Copiar enlace para tu app de podcast" (el feed se pega en la app, no se abre). */
.erp-podcast__feed {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: #1d4ed8;
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.erp-podcast__feed:hover {
  background: #1e40af;
}

.erp-podcast__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.erp-podcast__feedurl {
  margin-top: 0.4rem;
  width: 100%;
  max-width: 440px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.erp-podcast__empty {
  margin: 0.75rem 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.erp-podcast__episodes {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.erp-episode {
  border-top: 1px solid #f0f1f3;
  padding-top: 0.6rem;
}

/*
 * Los `<p>` del episodio: prefijamos con `.erp-podcasts` (+ `!important`) para ganarle
 * al theme del portal, que suele imponer márgenes grandes a los `<p>` de su contenido
 * (p. ej. `.entry-content p`). Buscamos un bloque compacto: título → fecha → párrafo.
 */
.erp-podcasts .erp-episode__title {
  margin: 0 !important;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: #111827;
}

.erp-podcasts .erp-episode__date {
  margin: 0.1rem 0 0 !important;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.2;
}

.erp-podcasts .erp-episode__desc {
  margin: 0.4rem 0 0.5rem !important;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.4;
}

.erp-episode__audio {
  width: 100%;
  height: 40px;
}

@media (max-width: 480px) {
  .erp-podcast__head {
    flex-direction: column;
  }
  .erp-podcast__art {
    width: 120px;
    height: 120px;
  }
}
