/* Episode view — aligned with docs/design/after-poddy-spotify-episode-mockup.html */

body.afterpoddy-episode-view {
	--ap-episode-accent: #1ed760;
	--ap-episode-muted: #aaaead;
	--ap-episode-line: rgba(255, 255, 255, 0.1);
	--ap-episode-surface: #1c1c1c;
	--ap-episode-player-h: 99px;
	font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
	letter-spacing: -0.01em;
}

body.afterpoddy-episode-view .afterpoddy-catalog-route,
body.afterpoddy-episode-view .afterpoddy-post-content,
body.afterpoddy-episode-view .afterpoddy-post-content p {
	font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.75;
	color: #f6f6f6;
}

body.afterpoddy-episode-view .afterpoddy-post-content {
	color: #aaaead;
}

body.afterpoddy-episode-view .afterpoddy-post-content p {
	margin: 0 0 1.05em;
}

body.afterpoddy-episode-view .afterpoddy-post-content a {
	color: var(--ap-episode-accent);
}

/* Show tile / eyebrow (parent podcast) */
.afterpoddy-show-byline {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 12px;
}

.afterpoddy-show-byline .afterpoddy-eyebrow {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #b5c9bd;
	margin: 0;
}

.afterpoddy-show-byline__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: #f6f6f6;
	font-size: 14px;
	font-weight: 750;
	text-decoration: none;
	line-height: 1.3;
}

.afterpoddy-show-byline__link:hover {
	text-decoration: underline;
	color: #f6f6f6;
}

.afterpoddy-show-byline__thumb {
	width: 29px;
	height: 29px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
	background: #d5ef4a;
	color: #213a29;
	font-size: 11px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.afterpoddy-episode-stats {
	font-size: 11px;
	color: var(--ap-episode-muted);
	margin: 0 0 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
}

.afterpoddy-episode-stats .dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #657068;
}

/* Inline play row (below hero) */
.afterpoddy-episode-play-wrap {
	width: 100%;
	flex: 1 1 100%;
	order: 99;
}

/* Existing Elementor hero: pull play row full width below cover + title */
.afterpoddy-episode-view .elementor-location-single .e-con:has(.afterpoddy-episode-play-wrap) {
	flex-basis: 100% !important;
	max-width: 100% !important;
	width: 100% !important;
}

.afterpoddy-episode-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0 -34px 8px;
	padding: 24px 34px;
	background: linear-gradient(180deg, #182b22, transparent);
}

.afterpoddy-big-play {
	width: 57px;
	height: 57px;
	border-radius: 50%;
	border: 0;
	display: grid;
	place-items: center;
	background: var(--ap-episode-accent);
	color: #102a18;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
	flex-shrink: 0;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.afterpoddy-big-play:hover {
	transform: scale(1.05);
	background: #3ae67b;
}

.afterpoddy-big-play .fas,
.afterpoddy-sticky-player__play .fas {
	font-size: 22px;
	line-height: 1;
}

.afterpoddy-episode-play-wrap.is-playing .afterpoddy-big-play .icon-play,
.afterpoddy-episode-play-wrap.is-playing .afterpoddy-sticky-player__play .icon-play {
	display: none;
}

.afterpoddy-episode-play-wrap.is-playing .afterpoddy-big-play .icon-pause,
.afterpoddy-episode-play-wrap.is-playing .afterpoddy-sticky-player__play .icon-pause {
	display: block !important;
}

.afterpoddy-sticky-player__center {
	min-width: 0;
}

.afterpoddy-action-label {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ap-episode-muted);
	font-size: 12px;
	font-weight: 650;
	cursor: pointer;
}

.afterpoddy-action-label .fas {
	font-size: 18px;
	line-height: 1;
	width: 23px;
	text-align: center;
}

.afterpoddy-action-label:hover {
	color: #f6f6f6;
}

/* Legacy Elementor share widget (player shortcode includes share). */
.afterpoddy-episode-view .elementor-widget-share-buttons {
	display: none !important;
}

.afterpoddy-episode-view .elementor-widget-share-buttons .elementor-share-btn {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	min-height: auto !important;
	padding: 0 !important;
}

.afterpoddy-episode-view .elementor-widget-share-buttons .elementor-grid {
	display: inline-flex !important;
	gap: 16px !important;
	align-items: center;
}

.afterpoddy-episode-view .elementor-widget-share-buttons .elementor-share-btn__icon {
	width: 23px;
	height: 23px;
	font-size: 23px;
	color: var(--ap-episode-muted) !important;
}

.afterpoddy-episode-view .elementor-widget-share-buttons .elementor-share-btn:hover .elementor-share-btn__icon {
	color: #f6f6f6 !important;
}

.afterpoddy-episode-view .elementor-widget-share-buttons .elementor-share-btn__title {
	display: none !important;
}

