/* Next50 Listen bar. Colours come from the theme's tokens with fallbacks. */
.n50-listen {
	--n50l-accent: var(--c-primary-blue-500, #007eab);
	--n50l-accent-hover: var(--c-primary-blue-700, #005979);
	--n50l-track: var(--c-primary-blue-100, #b0d7e5);
	--n50l-bg: var(--c-primary-blue-50, #e6f2f7);
	--n50l-text: #242424;
	--n50l-muted: #5c5c5c;

	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 32px;
	padding: 14px 18px 14px 14px;
	background: var(--n50l-bg);
	border-radius: 999px;
	font-family: inherit;
	color: var(--n50l-text);
	box-sizing: border-box;
	max-width: 100%;
}

.n50-listen *,
.n50-listen *::before,
.n50-listen *::after { box-sizing: border-box; }

.n50-listen__play {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--n50l-accent);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s ease, transform .15s ease;
}
.n50-listen__play:hover { background: var(--n50l-accent-hover); }
.n50-listen__play:active { transform: scale(.95); }
.n50-listen__play:focus-visible,
.n50-listen__speed:focus-visible,
.n50-listen__track:focus-visible {
	outline: 2px solid var(--n50l-accent);
	outline-offset: 3px;
}

.n50-listen__icon { width: 22px; height: 22px; fill: currentColor; }
.n50-listen__icon--pause { display: none; }
.n50-listen.is-playing .n50-listen__icon--play { display: none; }
.n50-listen.is-playing .n50-listen__icon--pause { display: block; }
.n50-listen.is-loading .n50-listen__play { animation: n50l-pulse 1s ease-in-out infinite; }

.n50-listen__main { flex: 1 1 auto; min-width: 0; }

.n50-listen__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	line-height: 1.2;
}
.n50-listen__label {
	font-size: 16px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.n50-listen__label-short { display: none; }

.n50-listen__time {
	flex: 0 0 auto;
	font-size: 14px;
	color: var(--n50l-muted);
	font-variant-numeric: tabular-nums;
}

.n50-listen__track {
	position: relative;
	height: 6px;
	border-radius: 3px;
	background: var(--n50l-track);
	cursor: pointer;
	touch-action: none;
}
/* Bigger hit area without changing the look. */
.n50-listen__track::before {
	content: "";
	position: absolute;
	inset: -10px 0;
}
.n50-listen__fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	border-radius: inherit;
	background: var(--n50l-accent);
	pointer-events: none;
}
.n50-listen__fill::after {
	content: "";
	position: absolute;
	right: -7px;
	top: 50%;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	border-radius: 50%;
	background: var(--n50l-accent);
	box-shadow: 0 0 0 3px #fff;
	opacity: 0;
	transition: opacity .2s ease;
}
.n50-listen.has-started .n50-listen__fill::after { opacity: 1; }

.n50-listen__speed {
	flex: 0 0 auto;
	min-width: 52px;
	height: 36px;
	padding: 0 12px;
	margin: 0;
	border: 1px solid var(--n50l-track);
	border-radius: 18px;
	background: #fff;
	color: var(--n50l-text);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: border-color .2s ease;
}
.n50-listen__speed:hover { border-color: var(--n50l-accent); }

@media (max-width: 480px) {
	.n50-listen { gap: 12px; padding: 10px 14px 10px 10px; border-radius: 28px; }
	.n50-listen__play { width: 42px; height: 42px; }
	.n50-listen__icon { width: 20px; height: 20px; }
	.n50-listen__label { font-size: 15px; }
	.n50-listen__label-full { display: none; }
	.n50-listen__label-short { display: inline; }
	.n50-listen__time { font-size: 13px; }
	.n50-listen__speed { min-width: 46px; height: 32px; padding: 0 8px; font-size: 13px; }
}

@keyframes n50l-pulse { 50% { opacity: .6; } }

@media (prefers-reduced-motion: reduce) {
	.n50-listen *, .n50-listen { transition: none !important; animation: none !important; }
}

@media print { .n50-listen { display: none !important; } }
