/* ==========================================================================
   Yeats Music — episode pages
   Every podcast and search visitor lands here, not on the homepage, so it has
   to belong to the same white record-store world. Same tokens as the store.
   ========================================================================== */

:root {
	--ep-paper:  #ffffff;
	--ep-paper2: #f8f9fc;
	--ep-paper3: #eff2f7;
	--ep-ink:    #121317;
	--ep-ink2:   #45474d;
	--ep-muted:  #6e7178;
	--ep-line:   rgba(33, 34, 38, .12);
	--ep-line-2: rgba(33, 34, 38, .06);
	--ep-acc:    #0071e3;
	--ep-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
	           "Helvetica Neue", Inter, Arial, sans-serif;
	--ep-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, monospace;
	--ep-expo: cubic-bezier(.19, 1, .22, 1);
}

/* ---- unbox the theme, same as the store does ---- */
body.single-post,
body.archive,
body.blog { background: var(--ep-paper); }

body.single-post .x-root,
body.single-post .site,
body.archive .x-root,
body.archive .site {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	box-shadow: none !important;
	background: var(--ep-paper) !important;
}
body.single-post .x-container.max.width,
body.archive .x-container.max.width {
	max-width: 1280px !important;
	padding: 0 clamp(20px, 5vw, 72px) !important;
}
body.single-post .x-main,
body.archive .x-main { width: 100% !important; float: none !important; }
body.single-post .entry-wrap {
	padding: 0;
	background: transparent;
	box-shadow: none;
	border: 0;
	max-width: 760px;
	margin: 0 auto;
}

/* ---- strip the blog furniture a mix doesn't need ---- */
body.single-post .p-meta,
body.single-post .entry-footer,
body.single-post .x-comments-area,
body.single-post #comments,
body.single-post #respond { display: none !important; }

/* ---- type ---- */
body.single-post,
body.single-post .entry-content,
body.single-post .entry-content p {
	font-family: var(--ep-sans);
	color: var(--ep-ink2);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
body.single-post .entry-title,
body.single-post h1.entry-title {
	font-family: var(--ep-sans) !important;
	font-size: clamp(30px, 4.6vw, 48px) !important;
	font-weight: 450 !important;
	letter-spacing: -.022em !important;
	line-height: 1.05 !important;
	color: var(--ep-ink) !important;
	text-transform: none !important;
	margin: 0 0 14px !important;
	text-wrap: balance;
}
body.single-post .entry-header { border: 0; padding: 0; margin: 0 0 26px; text-align: left; }

/* our own meta line, injected by episode.js */
.ep-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-family: var(--ep-mono);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ep-muted);
	margin: 0;
}
.ep-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--ep-line); display: block; }
.ep-meta a { color: var(--ep-muted); }
.ep-meta a:hover { color: var(--ep-ink); }

