/* ── CFA Podcast Preview Shortcode ───────────────────────────────────────── */

/*
 * Card layout
 * ───────────
 *  .cfa-podcast-preview            — outer wrapper
 *    ├── .cfa-podcast-preview__cover   — thumbnail + play button (default view)
 *    │     ├── img.__thumbnail         — featured image
 *    │     └── button.__play-btn       — overlay play button (Spotify only)
 *    ├── .cfa-podcast-preview__embed  — iframe slot (shown when playing)
 *    │     └── button.__close-btn      — collapses back to cover view
 *    └── .cfa-podcast-preview__links  — platform link buttons (always visible)
 */

/* ── Wrapper ────────────────────────────────────────────────────────────────── */

.cfa-podcast-preview {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

/* ── Cover ──────────────────────────────────────────────────────────────────── */

.cfa-podcast-preview__cover {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 8;
	overflow: hidden;
	background: #111;
	flex-shrink: 0;
}

.cfa-podcast-preview__thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cfa-podcast-preview__thumbnail--placeholder {
	background: #2a2a2a;
}

/* ── Play button ────────────────────────────────────────────────────────────── */

.cfa-podcast-preview__play-btn {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.30);
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cfa-podcast-preview__play-btn:hover,
.cfa-podcast-preview__play-btn:focus-visible {
	background: rgba(0, 0, 0, 0.50);
	outline: 3px solid rgba(255, 255, 255, 0.6);
	outline-offset: -3px;
}

.cfa-podcast-preview__play-icon {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
	/* Circle fill uses Spotify green */
}

.cfa-podcast-preview__play-icon circle {
	fill: #1DB954;
}

/* ── Embed slot ─────────────────────────────────────────────────────────────── */

.cfa-podcast-preview__embed {
	position: relative;
	width: 100%;
	/* Spotify compact embed height */
	height: 152px;
	background: #000;
	flex-shrink: 0;
}

.cfa-podcast-preview__embed iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ── Close button ───────────────────────────────────────────────────────────── */

.cfa-podcast-preview__close-btn {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 10;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	border: 0;
	border-radius: 50%;
	padding: 4px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cfa-podcast-preview__close-btn:hover,
.cfa-podcast-preview__close-btn:focus-visible {
	background: rgba(0, 0, 0, 0.85);
	outline: 2px solid #fff;
}

.cfa-podcast-preview__close-btn svg {
	width: 16px;
	height: 16px;
	fill: #fff;
}

/* ── Platform links ─────────────────────────────────────────────────────────── */

.cfa-podcast-preview__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 0px;
}

.cfa-podcast-preview__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.cfa-podcast-preview__link:hover,
.cfa-podcast-preview__link:focus-visible {
	opacity: 0.85;
	transform: translateY(-1px);
	text-decoration: none;
}

.cfa-podcast-preview__link-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* Spotify — green */
.cfa-podcast-preview__link--spotify {
	background: #1DB954;
	color: #fff;
}
.cfa-podcast-preview__link--spotify .cfa-podcast-preview__link-icon {
	fill: #fff;
}

/* Amazon Music — navy */
.cfa-podcast-preview__link--amazon {
	background: #232F3E;
	color: #FF9900;
}
.cfa-podcast-preview__link--amazon .cfa-podcast-preview__link-icon {
	fill: #FF9900;
}

/* YouTube Music — red */
.cfa-podcast-preview__link--ytm {
	background: #FF0000;
	color: #fff;
}
.cfa-podcast-preview__link--ytm .cfa-podcast-preview__link-icon {
	fill: #fff;
}
