.bcwp-players {
	display: grid;
	gap: 20px;
	justify-items: center;
}

.bcwp-player {
	text-align: center;
}

.bcwp-player iframe {
	display: block;
	border: 0;
	margin: 0 auto;
}

/* Fluid-width modes: iframe stretches to fill grid cell */
.bcwp-display-player-slim,
.bcwp-display-player-slim-no-art {
	width: 100%;
}

.bcwp-display-player-slim iframe,
.bcwp-display-player-slim-no-art iframe {
	width: 100% !important;
}

/* Small artwork needs min-width so Bandcamp shows the cover */
.bcwp-display-player-small-art {
	width: 100%;
	min-width: 400px;
}

.bcwp-display-player-small-art iframe {
	width: 100% !important;
}

.bcwp-cover-item {
	text-align: center;
}

.bcwp-cover-item a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.bcwp-cover-img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	border-radius: 4px;
}

.bcwp-cover-artist {
	display: block;
	padding: 8px 0 0;
	font-size: 12px;
	color: #666;
}

.bcwp-cover-title {
	display: block;
	padding: 4px 0 8px;
	font-weight: 600;
	font-size: 14px;
}

.bcwp-error {
	color: #d63638;
	font-style: italic;
}


/* Popup player */
.bcwp-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.75);
	animation: bcwp-popup-in 0.2s ease-out;
}

.bcwp-popup-box {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	max-height: 100%;
}

.bcwp-popup-box iframe {
	display: block;
	width: 350px;
	max-width: 100%;
	height: 470px;
	border: 0;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.bcwp-popup-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #222;
	font-size: 24px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.bcwp-popup-close:hover,
.bcwp-popup-close:focus-visible {
	background: #1da0c3;
	color: #fff;
}

.bcwp-popup-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.bcwp-popup .bcwp-popup-buy,
.bcwp-bar .bcwp-popup-buy {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 4px;
	background: #1da0c3;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.bcwp-popup .bcwp-popup-buy:hover,
.bcwp-popup .bcwp-popup-buy:focus-visible,
.bcwp-bar .bcwp-popup-buy:hover,
.bcwp-bar .bcwp-popup-buy:focus-visible {
	background: #178aa8;
	color: #fff;
}

html.bcwp-popup-open,
html.bcwp-popup-open body {
	overflow: hidden;
}

@keyframes bcwp-popup-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.bcwp-popup {
		animation: none;
	}
}

/* "Copy link" button in the popup and the player bar */
.bcwp-popup-share {
	-webkit-appearance: none;
	appearance: none;
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 4px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
}

.bcwp-popup-share:hover,
.bcwp-popup-share:focus-visible {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

/* Player bar at the bottom of the page */
.bcwp-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999998;
	padding: 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	background: #1b1b1b;
	color: #fff;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
	animation: bcwp-bar-in 0.25s ease-out;
}

.bcwp-bar-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 1000px;
	margin: 0 auto;
}

.bcwp-bar iframe {
	display: block;
	flex: 1 1 300px;
	min-width: 0;
	height: 42px;
	border: 0;
	border-radius: 3px;
	background: #fff;
}

.bcwp-bar-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
}

.bcwp-bar .bcwp-popup-close {
	position: static;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	font-size: 22px;
	line-height: 32px;
	box-shadow: none;
}

html.bcwp-bar-open body {
	padding-bottom: 66px;
}

@keyframes bcwp-bar-in {
	from { transform: translateY(100%); }
	to { transform: none; }
}

@media (max-width: 600px) {
	.bcwp-bar-inner {
		flex-wrap: wrap;
	}

	.bcwp-bar iframe {
		flex-basis: 100%;
	}

	.bcwp-bar-actions {
		width: 100%;
		justify-content: space-between;
	}

	html.bcwp-bar-open body {
		padding-bottom: 118px;
	}
}

/* Vinyl effect: a record slides out of the cover and spins */
.bcwp-cover-art {
	position: relative;
	display: block;
	aspect-ratio: 1;
}

.bcwp-cover-art .bcwp-cover-img {
	position: relative;
	z-index: 2;
	transform-origin: left center;
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s;
}

.bcwp-vinyl {
	position: absolute;
	z-index: 1;
	top: 15%;
	left: 15%;
	width: 70%;
	height: 70%;
	border-radius: 50%;
	background:
		conic-gradient(from 20deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, 0.2) 25deg, rgba(255, 255, 255, 0) 55deg, rgba(255, 255, 255, 0) 180deg, rgba(255, 255, 255, 0.2) 205deg, rgba(255, 255, 255, 0) 235deg),
		repeating-radial-gradient(circle at center, #151515 0, #151515 2px, #242424 3px, #151515 4px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	opacity: 0;
	translate: 0 0;
	transition: translate 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
}

.bcwp-vinyl::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 6%;
	height: 6%;
	border-radius: 50%;
	background: #f2f2f2;
	transform: translate(-50%, -50%);
}

