/**
 * The Music section.
 *
 * Inherits the sidebar's own tokens where it can, so it reads as part of the
 * rail rather than a widget dropped into it.
 */

.an-mu-body { padding-top: 4px; }

/* ── the stage ─────────────────────────────────────────────── */

.an-mu-stage {
	margin: 0 0 10px;
	border-radius: 10px;
	overflow: hidden;
	background: rgba( 0, 0, 0, .32 );
}

.an-mu-frame {
	position: relative;
	width: 100%;
	background: #000;
}

/* 16:9 for a video, 9:16 for a Short — a Short in a 16:9 box is two black bars
   and a stamp-sized video. */
.an-mu-stage[data-kind="video"] .an-mu-frame { aspect-ratio: 16 / 9; }
.an-mu-stage[data-kind="short"] .an-mu-frame { aspect-ratio: 9 / 16; max-height: 320px; margin: 0 auto; }

.an-mu-frame iframe,
.an-mu-frame > div {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.an-mu-now {
	margin: 0;
	padding: 7px 9px 3px;
	font-size: 11.5px;
	line-height: 1.35;
	opacity: .88;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.an-mu-ctl {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 2px 5px 6px;
}

.an-mu-btn {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	line-height: 1;
	padding: 6px 9px;
	border-radius: 7px;
	cursor: pointer;
	opacity: .75;
}

.an-mu-btn:hover { opacity: 1; background: rgba( 127, 127, 127, .16 ); }
.an-mu-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.an-mu-pp { font-size: 11px; }
.an-mu-x { margin-left: auto; }

/* ── the list ──────────────────────────────────────────────── */

.an-mu-list { list-style: none; margin: 0; padding: 0; }

.an-mu-link {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 6px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}

.an-mu-link:hover { background: rgba( 127, 127, 127, .14 ); }
.an-mu-row.is-on .an-mu-link { background: rgba( 127, 127, 127, .2 ); }

.an-mu-thumb {
	position: relative;
	flex: 0 0 auto;
	width: 54px;
	height: 40px;
	border-radius: 5px;
	overflow: hidden;
	background: rgba( 0, 0, 0, .35 );
}

.an-mu-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.an-mu-go {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #fff;
	background: rgba( 0, 0, 0, .34 );
	opacity: 0;
	transition: opacity .14s;
}

.an-mu-link:hover .an-mu-go,
.an-mu-row.is-on .an-mu-go { opacity: 1; }

.an-mu-tag {
	position: absolute;
	left: 3px; bottom: 3px;
	font-size: 8.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 1px 4px;
	border-radius: 3px;
	background: rgba( 0, 0, 0, .68 );
	color: #fff;
}

.an-mu-meta { min-width: 0; }

.an-mu-t {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12px;
	line-height: 1.3;
}

.an-mu-a {
	display: block;
	margin-top: 1px;
	font-size: 10.5px;
	opacity: .6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.an-mu-note {
	margin: 8px 6px 2px;
	font-size: 10.5px;
	line-height: 1.4;
	opacity: .55;
}

/* ── the equaliser in the section header ───────────────────── */

/* `display` set on the element beats the `hidden` attribute's UA rule, so the
   equaliser animated away next to the heading with nothing playing. Anything
   here that sets display has to opt back out of hidden explicitly. */
.an-mu-eq[hidden],
.an-mu-stage[hidden] { display: none !important; }

.an-mu-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; margin-left: 6px; }
.an-mu-eq i { width: 2px; background: currentColor; border-radius: 1px; animation: an-mu-eq 900ms ease-in-out infinite; }
.an-mu-eq i:nth-child(1) { height: 4px; animation-delay: 0ms; }
.an-mu-eq i:nth-child(2) { height: 9px; animation-delay: 150ms; }
.an-mu-eq i:nth-child(3) { height: 6px; animation-delay: 300ms; }

@keyframes an-mu-eq { 50% { transform: scaleY( .35 ); } }

@media ( prefers-reduced-motion: reduce ) {
	.an-mu-eq i { animation: none; }
	.an-mu-go { transition: none; }
}

/* The rail collapses to 72px; the player is unusable at that width. */
.an-side.is-rail .an-mu-body { display: none; }
