/**
 * HTML5 podcast player styles (works without custom elements / JS).
 */

.pg-html-player {
	--pg-bg: #fff;
	--pg-fg: #1d2327;
	--pg-muted: #646970;
	--pg-accent: #890620;
	--pg-border: #dcdcde;
	--pg-radius: 10px;

	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 8px 0 0;
	padding: 12px;
	background: var(--pg-bg);
	color: var(--pg-fg);
	border: 1px solid var(--pg-border);
	border-radius: var(--pg-radius);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	overflow: visible;
}

.pg-html-player *,
.pg-html-player *::before,
.pg-html-player *::after {
	box-sizing: border-box;
}

.pg-html-player__row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-width: 0;
	margin-bottom: 10px;
}

.pg-html-player__art {
	width: 64px;
	height: 64px;
	flex: 0 0 64px;
	border-radius: 8px;
	object-fit: cover;
	background: #f0f0f1;
}

.pg-html-player__art--placeholder {
	background: linear-gradient(135deg, #f0f0f1 0%, #dcdcde 100%);
}

.pg-html-player__body {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

.pg-html-player__title {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.35;
}

.pg-html-player__audio {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: 40px;
	margin: 0;
	/* Prevent native control chrome from spilling past the card */
	overflow: hidden;
}

.pg-html-player--video .pg-html-player__title {
	margin-bottom: 10px;
	white-space: normal;
}

.pg-html-player__video {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: auto;
	max-height: 70vh;
	margin: 0;
	background: #000;
	border-radius: 8px;
	aspect-ratio: 16 / 9;
	object-fit: contain;
}

.pg-html-player__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}

.pg-html-player__link,
.pg-html-player__share {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--pg-accent);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
}

.pg-html-player__link:hover,
.pg-html-player__share:hover {
	text-decoration: underline;
}

.pg-html-player--compact,
.pg-html-player--playlist {
	padding: 10px;
}

.pg-html-player--compact .pg-html-player__art,
.pg-html-player--playlist .pg-html-player__art {
	width: 48px;
	height: 48px;
	flex-basis: 48px;
}

.pg-html-player--compact .pg-html-player__title,
.pg-html-player--playlist .pg-html-player__title {
	font-size: 13px;
}

.pg-html-player--compact .pg-html-player__row,
.pg-html-player--playlist .pg-html-player__row {
	margin-bottom: 8px;
}

.pg-html-player--sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	border-radius: 0;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
}

/* Bare player for theme single episode pages: media only + gap below. */
.pg-html-player--bare {
	margin: 0 0 24px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.pg-html-player--bare .pg-html-player__video {
	border-radius: 0;
	max-height: none;
}

.pg-html-player--bare .pg-html-player__audio {
	margin: 0;
}

.pg-episode-list__item .pg-html-player,
.pg-playlist__item .pg-html-player {
	margin-top: 8px;
}

.pg-player-chrome__subscribe {
	margin-top: 6px;
}

.pg-player-chrome__subscribe a {
	font-size: 12px;
	font-weight: 600;
	color: var(--pg-accent, #890620);
	text-decoration: none;
}

.pg-player-missing {
	margin: 8px 0 0;
	padding: 8px 10px;
	font-size: 12px;
	line-height: 1.4;
	color: #b32d2e;
	background: #fcf0f1;
	border-left: 3px solid #d63638;
	border-radius: 4px;
}
