/* SPYR Podcasts — front-end styles. Neutral and theme-friendly.

   Icon rows and the cover art read their size, spacing, and colors from CSS
   variables. Context rules (the episode header, the subscribe band) set the
   defaults; the block's own settings arrive as inline variables on the block
   wrapper, which sits closer to the icons and therefore wins. */

.spyr-pod-player {
	margin: 1.5em 0;
}
.spyr-pod-yt {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
}
.spyr-pod-facade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	padding: 0;
	cursor: pointer;
	background-size: cover;
	background-position: center;
}
/* YouTube-red so the lazy facade reads as the real player. */
.spyr-pod-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate( -50%, -50% );
	background: #f00;
	border-radius: 12px;
	z-index: 1;
	transition: filter 0.15s ease;
}
.spyr-pod-facade:hover .spyr-pod-play {
	filter: brightness( 1.1 );
}
.spyr-pod-play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -40%, -50% );
	border-style: solid;
	border-width: 11px 0 11px 19px;
	border-color: transparent transparent transparent #fff;
}
.spyr-pod-iframe,
.spyr-pod-yt iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
/* iOS-only "tap to play" hint over a cued video. Non-interactive so the tap
   passes through to the player's own play button. */
.spyr-pod-taphint {
	position: absolute;
	left: 50%;
	bottom: 12px;
	transform: translateX( -50% );
	z-index: 2;
	pointer-events: none;
	background: rgba( 0, 0, 0, 0.78 );
	color: #fff;
	font-size: 13px;
	line-height: 1;
	padding: 8px 12px;
	border-radius: 999px;
	white-space: nowrap;
	animation: spyr-pod-hint-in 0.2s ease;
}
.spyr-pod-taphint::before {
	content: "\25B6";
	margin-right: 6px;
	font-size: 10px;
}
@keyframes spyr-pod-hint-in {
	from { opacity: 0; transform: translate( -50%, 6px ); }
	to   { opacity: 1; transform: translate( -50%, 0 ); }
}
.spyr-pod-audio audio {
	width: 100%;
}

/* The Latest Episode block: the newest episode's player with the compact
   audio row under it. The wrapper owns the rhythm, so no outer margins. */
.wp-block-spyr-latest-episode .spyr-pod-player {
	margin: 0;
}
.wp-block-spyr-latest-episode .spyr-pod-spotify-compact {
	margin-top: 0.75em;
}

.spyr-pod-subscribe {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em;
	margin: 1em 0;
	--spyr-icon-size: 36px;
	--spyr-icon-gap: 14px;
}
.spyr-pod-subscribe-label {
	font-family: Roboto, Lato, Arial, sans-serif;
	font-size: 0.72em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.55;
}

/* Watch or Listen: centered label with a row of icon-only platform links. */
.spyr-pod-listen {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6em;
	margin: 1.25em 0;
	text-align: center;
}
.spyr-pod-listen-label {
	font-weight: 600;
	opacity: 0.55;
	font-size: 0.72em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.spyr-pod-listen-icons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var( --spyr-icon-gap, 0.9em );
}
.spyr-pod-listen-link {
	display: inline-flex;
	position: relative;
	text-decoration: none;
	color: var( --spyr-icon-color, inherit );
	opacity: 0.85;
	transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.spyr-pod-listen-link:hover {
	color: var( --spyr-icon-hover, var( --spyr-icon-color, inherit ) );
	opacity: 1;
	transform: translateY(-1px);
}
.spyr-pod-listen-link .spyr-pod-icon {
	width: var( --spyr-icon-size, 2em );
	height: var( --spyr-icon-size, 2em );
}

.spyr-pod-icon {
	width: 1.1em;
	height: 1.1em;
	flex: none;
	fill: currentColor;
}
.spyr-pod-platform-label {
	line-height: 1;
}

/* Episode header: the split-block unit the template builds — cover art and
   the platform icons left, the date right, a Separator block, then the
   people. The groups carry these classes; the blocks inside inherit the
   header's type treatment and icon sizing. */
.spyr-pod-header {
	display: flex;
	flex-direction: column;
	gap: 1em;
	margin: 1.5em 0 2em;
	padding: 0;
	border: none;
	font-family: Roboto, Lato, Arial, sans-serif;
	font-size: 15px;
	--spyr-icon-size: 27px;
	--spyr-icon-gap: 14px;
}
.spyr-pod-header > * {
	margin: 0;
}
.spyr-pod-header-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em 1.5em;
}
.spyr-pod-header-left {
	display: flex;
	align-items: center;
	gap: 1em;
	min-width: 0;
}
.spyr-pod-header-date {
	font-weight: 700;
	font-size: 0.95em;
	opacity: 0.8;
	margin-left: auto;
	white-space: nowrap;
}
.spyr-pod-header .spyr-pod-people {
	margin: 0;
}

/* Cover art: square, sized by the block's width setting (64px unset). The
   block wrapper carries the border/radius supports; the image inherits the
   radius so a rounded border clips the art with it. */
.wp-block-spyr-episode-cover {
	border-radius: 8px;
	line-height: 0;
}
.wp-block-spyr-episode-cover img {
	border-radius: inherit;
}
.spyr-pod-header-cover {
	width: var( --spyr-cover-width, 64px );
	height: auto;
	aspect-ratio: 1 / 1;
	flex: none;
	border-radius: 8px;
	object-fit: cover;
	display: block;
}
.spyr-pod-header-cover-link {
	flex: none;
	line-height: 0;
}

