/**
 * BPN public promo card + sticky dock (URL-gated test).
 * Dock IDs/classes must stay compatible with /js/bpn-feed-embed.js.
 */

.bpn-episode-list {
  margin: var(--bww-space-5) 0;
}

.bpn-episode-list--rail {
  --bpn-rail-accent: #c2e812;
  --bpn-rail-bg: #f4fad4;
  --bpn-rail-border: #c2e812;
  margin: 0 0 var(--bww-space-3);
  padding: var(--bww-space-3);
  border: 2px solid var(--bpn-rail-border);
  border-radius: var(--bww-radius-md);
  background: var(--bpn-rail-bg);
  box-shadow: 0 4px 14px rgba(194, 232, 18, 0.22);
}

:root[data-bww-theme="dark"] .bpn-episode-list--rail,
[data-bww-theme="dark"] .bpn-episode-list--rail {
  --bpn-rail-bg: #1c2610;
  --bpn-rail-border: #c2e812;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.bpn-episode-list__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bww-space-2);
  margin: 0 0 var(--bww-space-2);
  padding: 0 0 var(--bww-space-2);
  border-bottom: 1px solid rgba(22, 22, 26, 0.12);
}

:root[data-bww-theme="dark"] .bpn-episode-list__heading,
[data-bww-theme="dark"] .bpn-episode-list__heading {
  border-bottom-color: rgba(194, 232, 18, 0.28);
}

.bpn-episode-list__kicker {
  margin: 0;
  min-width: 0;
  font-size: var(--bww-text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bww-text);
  line-height: 1.3;
}

.bpn-episode-list__brand {
  display: block;
  height: 18px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  flex: 0 0 auto;
  background: #0b0b0d;
  border-radius: 3px;
  padding: 3px 5px;
  box-sizing: content-box;
}

.bpn-episode-list__featured {
  display: flex;
  align-items: center;
  gap: var(--bww-space-3);
  min-width: 0;
}

.bpn-episode-list__poster {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: var(--bww-radius-sm);
  background: var(--bww-surface-muted);
  cursor: pointer;
  overflow: hidden;
}

.bpn-episode-list__poster:focus-visible {
  outline: 2px solid var(--bww-focus-ring-color);
  outline-offset: 2px;
}

.bpn-episode-list__art {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.bpn-episode-list__art--empty {
  display: block;
}

.bpn-episode-list__play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  background: #c2e812;
  color: #16161a;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.bpn-episode-list__play-badge::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}

.bpn-embed-play[aria-pressed="true"] .bpn-episode-list__play-badge {
  background: var(--bww-text);
  color: var(--bww-surface);
}

.bpn-embed-play[aria-pressed="true"] .bpn-episode-list__play-badge::before {
  left: 9px;
  top: 8px;
  width: 10px;
  height: 12px;
  border: 0;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
  box-sizing: border-box;
}

.bpn-episode-list__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.bpn-episode-list__title {
  margin: 0;
  font-size: var(--bww-text-sm);
  font-weight: 700;
  line-height: 1.3;
}

.bpn-episode-list__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--bww-text);
}

.bpn-episode-list__title a:hover,
.bpn-episode-list__title a:focus-visible {
  color: var(--bww-red);
}

.bpn-episode-list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 2px 0 0;
  font-size: var(--bww-text-xs);
  color: var(--bww-text-muted);
}