.bcwp-vinyl .bcwp-vinyl-label {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 38%;
	height: 38%;
	border-radius: 50%;
	object-fit: cover;
	transform: translate(-50%, -50%);
}

.bcwp-fx-vinyl a:hover .bcwp-cover-img,
.bcwp-fx-vinyl a:focus-visible .bcwp-cover-img,
.bcwp-fx-vinyl.bcwp-is-playing .bcwp-cover-img,
.bcwp-fx-vinyl .bcwp-is-playing .bcwp-cover-img {
	transform: scale(0.76);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.bcwp-fx-vinyl a:hover .bcwp-vinyl,
.bcwp-fx-vinyl a:focus-visible .bcwp-vinyl,
.bcwp-fx-vinyl.bcwp-is-playing .bcwp-vinyl,
.bcwp-fx-vinyl .bcwp-is-playing .bcwp-vinyl {
	opacity: 1;
	translate: 27% 0;
	animation: bcwp-spin 2.4s linear 0.3s infinite;
}

@keyframes bcwp-spin {
	to { rotate: 360deg; }
}

/* "New" label on a cover */
.bcwp-has-badge a {
	position: relative;
}

.bcwp-badge-new {
	position: absolute;
	z-index: 3;
	top: 8px;
	left: 8px;
	padding: 3px 8px;
	border-radius: 3px;
	background: #e02424;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Filter buttons above the releases */
.bcwp-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 20px;
}

.bcwp-filter {
	-webkit-appearance: none;
	appearance: none;
	padding: 6px 14px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	opacity: 0.75;
}

.bcwp-filter:hover,
.bcwp-filter:focus-visible {
	opacity: 1;
}

.bcwp-filter.is-active {
	border-color: #1da0c3;
	background: #1da0c3;
	color: #fff;
	opacity: 1;
}

.bcwp-player[hidden] {
	display: none !important;
}

/* Latest release spotlight */
.bcwp-latest {
	display: grid;
	grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
	align-items: center;
	gap: 32px;
	max-width: 820px;
	margin: 0 auto 24px;
	text-align: left;
}

.bcwp-latest-info > span {
	display: block;
}

.bcwp-latest-label {
	margin-bottom: 8px;
	color: #1da0c3;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bcwp-latest-title {
	font-size: clamp(24px, 4vw, 40px);
	font-weight: 700;
	line-height: 1.15;
}

.bcwp-latest-artist {
	margin-top: 6px;
	font-size: 18px;
	opacity: 0.8;
}

.bcwp-latest-date {
	margin-top: 4px;
	font-size: 14px;
	opacity: 0.6;
}

.bcwp-latest-info > .bcwp-latest-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.bcwp-latest .bcwp-latest-btn {
	display: inline-block;
	padding: 10px 20px;
	border: 2px solid #1da0c3;
	border-radius: 4px;
	background: transparent;
	color: #1da0c3;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.bcwp-latest .bcwp-latest-listen,
.bcwp-latest .bcwp-latest-btn:only-child {
	background: #1da0c3;
	color: #fff;
}

.bcwp-latest .bcwp-latest-btn:hover,
.bcwp-latest .bcwp-latest-btn:focus-visible {
	border-color: #178aa8;
	background: #178aa8;
	color: #fff;
}

@media (max-width: 600px) {
	.bcwp-latest {
		grid-template-columns: 1fr;
		gap: 20px;
		text-align: center;
	}

	.bcwp-latest-info > .bcwp-latest-actions {
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bcwp-bar {
		animation: none;
	}

	.bcwp-fx-vinyl a:hover .bcwp-vinyl,
	.bcwp-fx-vinyl a:focus-visible .bcwp-vinyl,
	.bcwp-fx-vinyl.bcwp-is-playing .bcwp-vinyl,
	.bcwp-fx-vinyl .bcwp-is-playing .bcwp-vinyl {
		animation: none;
	}
}

/* Format labels: CD, Vinyl, Cassette */
.bcwp-formats {
	position: absolute;
	z-index: 3;
	left: 8px;
	bottom: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	transition: opacity 0.2s;
}

.bcwp-format {
	padding: 2px 7px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.03em;
}

.bcwp-format--out {
	color: rgba(255, 255, 255, 0.6);
	text-decoration: line-through;
}

/* While the record is out, the cover is smaller: hide the labels. */
.bcwp-fx-vinyl a:hover .bcwp-formats,
.bcwp-fx-vinyl a:focus-visible .bcwp-formats,
.bcwp-fx-vinyl.bcwp-is-playing .bcwp-formats,
.bcwp-fx-vinyl .bcwp-is-playing .bcwp-formats {
	opacity: 0;
}

.bcwp-latest-info > .bcwp-latest-formats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

@media (max-width: 600px) {
	.bcwp-latest-info > .bcwp-latest-formats {
		justify-content: center;
	}
}
