/* IMH Podcast — front-end styles */

/* ── Archive ───────────────────────────────────────────────────────────── */

.imh-podcast-archive {
	max-width: 900px;
	margin: 0 auto;
	padding: 2em 1em;
}

.imh-archive-header {
	margin-bottom: 1.5em;
}

.imh-archive-title {
	margin: 0;
}

/* Filter bar */
.imh-filter-bar {
	background: #f7f7f7;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 1em 1.25em;
	margin-bottom: 2em;
}

.imh-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: flex-end;
}

.imh-filter-group {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.imh-filter-group label {
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #555;
}

.imh-filter-select,
.imh-filter-search input {
	padding: 0.4em 0.6em;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 0.95em;
}

.imh-filter-search input {
	min-width: 180px;
}

.imh-filter-actions {
	display: flex;
	gap: 0.5em;
	align-items: flex-end;
	padding-bottom: 0;
}

/* Buttons */
.imh-btn {
	display: inline-block;
	padding: 0.45em 1em;
	border-radius: 3px;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	border: none;
	line-height: 1.4;
}

.imh-btn-primary {
	background: #2c6e49;
	color: #fff;
}

.imh-btn-primary:hover {
	background: #1e4d33;
	color: #fff;
}

.imh-btn-secondary {
	background: #e0e0e0;
	color: #333;
}

.imh-btn-secondary:hover {
	background: #ccc;
}

.imh-btn-disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

/* Episode cards */
.imh-episode-list {
	display: flex;
	flex-direction: column;
	gap: 1.25em;
}

.imh-episode-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1em 1.25em;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
	gap: 1em;
}

.imh-card-title {
	margin: 0 0 0.3em;
}

.imh-card-title a {
	text-decoration: none;
	color: inherit;
}

.imh-card-title a:hover {
	text-decoration: underline;
}

.imh-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	font-size: 0.85em;
	color: #666;
	align-items: center;
}

.imh-card-link {
	flex-shrink: 0;
	font-size: 0.85em;
	font-weight: 600;
	padding: 0.35em 0.75em;
	border: 1px solid #2c6e49;
	border-radius: 3px;
	color: #2c6e49;
	text-decoration: none;
	white-space: nowrap;
}

.imh-card-link:hover {
	background: #2c6e49;
	color: #fff;
}

/* Type badge */
.imh-type-badge {
	display: inline-block;
	padding: 0.15em 0.5em;
	border-radius: 2px;
	font-size: 0.78em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: #e8f0e9;
	color: #2c6e49;
}

.imh-type-badge--sangha-share {
	background: #e8eaf0;
	color: #3a3a7c;
}

/* Pagination */
.imh-pagination {
	margin-top: 2em;
	text-align: center;
}

.imh-pagination ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.25em;
}

.imh-pagination ul li {
	display: inline-flex;
}

.imh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2em;
	padding: 0.35em 0.6em;
	border: 1px solid #ccc;
	border-radius: 3px;
	text-decoration: none;
	color: #333;
	line-height: 1;
}

.imh-pagination .page-numbers.current {
	background: #2c6e49;
	color: #fff;
	border-color: #2c6e49;
}

.imh-pagination .page-numbers:not(.current):hover {
	background: #f0f0f0;
}

.imh-no-results {
	padding: 2em;
	text-align: center;
	color: #666;
}

/* AJAX loading state */
.imh-episode-list.imh-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* ── Single episode ────────────────────────────────────────────────────── */

.imh-single-episode {
	max-width: 780px;
	margin: 0 auto;
	padding: 2em 1em;
}

.imh-episode-header {
	margin-bottom: 1.5em;
}

.imh-episode-breadcrumb {
	margin-bottom: 0.75em;
	font-size: 0.875em;
}

.imh-episode-breadcrumb a {
	text-decoration: none;
	opacity: 0.7;
}

.imh-episode-breadcrumb a:hover {
	opacity: 1;
	text-decoration: underline;
}

.imh-episode-title {
	margin: 0 0 0.5em;
}

.imh-episode-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	align-items: center;
	font-size: 0.9em;
	color: #555;
}

