/* Listen (config/listen.php). Laid out like Directory (directory.css): one row per group, a sideways row of
   cards with the shared .btn-cirle arrows, plus one Spotify player above the rows. The section sits outside
   .top, so the card styles are its own. */

/* Same width as the Local section below it. */
.container .listen {
	width: 90%;
	margin: auto;
	padding-bottom: 32px;
	color: #fff;
}

.listen-heading-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 16px;
}
.listen-heading-row h1 {
	margin: 0;
}
.listen-tagline {
	margin: 0;
	color: #9aa4ae;
	font-size: 14px;
}

.listen-card:focus-visible,
.listen-player-open:focus-visible,
.listen-player-close:focus-visible {
	outline: 2px solid #3fd6c1;
	outline-offset: 2px;
}

/* Player */
.listen-player {
	margin: 18px 0 6px;
	padding: 12px;
	border-radius: 14px;
	background: #1b2027;
	border: 1px solid rgba(10, 179, 159, 0.45);
}
.listen-player-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	min-width: 0;
}
.listen-player-label {
	flex: none;
	color: #0ab39f;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.listen-player-label i {
	margin-right: 4px;
}
.listen-player-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 15px;
	font-weight: 600;
}
.listen-player-open {
	flex: none;
	color: #9aa4ae;
	font-size: 13px;
	text-decoration: none;
}
.listen-player-open:hover {
	color: #fff;
	text-decoration: none;
}
.listen-player-open i {
	margin-left: 3px;
	font-size: 10px;
}
.listen-player-close {
	flex: none;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #e8ecef;
	font-size: 15px;
	cursor: pointer;
}
.listen-player-close:hover {
	background: rgba(255, 255, 255, 0.16);
}
.listen-player-frame {
	display: block;
	width: 100%;
	height: 352px;
	border: 0;
	border-radius: 12px;
	background: #121212;
}

/* Rows */
.listen-row {
	margin-bottom: 8px;
}
.listen-row-head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 14px 0 8px;
}
.listen-row-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #fff;
}
.listen-carousel {
	display: flex;
	gap: 14px;
	padding: 8px 2px 12px;
	overflow-x: auto;
	scrollbar-width: none;
}
.listen-carousel::-webkit-scrollbar {
	display: none;
}
.listen-carousel-wrapper .btn-left,
.listen-carousel-wrapper .btn-right {
	top: calc(50% - 30px);
}

/* Cards: square cover art, then the title and who makes it */
.listen-card {
	flex: 0 0 180px;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: 10px;
	background: #1b2027;
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
	font: inherit;
	text-align: left;
	white-space: normal;
	cursor: pointer;
	transition: transform 200ms ease-in-out, box-shadow 200ms ease-in-out, border-color 200ms ease;
}
.listen-card:hover,
.listen-card:focus {
	border-color: rgba(10, 179, 159, 0.6);
}
.listen-card.is-playing {
	border-color: #0ab39f;
	box-shadow: 0 0 0 1px #0ab39f;
}
@media (hover: hover) and (pointer: fine) {
	.listen-card:hover {
		transform: scale(1.04);
		box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
	}
}
@media (prefers-reduced-motion: reduce) {
	.listen-card {
		transition: none;
	}
	.listen-card:hover {
		transform: none;
	}
}
.listen-card-art {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	background: #2a3038;
}
.listen-card-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.listen-card-letter {
	font-size: 40px;
	color: rgba(255, 255, 255, 0.6);
}
/* Play badge, bottom right of the cover (Spotify style); always shown on touch screens. */
.listen-card-play {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #0ab39f;
	color: #04201c;
	font-size: 16px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
	transition: opacity 150ms ease, transform 150ms ease;
}
.listen-card-play .fa-play {
	margin-left: 3px;
}
@media (hover: hover) and (pointer: fine) {
	.listen-card .listen-card-play {
		opacity: 0;
		transform: translateY(6px);
	}
	.listen-card:hover .listen-card-play,
	.listen-card:focus-visible .listen-card-play,
	.listen-card.is-playing .listen-card-play {
		opacity: 1;
		transform: none;
	}
}
.listen-card-copy {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px 12px 12px;
	min-width: 0;
}
.listen-card-name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	min-height: 2.6em;
}
.listen-card-publisher {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: #9aa4ae;
	font-size: 12px;
}

/* Loading and messages */
.listen-skeleton {
	margin: 14px 0 22px;
}
.listen-skeleton-title {
	width: 220px;
	height: 18px;
	margin-bottom: 12px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
}
.listen-skeleton-cards {
	display: flex;
	gap: 14px;
	overflow: hidden;
}
.listen-skeleton-cards span {
	flex: 0 0 180px;
	height: 250px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	animation: listen-pulse 1.4s ease-in-out infinite;
}
@keyframes listen-pulse {
	50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
	.listen-skeleton-cards span { animation: none; }
}
.listen-note {
	color: #c9d0d6;
	font-size: 14px;
}
.listen-disclaimer {
	margin: 18px 0 0;
	color: #7d8790;
	font-size: 12px;
}
.listen-disclaimer i {
	margin-right: 4px;
	color: #1db954;
}

/* Phones */
@media (max-width: 576px) {
	.listen-row-title {
		font-size: 18px;
	}
	.listen-card {
		flex-basis: 140px;
	}
	.listen-card-play {
		width: 38px;
		height: 38px;
		font-size: 14px;
	}
	.listen-player {
		padding: 10px;
	}
	.listen-player-open {
		display: none;
	}
	/* Spotify's compact player height. */
	.listen-player-frame {
		height: 152px;
	}
	.listen-skeleton-cards span {
		flex-basis: 140px;
		height: 210px;
	}
}
