/**
 * Podcast Audio Player widget.
 *
 * Layout matches the Figma design (node 335:1110): a white card with a circular
 * thumbnail on the left and, on the right, the episode number + title above a
 * custom audio-control row (play button, current time, progress scrubber,
 * duration, optional volume).
 *
 * Themeable colors are exposed as CSS vars set by the Elementor Style controls:
 *   --tc-pc-accent  play button + scrubber thumb
 *   --tc-pc-fill    progress fill
 *   --tc-pc-track   progress track
 */

.tc-podcast {
	--tc-pc-accent: #41a541;
	--tc-pc-fill: #147d64;
	--tc-pc-track: #dae2ec;
	position: relative;
	display: flex;
	align-items: center;
	gap: 32px;
	box-sizing: border-box;
	width: 100%;
	padding: 26px 40px;
	background-color: #fff;
	border-radius: 10px;
	box-shadow: 0 0 32px 0 rgba(136, 152, 170, 0.15);
}

/* ── Top-right actions: Anchor badge + share ───────────────── */
/* Self-classed (.tc-podcast__share.tc-podcast__share) so it outranks the
   Elementor global button style (.elementor-kit-NN button) — same trick as
   the play button — without !important. */
.tc-podcast .tc-podcast__share.tc-podcast__share {
	position: absolute;
	top: 22px;
	right: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-width: 0;
	min-height: 0;
	max-width: none;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #627d98;
	cursor: pointer;
	line-height: 0;
	font-size: 0;
	-webkit-appearance: none;
	appearance: none;
}

.tc-podcast .tc-podcast__share.tc-podcast__share:hover,
.tc-podcast .tc-podcast__share.tc-podcast__share:focus,
.tc-podcast .tc-podcast__share.tc-podcast__share.is-copied {
	background: transparent;
	box-shadow: none;
	color: var(--tc-pc-accent);
}

.tc-podcast__share svg { display: block; }

.tc-podcast__anchor {
	position: absolute;
	top: 24px;
	right: 58px;
	display: inline-flex;
	height: 16px;
}

.tc-podcast__anchor img {
	height: 16px;
	width: auto;
	display: block;
}

/* ── Description ────────────────────────────────────────────── */
.tc-podcast__desc {
	margin: 16px 0 0;
	color: #102a43;
	font-size: 16px;
	line-height: 22px;
}

/* ── Left column: thumbnail + platform icons ───────────────── */
.tc-podcast__aside {
	flex: 0 0 110px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}

.tc-podcast__thumb {
	flex: 0 0 110px;
	width: 110px;
	height: 110px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tc-podcast__thumb img,
.tc-podcast__thumb .tc-podcast__mic {
	width: 110px;
	height: 110px;
	object-fit: cover;
	display: block;
}

/* ── Body ──────────────────────────────────────────────────── */
.tc-podcast__body {
	flex: 1 1 auto;
	min-width: 0;
}

.tc-podcast__head {
	margin-bottom: 18px;
	/* Reserve room for the absolute Anchor badge + share button. */
	padding-right: 100px;
}

.tc-podcast__number {
	display: block;
	color: #071307;
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	margin-bottom: 10px;
}

.tc-podcast__title {
	margin: 0;
	color: #102a43;
	font-weight: 700;
	font-size: 22px;
	line-height: 1.15;
}

/* ── Player row ────────────────────────────────────────────── */
.tc-podcast__player {
	display: flex;
	align-items: center;
	gap: 14px;
}

/* Full reset: the theme / Elementor global button style otherwise paints a
   large padded green pill over this icon button. Scoped under .tc-podcast and
   self-classed (.tc-podcast__play.tc-podcast__play) to outrank those defaults
   without !important; the SVG is locked to a fixed size so it can't grow. */
.tc-podcast .tc-podcast__play.tc-podcast__play {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	min-width: 0;
	min-height: 0;
	max-width: none;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--tc-pc-accent);
	cursor: pointer;
	line-height: 0;
	font-size: 0;
	-webkit-appearance: none;
	appearance: none;
}