.imh-meta-authors a {
	color: inherit;
	font-weight: 600;
}

/* Player */
.imh-episode-player {
	margin-bottom: 1.5em;
}

.imh-episode-player iframe {
	display: block;
	width: 100%;
}

.imh-no-player {
	background: #f7f7f7;
	border: 1px dashed #ccc;
	padding: 1.5em;
	text-align: center;
	color: #999;
}

/* Description */
.imh-episode-description {
	margin-bottom: 1.5em;
	line-height: 1.7;
}

/* Topic pills */
.imh-episode-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-bottom: 2em;
}

.imh-topic-pill {
	display: inline-block;
	padding: 0.2em 0.7em;
	border-radius: 20px;
	font-size: 0.82em;
	font-weight: 600;
	background: #e8f0e9;
	color: #2c6e49;
	text-decoration: none;
}

.imh-topic-pill:hover {
	background: #2c6e49;
	color: #fff;
}

/* Transcript */
.imh-transcript-section {
	margin-bottom: 2em;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.imh-transcript-toggle {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 0.75em 1em;
	background: #f7f7f7;
	border: none;
	cursor: pointer;
	font-size: 0.95em;
	font-weight: 600;
	text-align: left;
	gap: 0.5em;
}

.imh-transcript-toggle:hover {
	background: #eee;
}

.imh-transcript-body {
	padding: 1em 1.25em;
	background: #fff;
}

.imh-transcript-text {
	font-size: 0.9em;
	line-height: 1.8;
	max-height: 400px;
	overflow-y: auto;
}

/* Related episodes */
.imh-related-episodes,
.imh-more-from-author {
	margin-bottom: 2.5em;
}

.imh-related-episodes h2,
.imh-more-from-author h2 {
	margin-bottom: 0.75em;
}

.imh-episode-cards {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

/* Author card */
.imh-author-section {
	margin-bottom: 2.5em;
}

.imh-author-card {
	display: flex;
	gap: 1.25em;
	align-items: flex-start;
	padding: 1.25em;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fafafa;
}

.imh-author-photo {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
}

.imh-author-photo img {
	display: block;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
}

.imh-author-name {
	margin: 0 0 0.2em;
}

.imh-author-name a {
	text-decoration: none;
	color: inherit;
}

.imh-author-role {
	font-size: 0.85em;
	color: #666;
	margin: 0 0 0.5em;
}

.imh-author-bio {
	font-size: 0.9em;
	line-height: 1.6;
	margin: 0 0 0.75em;
}

.imh-author-links {
	display: flex;
	gap: 1em;
	font-size: 0.85em;
	font-weight: 600;
}

.imh-author-links a {
	color: #2c6e49;
	text-decoration: none;
}

.imh-author-links a:hover {
	text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.imh-filter-form {
		flex-direction: column;
		align-items: stretch;
	}

	.imh-filter-group {
		width: 100%;
	}

	.imh-filter-select,
	.imh-filter-search input {
		width: 100%;
		box-sizing: border-box;
	}

	.imh-filter-actions {
		width: 100%;
	}

	.imh-filter-actions .imh-btn {
		flex: 1;
		text-align: center;
	}

	.imh-episode-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.imh-author-card {
		flex-direction: column;
	}
}

/* ── Subscribe links block ─────────────────────────────────────────────── */

.imh-subscribe-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: center;
	padding-bottom: 2em;
}

.imh-subscribe-links h2 {
	margin-bottom: 1.8em;
}

.imh-subscribe-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.5em 1.25em;
	border-radius: 4px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.15s ease;
	color: #fff;
}

.imh-subscribe-badge:hover {
	opacity: 0.85;
	color: #fff;
}

.imh-subscribe-apple   { background: #000; }
.imh-subscribe-spotify { background: #1db954; }
.imh-subscribe-rss     { background: #f26522; }

.imh-subscribe-notice {
	color: #666;
	font-style: italic;
}

/* Sync log status badges */
.imh-log-status {
	font-weight: 600;
}

.imh-log-status--success { color: #2c6e49; }
.imh-log-status--error   { color: #b32d2e; }

/* Episode list admin column */
.imh-col-warning { color: #b32d2e; }