/* Hide raw audio control */
.afterpoddy-episode-audio {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Sticky bottom player */
.afterpoddy-sticky-player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100050;
	height: var(--ap-episode-player-h);
	padding: 16px 25px;
	display: grid;
	grid-template-columns: minmax(200px, 1fr) minmax(230px, 1.35fr) minmax(120px, 0.75fr);
	gap: 24px;
	align-items: center;
	background: rgba(7, 7, 7, 0.94);
	border-top: 1px solid var(--ap-episode-line);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.afterpoddy-sticky-player__track {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	border: 0;
	background: none;
	padding: 0;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.afterpoddy-sticky-player__art {
	width: 54px;
	height: 54px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
	background: #e7b39b;
}

.afterpoddy-sticky-player__meta {
	min-width: 0;
}

.afterpoddy-sticky-player__meta strong {
	display: block;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.afterpoddy-sticky-player__meta small {
	display: block;
	font-size: 10px;
	color: var(--ap-episode-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.afterpoddy-sticky-player__controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 22px;
}

.afterpoddy-sticky-player__controls button {
	border: 0;
	background: none;
	color: var(--ap-episode-muted);
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.afterpoddy-sticky-player__controls button:hover {
	color: #f6f6f6;
}

.afterpoddy-sticky-player__play {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #f6f6f6;
	color: #121212;
}

.afterpoddy-sticky-player__play .fas {
	font-size: 14px;
	line-height: 1;
}

.afterpoddy-sticky-player__progress {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 5px;
}

.afterpoddy-sticky-player__progress input[type="range"] {
	flex: 1;
	min-width: 0;
	accent-color: var(--ap-episode-accent);
	height: 3px;
}

.afterpoddy-sticky-player__progress span {
	font-size: 9px;
	color: var(--ap-episode-muted);
	width: 30px;
	flex-shrink: 0;
}

.afterpoddy-sticky-player__progress span:last-child {
	text-align: right;
}

.afterpoddy-sticky-player__extra {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	font-size: 11px;
	color: var(--ap-episode-muted);
}

body.afterpoddy-episode-view #page,
body.afterpoddy-episode-view .site-content,
body.afterpoddy-episode-view .afterpoddy-catalog-route {
	padding-bottom: calc(var(--ap-episode-player-h) + 24px);
}

/* Sidebar rail: hide duplicate podcast tabs; align “More from” rows */
.afterpoddy-episode-view .afterpoddy-episode-rail .afterpoddy-podcast-tabs {
	display: none !important;
}

.afterpoddy-episode-view .afterpoddy-episode-rail .elementor-widget-loop-grid .elementor-loop-container,
.afterpoddy-episode-view .afterpoddy-more-from-loop .elementor-loop-container {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.afterpoddy-episode-view .afterpoddy-more-from-loop .e-loop-item,
.afterpoddy-episode-view .afterpoddy-more-from-loop .e-loop-item > .elementor-element,
.afterpoddy-episode-view .afterpoddy-more-from-loop .elementor-container {
	align-items: flex-start !important;
}

.afterpoddy-episode-view .afterpoddy-more-from-loop .elementor-widget-image {
	align-self: flex-start !important;
}

.afterpoddy-episode-view .afterpoddy-more-from-loop .elementor-widget-image img {
	vertical-align: top;
}

/* BuddyBoss: duplicate menu icons on narrow viewports (icon font + SVG) */
@media (max-width: 980px) {
	#buddypanel .menu-item-icon i._mi ~ svg,
	#buddypanel .menu-item-icon svg + i._mi {
		display: none !important;
	}
}

@media (max-width: 1180px) {
	.afterpoddy-sticky-player {
		grid-template-columns: minmax(150px, 1fr) 1fr;
		gap: 16px;
	}

	.afterpoddy-sticky-player__extra {
		display: none;
	}
}

@media (max-width: 700px) {
	body.afterpoddy-episode-view {
		--ap-episode-player-h: 66px;
	}

	.afterpoddy-episode-actions {
		margin: 0 -20px 8px;
		padding: 4px 20px 24px;
		gap: 22px;
	}

	.afterpoddy-big-play {
		width: 53px;
		height: 53px;
	}

	.afterpoddy-sticky-player {
		left: 8px;
		right: 8px;
		bottom: calc(8px + env(safe-area-inset-bottom, 0px));
		height: auto;
		min-height: 66px;
		border-radius: 7px;
		padding: 10px 11px;
		grid-template-columns: 1fr auto;
		gap: 12px;
		background: rgba(38, 64, 49, 0.94);
	}

	.afterpoddy-sticky-player__progress {
		display: none;
	}

	.afterpoddy-action-label span {
		display: none;
	}

	.afterpoddy-action-label.share-action {
		margin-left: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.afterpoddy-big-play {
		transition: none;
	}
}