/* Breadcrumbs: Home » Show » Episode N. */
.spyr-pod-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	font-family: Roboto, Lato, Arial, sans-serif;
	font-size: 13px;
	gap: 3px;
	margin-bottom: 0.75em;
	opacity: 0.8;
}
.spyr-pod-crumbs a {
	text-decoration: underline;
	text-underline-offset: 2px;
}
.spyr-pod-crumb-sep {
	opacity: 0.5;
}

/* Episode credits: Hosts / Guests / Producers with avatars. */
.spyr-pod-people {
	margin: 2em 0;
}
.spyr-pod-people-group {
	margin-bottom: 1.25em;
}
.spyr-pod-people-row {
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
	gap: 0.25em 3em;
	align-items: start;
}
.spyr-pod-person {
	display: flex;
	align-items: center;
	gap: 0.7em;
	min-width: 0;
}
.spyr-pod-person-photo {
	width: 44px;
	height: 44px;
	flex: none;
	display: block;
	border-radius: 50%;
	object-fit: cover;
}
.spyr-pod-person-initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1em;
	opacity: 0.75;
}
.spyr-pod-person-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.spyr-pod-person-name {
	font-weight: 700;
	font-size: 1em;
	line-height: 1.2;
}
.spyr-pod-person-name a,
.spyr-pod-person-photo-link {
	text-decoration: none;
}
.spyr-pod-person-role {
	font-size: 0.72em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.6;
	margin: 0;
	line-height: 1;
}
/* The compact Spotify audio row that rides under the video. */
.spyr-pod-spotify-compact {
	margin-top: 0.75em;
	margin-bottom: 0;
}

/* Editor-preview cover stand-ins: same size as the real images, neutral fill.
   Everything else in editor previews uses the real front-end markup. */
.spyr-pod-ph-cover {
	display: inline-block;
	background: rgba( 128, 128, 128, 0.25 );
}
/* The compact audio row's footprint in the Latest Episode preview. */
.spyr-pod-ph-audio {
	display: block;
	width: 100%;
	height: 152px;
	border-radius: 12px;
}

/* Visually hidden but available to screen readers (icon-only link names). */
.spyr-pod-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* The transcript is prose: font, size, line-height, and paragraph rhythm all
   come from the theme. We only own the layout (spacing between turns) and the
   metadata (timecode, speaker). */
.spyr-pod-transcript {
	margin: 2em 0;
}
/* Title + woven chapter headings are real h2/h3 — let the theme style them.
   We only add a little top separation to the chapter headings since they sit
   mid-transcript rather than standing alone. */
.spyr-pod-chapter-head {
	margin-top: 1.5em;
	scroll-margin-top: 90px; /* clear of sticky headers when jumped to */
}
/* Brief highlight when a chapter title jumps to its transcript heading. */
.spyr-pod-flash {
	animation: spyr-pod-flash 1.4s ease;
}
@keyframes spyr-pod-flash {
	0%, 100% { background: transparent; }
	18% { background: rgba( 255, 214, 102, 0.45 ); }
}
.spyr-pod-turn {
	margin: 0 0 1.5em;
}
/* Timestamp and speaker stack on their own lines above the text. */
.spyr-pod-turn-head {
	margin: 0 0 0.25em;
}
.spyr-pod-ts {
	display: block;
	font-variant-numeric: tabular-nums;
	opacity: 0.5;
	font-size: 0.8em;
	letter-spacing: 0.02em;
}
button.spyr-pod-ts,
a.spyr-pod-ts {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font-family: inherit;
	cursor: pointer;
	text-align: left;
	color: inherit;
	text-decoration: none;
}
button.spyr-pod-ts:hover,
a.spyr-pod-ts:hover {
	opacity: 0.9;
	text-decoration: underline;
}
/* Chapters stack the timecode above the title, like transcript turns. */
.spyr-pod-chapter {
	margin: 0 0 0.9em;
}
.spyr-pod-chapter .spyr-pod-ts {
	display: block;
	margin-bottom: 0.1em;
	line-height: 1;
}
.spyr-pod-chapter-title {
	display: block;
}
.spyr-pod-chapter-jump {
	text-decoration: none;
}
.spyr-pod-speaker {
	display: block;
	font-weight: 700;
}
/* Body text: a plain paragraph. Typography (size, line-height, margins) is the
   theme's. We only trim the last paragraph's bottom gap so it doesn't stack
   with the turn spacing. */
.spyr-pod-turn-text:last-child {
	margin-bottom: 0;
}

.spyr-pod-chapters {
	margin: 1.5em 0;
}
.spyr-pod-chapters ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.spyr-pod-chapters li {
	margin: 1em 0;
}

/* The episode list's load-as-you-scroll sentinel: invisible until a fetch is
   running, then a small spinner. */
.spyr-pod-loadmore {
	display: flex;
	justify-content: center;
	padding: 0.5em 0;
	min-height: 1px;
}
.spyr-pod-loadmore::after {
	content: "";
	width: 22px;
	height: 22px;
	border: 2px solid rgba( 128, 128, 128, 0.35 );
	border-top-color: currentColor;
	border-radius: 50%;
	opacity: 0;
}
.spyr-pod-loadmore.is-loading::after {
	opacity: 1;
	animation: spyr-pod-spin 0.7s linear infinite;
}
@keyframes spyr-pod-spin {
	to { transform: rotate( 360deg ); }
}

/* Term links inside transcripts */
.spyr-pod-term {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Episode number pill ("Episode 326"). */
.spyr-pod-ep-num {
	display: inline-block;
	border: 1px solid currentColor;
	border-radius: 999px;
	padding: 0.2em 0.75em;
	font-size: 0.7em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.85;
	white-space: nowrap;
}