.tc-podcast .tc-podcast__play.tc-podcast__play:hover,
.tc-podcast .tc-podcast__play.tc-podcast__play:focus,
.tc-podcast .tc-podcast__play.tc-podcast__play:active {
	background: transparent;
	box-shadow: none;
	color: var(--tc-pc-accent);
	transform: none;
}

.tc-podcast__play svg {
	display: block;
	width: 35px;
	height: 35px;
}

/* Toggle play/pause glyphs from the button state. Scoped under .tc-podcast__play
   so they outrank the `.tc-podcast__play svg { display:block }` base rule. */
.tc-podcast__play .tc-podcast__icon-pause { display: none; }
.tc-podcast__play.is-playing .tc-podcast__icon-play { display: none; }
.tc-podcast__play.is-playing .tc-podcast__icon-pause { display: block; }

.tc-podcast__time {
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 16px;
	color: #627d98;
	font-variant-numeric: tabular-nums;
	min-width: 30px;
}

.tc-podcast__time--current { color: #627d98; text-align: right; }
.tc-podcast__time--duration { color: #102a43; }

/* Progress scrubber */
.tc-podcast__progress {
	position: relative;
	flex: 1 1 auto;
	height: 9px;
	border-radius: 40px;
	background-color: var(--tc-pc-track);
	border: 1px solid #bcccdc;
	cursor: pointer;
	outline-offset: 3px;
}

.tc-podcast__progress-fill {
	position: absolute;
	top: -1px;
	left: -1px;
	height: 9px;
	width: 0;
	max-width: calc(100% + 2px);
	border-radius: 40px;
	background-color: var(--tc-pc-fill);
	pointer-events: none;
}

/* Volume */
.tc-podcast__volume {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--tc-pc-accent);
}

.tc-podcast__vol-track {
	position: relative;
	width: 56px;
	height: 6px;
	border-radius: 40px;
	background-color: var(--tc-pc-track);
	cursor: pointer;
	outline-offset: 3px;
}

.tc-podcast__vol-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 6px;
	width: 100%;
	border-radius: 40px;
	background-color: var(--tc-pc-accent);
	pointer-events: none;
}

/* ── Platform links (Apple / Google / Spotify badges, under thumb) ── */
.tc-podcast__platforms {
	display: flex;
	gap: 14px;
	margin-top: 0;
}

.tc-podcast__platform {
	display: inline-flex;
	width: 26px;
	height: 26px;
	transition: opacity 0.15s ease;
}

.tc-podcast__platform:hover {
	opacity: 0.8;
}

.tc-podcast__platform img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* ── Fallback embed / notices ──────────────────────────────── */
.tc-podcast__embed iframe {
	max-width: 100%;
	border: 0;
}

.tc-podcast__notice {
	margin: 0;
	font-size: 13px;
	color: #829ab1;
	font-style: italic;
}

/* ── Responsive: mobile card (Figma node 335:1516) ─────────────
   Vertical stack, no microphone artwork. Share stays top-right; the
   platform icons sit bottom-left with the Anchor badge bottom-right. */
@media (max-width: 767px) {
	.tc-podcast {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		padding: 24px;
		padding-bottom: 64px; /* room for the bottom platforms / anchor row */
	}

	/* No mic on mobile; the aside collapses to just the platform row. */
	.tc-podcast__thumb { display: none; }

	.tc-podcast__aside {
		order: 9;
		flex: 0 0 auto;
		flex-direction: row;
		align-items: center;
		align-self: flex-start;
		gap: 14px;
	}

	.tc-podcast__body { order: 1; }

	.tc-podcast__head {
		margin-bottom: 14px;
		padding-right: 36px; /* clear the share button only */
	}

	.tc-podcast__title { font-size: 20px; }

	.tc-podcast__player {
		flex-wrap: wrap;
		width: 100%;
	}

	.tc-podcast__progress { flex-basis: 100%; order: 5; }
	.tc-podcast__volume { order: 6; }

	/* Anchor badge moves from top-right to bottom-right, aligned with icons. */
	.tc-podcast__anchor {
		top: auto;
		bottom: 26px;
		right: 24px;
	}

	.tc-podcast__platforms { margin-top: 0; }
}