/* ---- the cover, with the record peeking out like in the crate ---- */
body.single-post .entry-content .wp-block-image,
body.single-post .entry-content figure {
	position: relative;
	margin: 0 0 28px;
	max-width: 420px;
}
body.single-post .entry-content figure::before {
	content: '';
	position: absolute;
	top: 3%; right: 0;
	width: 94%; aspect-ratio: 1;
	border-radius: 50%;
	z-index: 0;
	background:
		radial-gradient(circle at 50% 50%, var(--ep-paper2) 0 2.3%, transparent 2.6%),
		radial-gradient(circle at 50% 50%, var(--ep-acc) 2.6% 13%, transparent 13.4%),
		repeating-radial-gradient(circle at 50% 50%, #1e1e22 0 1px, #0b0b0d 1px 3px);
	transform: translateX(0);
	transition: transform .8s var(--ep-expo), box-shadow .6s ease;
}
body.single-post .entry-content figure:hover::before {
	transform: translateX(34%);
	box-shadow: 12px 16px 30px rgba(11,11,14,.28);
}
body.single-post .entry-content figure img {
	position: relative;
	z-index: 1;
	width: 100% !important;
	max-width: 420px !important;
	height: auto !important;
	margin: 0 !important;
	border-radius: 4px !important;
	outline: 1px solid var(--ep-line);
	outline-offset: -1px;
	display: block;
}

/* ---- tracklist ----
   An earlier build wrapped these in a <details> accordion. It stays, but it
   opens by default (episode.js) — the tracklist is the main reason someone
   opens a mix, so hiding it behind a click buries the payload. */
body.single-post .entry-content details {
	border: 1px solid var(--ep-line);
	border-radius: 12px;
	background: var(--ep-paper2);
	padding: 4px 18px 10px;
	margin: 0 0 8px;
}
body.single-post .entry-content details summary {
	cursor: pointer;
	list-style: none;
	padding: 12px 0;
	font-family: var(--ep-mono);
	font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
	color: var(--ep-muted);
}
body.single-post .entry-content details summary::-webkit-details-marker { display: none; }
body.single-post .entry-content details[open] summary { border-bottom: 1px solid var(--ep-line); }
body.single-post .entry-content details ol { border-top: 0; }

/* ---- tracklist ---- */
body.single-post .entry-content p strong { color: var(--ep-ink); font-weight: 500; }
body.single-post .entry-content ol {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: ep-t;
	border-top: 1px solid var(--ep-line);
}
body.single-post .entry-content ol li {
	counter-increment: ep-t;
	display: flex;
	gap: 14px;
	padding: 11px 2px;
	border-bottom: 1px solid var(--ep-line-2);
	font-size: 15px;
	line-height: 1.45;
	color: var(--ep-ink2);
	margin: 0;
}
body.single-post .entry-content ol li::before {
	content: counter(ep-t, decimal-leading-zero);
	flex: none;
	font-family: var(--ep-mono);
	font-size: 11px;
	color: var(--ep-muted);
	padding-top: 3px;
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Player — MediaElement's own markup, restyled rather than replaced.
   It was a bare 30px grey strip sitting above the title; episode.js moves it
   under the cover and this makes it look like the deck's transport.
   ========================================================================== */
/* The theme sizes these wrappers to MEJS's original 30px bar. The player
   below is 60px, so without this the player overflows its own container and
   collides with whatever follows. */
body.single-post .x-audio.player,
body.single-post .entry-featured {
	margin: 0 0 30px;
	background: transparent;
	height: auto !important;
	min-height: 60px;
	overflow: visible !important;
}

body.single-post .mejs-container,
body.single-post .mejs-container .mejs-controls {
	height: 60px !important;
	background: var(--ep-paper2) !important;
	border: 1px solid var(--ep-line);
	border-radius: 999px;
	overflow: hidden;
}
body.single-post .mejs-container .mejs-controls { border: 0; }
body.single-post .mejs-container { max-width: 560px; }

body.single-post .mejs-controls .mejs-button > button {
	background-color: var(--ep-ink) !important;
	background-image: none !important;
	border-radius: 50%;
	width: 38px; height: 38px;
	margin: 11px 6px 11px 11px;
	position: relative;
	transition: transform .2s var(--ep-expo), background-color .15s ease-out;
}
body.single-post .mejs-controls .mejs-button > button:hover { transform: scale(1.06); background-color: #26272e !important; }
/* draw our own glyphs — MEJS ships a sprite sheet that doesn't match */
body.single-post .mejs-controls .mejs-playpause-button > button::after {
	content: '';
	position: absolute; top: 50%; left: 50%;
	transform: translate(-42%, -50%);
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent #fff;
}
body.single-post .mejs-controls .mejs-pause > button::after {
	border: 0;
	width: 9px; height: 11px;
	transform: translate(-50%, -50%);
	background: linear-gradient(90deg, #fff 0 3px, transparent 3px 6px, #fff 6px 9px);
}
body.single-post .mejs-controls .mejs-time {
	color: var(--ep-muted) !important;
	font-family: var(--ep-mono) !important;
	font-size: 11.5px !important;
	font-variant-numeric: tabular-nums;
	padding-top: 24px !important;
}
body.single-post .mejs-controls .mejs-time-rail { padding-top: 25px !important; }
body.single-post .mejs-controls .mejs-time-total,
body.single-post .mejs-controls .mejs-time-buffering,
body.single-post .mejs-controls .mejs-time-loaded {
	height: 4px !important;
	border-radius: 999px !important;
	background: rgba(33,34,38,.11) !important;
}
body.single-post .mejs-controls .mejs-time-current {
	height: 4px !important;
	border-radius: 999px !important;
	background: var(--ep-ink) !important;
}
body.single-post .mejs-controls .mejs-time-handle-content { border-color: var(--ep-ink) !important; }
body.single-post .mejs-controls .mejs-horizontal-volume-total { background: rgba(33,34,38,.11) !important; }
body.single-post .mejs-controls .mejs-horizontal-volume-current { background: var(--ep-ink) !important; }

/* ==========================================================================
   Keep listening — prev/next + back to the crate (injected by PHP)
   ========================================================================== */
.ep-more {
	max-width: 760px;
	margin: 48px auto 0;
	padding-top: 30px;
	border-top: 1px solid var(--ep-line);
}
.ep-more-head {
	font-family: var(--ep-mono);
	font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
	color: var(--ep-muted);
	margin: 0 0 16px;
}
.ep-adj { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ep-adj a {
	display: flex; align-items: center; gap: 14px;
	padding: 12px;
	border: 1px solid var(--ep-line);
	border-radius: 12px;
	background: var(--ep-paper2);
	text-decoration: none;
	transition: background .15s ease-out, border-color .15s ease-out, transform .25s var(--ep-expo);
	min-width: 0;
}
.ep-adj a:hover { background: var(--ep-paper); border-color: #c8ccd3; transform: translateY(-2px); }
.ep-adj a.ep-next { flex-direction: row-reverse; text-align: right; }
body.single-post .entry-content .ep-adj img,
body.single-post .ep-adj img {
	width: 54px !important;
	height: 54px !important;
	max-width: 54px !important;
	min-width: 54px;
	border-radius: 4px !important;
	object-fit: cover;
	flex: none;
	display: block;
	margin: 0 !important;
	outline: 1px solid var(--ep-line);
	outline-offset: -1px;
}
.ep-adj-txt { min-width: 0; }
.ep-adj-dir {
	display: block;
	font-family: var(--ep-mono); font-size: 10px; letter-spacing: .14em;
	text-transform: uppercase; color: var(--ep-muted); margin-bottom: 3px;
}
.ep-adj-title {
	display: block;
	font-size: 14.5px; font-weight: 500; letter-spacing: -.012em; color: var(--ep-ink);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-back { text-align: center; margin-top: 28px; }
.ep-back a {
	display: inline-block;
	font-size: 14.5px; font-weight: 450;
	padding: 11px 24px;
	border-radius: 999px;
	background: var(--ep-ink);
	color: #fff !important;
	text-decoration: none;
	transition: background .15s ease-out, transform .25s var(--ep-expo);
}
.ep-back a:hover { background: #26272e; transform: translateY(-2px); }

@media (max-width: 640px) {
	body.single-post .entry-content figure,
	body.single-post .entry-content figure img { max-width: 100% !important; }
	.ep-adj { grid-template-columns: 1fr; }
	.ep-adj a.ep-next { flex-direction: row; text-align: left; }
	body.single-post .mejs-container { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .entry-content figure::before { transition: none; }
}