.bpn-episode-list__podcast {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.bpn-episode-list__duration {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.bpn-episode-list__more {
  margin-top: var(--bww-space-2);
  border-top: 1px solid var(--bww-surface-border);
  padding-top: var(--bww-space-2);
}

.bpn-episode-list--rail .bpn-episode-list__more {
  border-top-color: rgba(22, 22, 26, 0.12);
}

:root[data-bww-theme="dark"] .bpn-episode-list--rail .bpn-episode-list__more,
[data-bww-theme="dark"] .bpn-episode-list--rail .bpn-episode-list__more {
  border-top-color: rgba(194, 232, 18, 0.28);
}

.bpn-episode-list__more-summary {
  cursor: pointer;
  font-size: var(--bww-text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bww-text-muted);
  list-style: none;
}

.bpn-episode-list__more-summary::-webkit-details-marker {
  display: none;
}

.bpn-episode-list__item {
  display: flex;
  align-items: center;
  gap: var(--bww-space-2);
  padding: var(--bww-space-2) 0;
  border-bottom: 1px solid var(--bww-surface-border);
  min-width: 0;
}

.bpn-episode-list__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.bpn-episode-list__icon-play {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.bpn-episode-list__icon-play .bpn-episode-list__play-badge {
  width: 22px;
  height: 22px;
  box-shadow: none;
}

.bpn-episode-list__icon-play .bpn-episode-list__play-badge::before {
  left: 9px;
  top: 6px;
  border-width: 5px 0 5px 8px;
}

.bpn-episode-list__item-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.bpn-episode-list__item-title {
  margin: 0;
  font-size: var(--bww-text-xs);
  font-weight: 600;
  line-height: 1.3;
}

.bpn-episode-list__item-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--bww-text);
}

.bpn-episode-list__item-title a:hover,
.bpn-episode-list__item-title a:focus-visible {
  color: var(--bww-red);
}

.bpn-episode-list__item-podcast {
  margin: 2px 0 0;
  font-size: var(--bww-text-xs);
  color: var(--bww-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bpn-episode-list__poster:hover .bpn-episode-list__play-badge,
.bpn-episode-list__icon-play:hover .bpn-episode-list__play-badge {
  transform: translate(-50%, -50%) scale(1.08);
}

.bpn-embed-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10070;
  background: var(--bww-surface);
  border-top: 1px solid var(--bww-surface-border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
  padding: 0.75rem 1rem 0.85rem;
  color: var(--bww-text);
}

.bpn-embed-dock[hidden] {
  display: none !important;
}

.bpn-embed-dock__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.bpn-embed-dock__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: min(280px, 100%);
  flex: 0 1 320px;
}

.bpn-embed-dock__art {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--bww-surface-muted);
}

.bpn-embed-dock__text {
  min-width: 0;
  flex: 1;
}

.bpn-embed-dock__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--bww-text);
}

.bpn-embed-dock__podcast {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bpn-embed-dock__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.bpn-embed-dock__status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bww-success-text);
}

.bpn-embed-dock__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  background: #0b0b0d;
  border: 1px solid #0b0b0d;
  line-height: 0;
  text-decoration: none;
}

.bpn-embed-dock__brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}

.bpn-embed-dock__close {
  border: 1px solid var(--bww-surface-border);
  background: var(--bww-surface-muted);
  color: var(--bww-text);
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.bpn-embed-dock__ad {
  flex: 0 0 auto;
  width: 320px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box;
  border: 1px dashed var(--bww-surface-border);
  border-radius: 4px;
  background: repeating-linear-gradient(-45deg, var(--bww-surface-muted), var(--bww-surface-muted) 6px, var(--bww-bg-panel) 6px, var(--bww-bg-panel) 12px);
  color: var(--bww-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
}

.bpn-embed-dock__player {
  flex: 1 1 360px;
  min-width: min(300px, 100%);
}

.bpn-embed-dock__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.bpn-embed-dock__play {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #c2e812;
  color: #16161a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.bpn-embed-dock__play-icon::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}

.bpn-embed-dock__play--paused .bpn-embed-dock__play-icon::before {
  width: 10px;
  height: 12px;
  border: 0;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
  margin-left: 0;
  background: transparent;
  box-sizing: border-box;
}

.bpn-embed-dock__skip {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bww-text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.bpn-embed-dock__scrub {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.bpn-embed-dock__range {
  flex: 1 1 auto;
  min-width: 40px;
  height: 4px;
  accent-color: var(--bww-text);
}

.bpn-embed-dock__time {
  flex: 0 0 auto;
  font-size: 0.75rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.bpn-embed-dock__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body.bpn-embed-dock-active {
  padding-bottom: 140px;
}

body.bpn-embed-dock-active #foxsocial .mobile-sticky-bar,
body.bpn-embed-dock-active .bww-article-audio__sticky {
  display: none !important;
}

@media (max-width: 960px) {
  .bpn-embed-dock__ad {
    display: none;
  }
}

@media (max-width: 720px) {
  .bpn-embed-dock__meta,
  .bpn-embed-dock__player {
    flex: 1 1 100%;
  }
  .bpn-embed-dock__skip {
    display: none;
  }
}
