/*
 * Podlove presentation layer.
 *
 * This file may style Podlove output, but must not depend on modified
 * Podlove templates or replace Podlove data structures.
 */

:where(
  .podlove,
  .podlove-web-player,
  .podlove-player,
  .podlove-subscribe-button,
  .podlove-contributors,
  .podlove-contributors-cards,
  .podlove-downloads,
  .podlove-show-notes,
  .podlove-shownotes,
  .podlove-transcripts
) {
  max-width: 100%;
}

:where(podlove-web-player, .podlove-web-player, .podlove-player) {
  display: block;
  margin-block: clamp(1.5rem, 4vw, 2.75rem);
}

:where(podlove-web-player, .podlove-web-player, .podlove-player, .podlove-subscribe-button) {
  border-radius: 1.25rem;
  overflow: hidden;
}

:where(
  .podlove-episode-meta,
  .podlove-meta,
  .podlove-downloads,
  .podlove-subscribe-button
) {
  margin-block: var(--wp--preset--spacing--30);
}

:where(.podlove-episode-meta, .podlove-meta, .podlove-downloads) {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

:where(.podlove-episode-meta, .podlove-meta, .podlove-downloads)
  :where(ul, ol) {
  margin-block: 0;
  padding-inline-start: 1.2rem;
}

:where(.podlove-episode-meta, .podlove-meta, .podlove-downloads)
  :where(li + li) {
  margin-block-start: 0.45rem;
}

:where(.podlove-episode-meta, .podlove-meta, .podlove-downloads) :where(a) {
  text-underline-offset: 0.16em;
}

:where(.podlove-downloads, .podlove-subscribe-button) :where(a, button) {
  align-items: center;
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--primary);
  border-radius: 999px;
  color: var(--wp--preset--color--secondary);
  display: inline-flex;
  min-height: 3.125rem;
  padding-inline: 1.15rem;
  text-decoration: none;
}

:where(.podlove-downloads) :where(a) {
  padding-block: 0.35rem;
}

:where(.podlove-show-notes, .podlove-shownotes, .podlove-transcripts) {
  margin-block: clamp(2rem, 5vw, 4rem);
}

:where(.podlove-show-notes, .podlove-shownotes, .podlove-transcripts)
  :where(h2, h3) {
  border-block-end: 1px solid var(--wp--preset--color--line);
  margin-block-start: var(--wp--preset--spacing--40);
  padding-block-end: 0.35rem;
}

:where(.podlove-show-notes, .podlove-shownotes, .podlove-transcripts)
  :where(ul, ol) {
  padding-inline-start: 1.25rem;
}

:where(.podlove-show-notes, .podlove-shownotes, .podlove-transcripts)
  :where(li) {
  margin-block: 0.45rem;
}

:where(.podlove-show-notes, .podlove-shownotes, .podlove-transcripts)
  :where(a) {
  overflow-wrap: anywhere;
  text-underline-offset: 0.16em;
}

.podlove-contributors-cards {
  color: var(--wp--preset--color--contrast);
  display: grid;
  gap: var(--wp--preset--spacing--30);
}

:where(.podlove-contributors-card, .podlove-contributor) {
  align-items: flex-start;
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line);
  border-block-start: 0.3rem solid var(--wp--preset--color--accent);
  border-radius: 1.25rem;
  display: flex;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.4rem);
}

:where(.podlove-contributors-card, .podlove-contributor) :where(img) {
  border-radius: 999px;
  flex-shrink: 0;
  height: 3.5rem;
  object-fit: cover;
  width: 3.5rem;
}

:where(.podlove-contributor-info, .podlove-contributor-details) {
  flex: 1;
  min-width: 0;
}

:where(.podlove-contributor-info, .podlove-contributor-details)
  :where(ul, ol) {
  list-style: none;
  margin-block: 0.35rem 0;
  padding-inline-start: 0;
}

:where(.podlove-contributors-card, .podlove-contributor) :where(a) {
  text-underline-offset: 0.16em;
}

@media (min-width: 720px) {
  .podlove-contributors-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  :where(.podlove-downloads, .podlove-subscribe-button) :where(a, button) {
    justify-content: center;
    width: 100%;
  }
}
