/* Gemrhythm Player */

.grp-player,
.grp-sticky,
.grp-flow {
	--grp-accent: #6d28d9;
	--grp-on-accent: #ffffff;
	--grp-bg: #ffffff;
	--grp-surface: #f4f4f8;
	--grp-text: #16161d;
	--grp-muted: #5e5e74;
	--grp-wave: #c9c9d6;
	--grp-border: #e3e3ec;
	box-sizing: border-box;
	text-align: left;
}

.grp-player,
.grp-sticky {
	color: var(--grp-text);
	font-size: 16px;
	line-height: 1.4;
}

.grp-player.grp-dark,
.grp-sticky.grp-dark,
.grp-flow.grp-dark {
	--grp-bg: #15151c;
	--grp-surface: #20202b;
	--grp-text: #f3f3f7;
	--grp-muted: #a6a6ba;
	--grp-wave: #4b4b60;
	--grp-border: #2d2d3b;
}

.grp-player *,
.grp-sticky *,
.grp-flow * {
	box-sizing: border-box;
}

.grp-player [hidden],
.grp-sticky[hidden],
.grp-sticky [hidden],
.grp-flow [hidden] {
	display: none !important;
}

.grp-player {
	container-type: inline-size;
	background: var(--grp-bg);
	border: 1px solid var(--grp-border);
	border-radius: 16px;
	padding: 20px;
	margin: 0 0 1.5em;
	max-width: 100%;
}

/* Reset theme / Elementor button styles inside the player. */
.grp-player button,
.grp-sticky button,
.grp-flow button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.grp-player button:focus-visible,
.grp-sticky button:focus-visible,
.grp-flow button:focus-visible,
.grp-flow-stage:focus-visible,
.grp-player a:focus-visible,
.grp-player input:focus-visible,
.grp-player .grp-wave:focus-visible {
	outline: 2px solid var(--grp-accent);
	outline-offset: 2px;
}

.grp-player svg,
.grp-sticky svg,
.grp-flow svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	display: block;
	flex: none;
}

/* ---- Top area ---- */

.grp-top {
	display: flex;
	gap: 20px;
	align-items: center;
}

.grp-cover {
	flex: none;
	width: 132px;
	height: 132px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--grp-surface);
	color: var(--grp-muted);
	display: flex;
	align-items: center;
	justify-content: center;
}

.grp-no-cover .grp-cover {
	display: none;
}

.grp-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
	margin: 0;
}

.grp-cover svg {
	width: 44px;
	height: 44px;
}

.grp-main {
	flex: 1;
	min-width: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 12px;
	align-items: center;
}

.grp-pl-title,
.grp-now,
.grp-wave-row {
	grid-column: 1 / -1;
	min-width: 0;
}

.grp-pl-title {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--grp-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-now {
	margin-top: 2px;
}

.grp-now-title {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-now-artist {
	display: block;
	min-height: 1.4em;
	font-size: 0.9375rem;
	color: var(--grp-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-wave-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.grp-wave {
	flex: 1;
	min-width: 0;
	width: 100%;
	height: 48px;
	display: block;
	cursor: pointer;
	touch-action: pan-y;
	border-radius: 4px;
}

.grp-spectrum {
	display: block;
	width: 100%;
	height: 56px;
	margin-top: 14px;
}

.grp-cur,
.grp-dur,
.grp-row-dur,
.grp-sticky-time {
	font-size: 0.8125rem;
	color: var(--grp-muted);
	font-variant-numeric: tabular-nums;
	flex: none;
}

.grp-cur,
.grp-dur {
	min-width: 2.6em;
}

.grp-dur {
	text-align: right;
}

.grp-controls {
	grid-column: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.grp-album-buy {
	grid-column: 2;
	margin-top: 10px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.grp-player .grp-btn,
.grp-sticky .grp-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--grp-text);
	flex: none;
}

.grp-player .grp-btn:hover,
.grp-sticky .grp-btn:hover {
	background: var(--grp-surface);
}

.grp-player .grp-btn.grp-play,
.grp-sticky .grp-btn.grp-play {
	background: var(--grp-accent);
	color: var(--grp-on-accent);
}

.grp-player .grp-btn.grp-play:hover,
.grp-sticky .grp-btn.grp-play:hover {
	background: var(--grp-accent);
	filter: brightness(1.1);
}

.grp-player .grp-btn.grp-loop[aria-pressed="true"] {
	background: var(--grp-surface);
	box-shadow: inset 0 0 0 2px var(--grp-accent);
}

.grp-player .grp-btn.grp-play {
	width: 52px;
	height: 52px;
}

.grp-player .grp-btn.grp-play svg {
	width: 26px;
	height: 26px;
}

/* ---- Buy / download / favourite ---- */

.grp-player a.grp-buy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--grp-accent);
	color: var(--grp-on-accent);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	flex: none;
	border: 0;
	box-shadow: none;
}

.grp-player a.grp-buy:hover {
	filter: brightness(1.1);
	color: var(--grp-on-accent);
	text-decoration: none;
}

.grp-player a.grp-buy svg {
	width: 16px;
	height: 16px;
}

.grp-player a.grp-buy.loading {
	opacity: 0.6;
	pointer-events: none;
}

.grp-player a.grp-buy::after {
	content: none;
}

.grp-player a.grp-buy.added .grp-buy-label::after {
	content: " \2713";
}

.grp-player .grp-price,
.grp-player .grp-price * {
	color: inherit;
	font-size: inherit;
	font-weight: 600;
}

.grp-player .grp-price del {
	opacity: 0.7;
	font-weight: 400;
}

.grp-player .grp-price ins {
	text-decoration: none;
	background: none;
}

.grp-player a.added_to_cart {
	font-size: 0.8125rem;
	color: var(--grp-text);
	text-decoration: underline;
	white-space: nowrap;
	flex: none;
}

.grp-player a.grp-download,
.grp-player button.grp-fav {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--grp-muted);
	flex: none;
	text-decoration: none;
}

.grp-player a.grp-download:hover,
.grp-player button.grp-fav:hover {
	background: var(--grp-border);
	color: var(--grp-text);
}

.grp-player .grp-fav svg,
.grp-player .grp-chip-fav svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.grp-player .grp-fav[aria-pressed="true"] {
	color: var(--grp-text);
}

.grp-player .grp-fav[aria-pressed="true"] svg,
.grp-player .grp-chip-fav[aria-pressed="true"] svg {
	fill: currentColor;
}

/* Custom buy link: secondary button. */
.grp-player a.grp-buy.grp-link {
	background: transparent;
	color: var(--grp-text);
	box-shadow: inset 0 0 0 1px var(--grp-muted);
}

.grp-player a.grp-buy.grp-link:hover {
	background: var(--grp-surface);
	color: var(--grp-text);
	filter: none;
}

/* ---- Notice ---- */

.grp-notice {
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--grp-surface);
	font-size: 0.875rem;
}

/* ---- Search and filters ---- */

.grp-list {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--grp-border);
}

.grp-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 10px;
}

.grp-player input.grp-search {
	flex: 1 1 180px;
	min-width: 0;
	width: auto;
	height: 40px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--grp-muted);
	border-radius: 999px;
	background: var(--grp-bg);
	color: var(--grp-text);
	font: inherit;
	font-size: 0.9375rem;
	box-shadow: none;
}

.grp-player input.grp-search::placeholder {
	color: var(--grp-muted);
	opacity: 1;
}

.grp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.grp-player button.grp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 4px 14px;
	border: 1px solid var(--grp-muted);
	border-radius: 999px;
	font-size: 0.875rem;
	color: var(--grp-text);
	white-space: nowrap;
}

.grp-player button.grp-chip:hover {
	background: var(--grp-surface);
}

.grp-player button.grp-chip[aria-pressed="true"] {
	background: var(--grp-accent);
	border-color: var(--grp-accent);
	color: var(--grp-on-accent);
}

.grp-player .grp-chip svg {
	width: 16px;
	height: 16px;
}

.grp-player p.grp-empty {
	margin: 10px 8px;
	font-size: 0.875rem;
	color: var(--grp-muted);
}

/* ---- Tracklist ---- */

.grp-player ol.grp-tracklist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.grp-player li.grp-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 4px 8px;
	border-radius: 10px;
	list-style: none;
}

.grp-player li.grp-row::before,
.grp-player li.grp-row::marker {
	content: none;
}

.grp-player li.grp-row:hover,
.grp-player li.grp-row.is-current {
	background: var(--grp-surface);
}

.grp-player .grp-row-play {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--grp-text);
	text-align: left;
	border-radius: 8px;
}

.grp-num {
	flex: none;
	width: 1.75em;
	text-align: center;
	font-size: 0.875rem;
	color: var(--grp-muted);
	font-variant-numeric: tabular-nums;
}

.grp-row.is-current .grp-num {
	color: var(--grp-text);
	font-weight: 700;
}

.grp-row-text {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.grp-row-title {
	font-size: 0.9375rem;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-row.is-current .grp-row-title {
	font-weight: 700;
}

.grp-row-artist {
	font-size: 0.8125rem;
	color: var(--grp-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-row-dur {
	margin: 0 4px;
}

/* ---- Layout: compact ---- */

.grp-layout-compact {
	padding: 14px 16px;
}

.grp-layout-compact .grp-main {
	grid-template-columns: auto minmax(0, 1fr) auto;
	column-gap: 14px;
}

.grp-layout-compact .grp-pl-title,
.grp-layout-compact .grp-now-artist,
.grp-layout-compact .grp-prev {
	display: none;
}

.grp-layout-compact .grp-now {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
}

.grp-layout-compact .grp-now-title {
	font-size: 1rem;
}

.grp-layout-compact .grp-wave-row {
	grid-column: 2;
	grid-row: 2;
	margin-top: 2px;
}

.grp-layout-compact .grp-wave {
	height: 32px;
}

.grp-layout-compact .grp-controls {
	grid-column: 1;
	grid-row: 1 / span 2;
	margin: 0;
	gap: 4px;
}

.grp-layout-compact .grp-album-buy {
	grid-column: 3;
	grid-row: 1 / span 2;
	margin: 0;
}

/* ---- Layout: mini (shop listings) ---- */

.grp-layout-mini {
	padding: 10px 12px;
	border-radius: 12px;
	margin: 0.75em 0;
}

.grp-layout-mini .grp-main {
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 10px;
}

.grp-layout-mini .grp-pl-title,
.grp-layout-mini .grp-now,
.grp-layout-mini .grp-prev,
.grp-layout-mini .grp-next,
.grp-layout-mini .grp-loop,
.grp-layout-mini .grp-album-buy,
.grp-layout-mini .grp-cur {
	display: none;
}

.grp-layout-mini .grp-controls {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
}

.grp-layout-mini .grp-wave-row {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
}

.grp-layout-mini .grp-wave {
	height: 32px;
}

.grp-player.grp-layout-mini .grp-btn.grp-play {
	width: 44px;
	height: 44px;
}

/* ---- Layout: card ---- */

.grp-layout-card {
	max-width: 440px;
}

.grp-layout-card .grp-top {
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
}

.grp-layout-card .grp-cover {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
}

.grp-layout-card .grp-main {
	grid-template-columns: minmax(0, 1fr);
	text-align: center;
}

.grp-layout-card .grp-controls {
	justify-content: center;
}

.grp-layout-card .grp-album-buy {
	grid-column: 1;
	justify-content: center;
}

/* ---- Narrow containers (phones, sidebars) ---- */

@container (max-width: 520px) {
	.grp-top {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.grp-cover {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.grp-row-dur {
		display: none;
	}

	.grp-player li.grp-row {
		flex-wrap: wrap;
		justify-content: flex-end;
	}

	.grp-player .grp-row-play {
		flex: 1 1 110px;
	}

	.grp-player li.grp-row a.grp-buy {
		padding: 6px 12px;
	}

	.grp-player li.grp-row .grp-buy-label {
		display: none;
	}

	.grp-layout-compact .grp-main {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.grp-layout-compact .grp-album-buy {
		grid-column: 1 / -1;
		grid-row: 3;
		margin-top: 10px;
		justify-content: flex-start;
	}

	.grp-layout-compact .grp-cur,
	.grp-layout-compact .grp-loop {
		display: none;
	}
}

@container (max-width: 360px) {
	.grp-album-buy {
		grid-column: 1 / -1;
		justify-content: flex-start;
	}
}

/* ---- Coverflow ---- */

.grp-flow {
	container-type: inline-size;
	margin: 0 0 1.5em;
	--grp-flow-size: 200px;
}

.grp-flow-stage {
	position: relative;
	height: calc(var(--grp-flow-size) + 44px);
	perspective: 1100px;
	overflow: hidden;
	border-radius: 16px;
}

.grp-flow-track {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	touch-action: pan-y;
}

.grp-flow button.grp-flow-item {
	position: absolute;
	left: 50%;
	top: 14px;
	width: var(--grp-flow-size);
	height: var(--grp-flow-size);
	border-radius: 14px;
	overflow: hidden;
	background: var(--grp-surface);
	color: var(--grp-muted);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateX(-50%);
	filter: brightness(0.72);
}

.grp-flow button.grp-flow-item[aria-current="true"] {
	filter: none;
}

.grp-flow-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
	pointer-events: none;
}

.grp-flow-item > svg {
	width: 56px;
	height: 56px;
}

.grp-flow-badge {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--grp-accent);
	color: var(--grp-on-accent);
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.grp-flow-item[aria-current="true"] .grp-flow-badge {
	display: flex;
}

.grp-flow button.grp-flow-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 200;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--grp-bg);
	color: var(--grp-text);
	border: 1px solid var(--grp-border);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.grp-flow button.grp-flow-prev {
	left: 6px;
}

.grp-flow button.grp-flow-next {
	right: 6px;
}

.grp-flow button.grp-flow-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.grp-flow-caption {
	text-align: center;
	font-weight: 700;
	font-size: 1.125rem;
	margin: 6px 0 14px;
}

@container (max-width: 520px) {
	.grp-flow-stage {
		--grp-flow-size: 150px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.grp-flow button.grp-flow-item {
		transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s, filter 0.3s;
	}
}

/* ---- Sticky footer bar ---- */

.grp-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	background: var(--grp-bg);
	border-top: 1px solid var(--grp-border);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

.grp-sticky-bar {
	height: 6px;
	background: var(--grp-wave);
	cursor: pointer;
}

.grp-sticky-fill {
	height: 100%;
	width: 0;
	background: var(--grp-accent);
}

.grp-sticky-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	max-width: 1200px;
	margin: 0 auto;
}

.grp-sticky-cover {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	object-fit: cover;
	flex: none;
	margin: 0;
}

.grp-sticky-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	margin-right: 4px;
}

.grp-sticky-title {
	font-size: 0.9375rem;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-sticky-artist {
	font-size: 0.8125rem;
	color: var(--grp-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 520px) {
	.grp-sticky-time,
	.grp-sticky .grp-s-prev {
		display: none;
	}

	.grp-sticky-inner {
		gap: 4px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.grp-sticky-fill {
		transition: width 0.25s linear;
	}
}

/* ==== Version 1.4 ==== */

.grp-player,
.grp-sticky,
.grp-flow {
	--grp-wave-on: var(--grp-accent);
}

.grp-player.grp-dark,
.grp-sticky.grp-dark,
.grp-flow.grp-dark {
	--grp-wave-on: #a78bfa;
}

.grp-player.grp-dark :focus-visible,
.grp-player.grp-dark .grp-btn.grp-loop[aria-pressed="true"] {
	outline-color: var(--grp-wave-on);
	box-shadow: none;
}

.grp-player.grp-dark .grp-btn.grp-loop[aria-pressed="true"] {
	box-shadow: inset 0 0 0 2px var(--grp-wave-on);
}

/* ---- Backgrounds ---- */

.grp-player {
	position: relative;
}

.grp-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	overflow: hidden;
	pointer-events: none;
}

.grp-player > *:not(.grp-bg) {
	position: relative;
	z-index: 1;
}

.grp-bg-gradient .grp-bg {
	background: linear-gradient(155deg, color-mix(in srgb, var(--grp-accent) 26%, var(--grp-bg)) 0%, var(--grp-bg) 62%);
}

.grp-bg-cover .grp-bg::before {
	content: "";
	position: absolute;
	inset: -60px;
	background-image: var(--grp-cover-img);
	background-size: cover;
	background-position: center;
	filter: blur(36px) saturate(1.4);
}

.grp-bg-cover .grp-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--grp-bg);
	opacity: 0.72;
}

/* ---- Playing indicator in the tracklist ---- */

.grp-player.is-playing .grp-row.is-current .grp-num {
	font-size: 0;
	height: 14px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 3px;
}

.grp-player.is-playing .grp-row.is-current .grp-num::before,
.grp-player.is-playing .grp-row.is-current .grp-num::after {
	content: "";
	width: 4px;
	height: 100%;
	background: var(--grp-wave-on);
	transform-origin: bottom;
	transform: scaleY(0.6);
}

@media (prefers-reduced-motion: no-preference) {
	.grp-player.is-playing .grp-row.is-current .grp-num::before {
		animation: grp-eq 0.9s ease-in-out infinite alternate;
	}

	.grp-player.is-playing .grp-row.is-current .grp-num::after {
		animation: grp-eq 0.7s ease-in-out -0.4s infinite alternate;
	}
}

@keyframes grp-eq {
	from { transform: scaleY(0.25); }
	to { transform: scaleY(1); }
}

/* ---- Layout: showcase ---- */

.grp-meta-line {
	display: none;
	grid-column: 1 / -1;
	font-size: 0.875rem;
	color: var(--grp-muted);
}

.grp-layout-showcase {
	padding: 0;
}

.grp-layout-showcase .grp-top {
	padding: 28px;
	gap: 24px;
	align-items: flex-end;
	border-radius: 15px 15px 0 0;
	background: linear-gradient(180deg, color-mix(in srgb, var(--grp-accent) 30%, var(--grp-bg)) 0%, color-mix(in srgb, var(--grp-accent) 6%, var(--grp-bg)) 100%);
}

.grp-layout-showcase.grp-bg-cover .grp-top {
	background: none;
}

.grp-layout-showcase .grp-cover {
	width: 200px;
	height: 200px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.grp-layout-showcase .grp-pl-title {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: none;
	white-space: normal;
	color: var(--grp-text);
}

.grp-layout-showcase .grp-meta-line {
	display: block;
	margin-top: 4px;
}

.grp-layout-showcase .grp-now {
	margin-top: 12px;
}

.grp-layout-showcase .grp-now-title {
	font-size: 1rem;
}

.grp-layout-showcase .grp-now-artist {
	font-size: 0.875rem;
}

.grp-player.grp-layout-showcase .grp-btn.grp-play {
	width: 60px;
	height: 60px;
}

.grp-layout-showcase .grp-spectrum {
	width: auto;
	margin: 14px 28px 0;
}

.grp-layout-showcase .grp-notice {
	margin: 14px 28px 0;
}

.grp-layout-showcase .grp-list {
	margin: 0;
	padding: 16px 20px 20px;
	border-top: 0;
}

.grp-layout-showcase li.grp-row {
	padding: 6px 8px;
}

@container (max-width: 520px) {
	.grp-layout-showcase .grp-top {
		padding: 20px;
		align-items: stretch;
	}

	.grp-layout-showcase .grp-cover {
		width: 70%;
		height: auto;
		aspect-ratio: 1 / 1;
		margin: 0 auto;
	}

	.grp-layout-showcase .grp-pl-title {
		font-size: 1.5rem;
	}

	.grp-layout-showcase .grp-list {
		padding: 12px 12px 16px;
	}

	.grp-layout-showcase .grp-spectrum,
	.grp-layout-showcase .grp-notice {
		margin: 12px 20px 0;
	}
}

/* ---- Library ---- */

.grp-lib {
	--grp-accent: #6d28d9;
	--grp-on-accent: #ffffff;
	margin: 0 0 1.5em;
	text-align: left;
}

.grp-lib *,
.grp-lib *::before,
.grp-lib *::after {
	box-sizing: border-box;
}

.grp-lib [hidden] {
	display: none !important;
}

.grp-lib button.grp-lib-card {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px;
	border-radius: 12px;
	min-width: 0;
}

.grp-lib button.grp-lib-card:hover,
.grp-lib button.grp-lib-card[aria-current="true"] {
	background: rgba(127, 127, 127, 0.14);
}

.grp-lib button.grp-lib-card:focus-visible {
	outline: 2px solid var(--grp-accent);
	outline-offset: 2px;
}

.grp-lib h3.grp-lib-heading {
	margin: 1.2em 0 0.4em;
	padding: 0 12px;
	font-size: 1.375rem;
	font-weight: 800;
}

.grp-lib-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 8px;
}

.grp-lib-cover {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: rgba(127, 127, 127, 0.18);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	margin-bottom: 6px;
}

.grp-lib-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}

.grp-lib svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	display: block;
}

.grp-lib-cover > svg {
	width: 44px;
	height: 44px;
	opacity: 0.55;
}

.grp-lib-badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--grp-accent);
	color: var(--grp-on-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: translateY(6px);
}

.grp-lib-card:hover .grp-lib-badge,
.grp-lib-card:focus-visible .grp-lib-badge,
.grp-lib-card[aria-current="true"] .grp-lib-badge {
	opacity: 1;
	transform: none;
}

@media (hover: none) {
	.grp-lib-badge {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.grp-lib-badge {
		transition: opacity 0.2s, transform 0.2s;
	}
}

.grp-lib-title {
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.grp-lib-sub {
	font-size: 0.8125rem;
	opacity: 0.7;
}

.grp-lib-panels {
	margin-top: 1.2em;
}

@media (max-width: 480px) {
	.grp-lib-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ==== Version 1.5: three-colour waveform ==== */

.grp-player,
.grp-sticky,
.grp-flow {
	--grp-wave-2: #db2777;
	--grp-wave-3: #f59e0b;
}

.grp-player.grp-dark,
.grp-sticky.grp-dark,
.grp-flow.grp-dark {
	--grp-wave-2: #f472b6;
	--grp-wave-3: #fbbf24;
}

.grp-sticky .grp-sticky-fill {
	background: linear-gradient(90deg, var(--grp-wave-on), var(--grp-wave-2), var(--grp-wave-3));
	background-size: 100vw 100%;
}

/* ==== Version 1.7: track pictures, descriptions, share ==== */

.grp-player li.grp-row {
	flex-wrap: wrap;
	justify-content: flex-end;
}

.grp-player .grp-row-play {
	flex: 1 1 180px;
}

@container (max-width: 520px) {
	.grp-player .grp-row-play {
		flex: 1 1 110px;
	}
}

.grp-thumb {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--grp-surface);
}

.grp-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}

.grp-player button.grp-share {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--grp-muted);
	flex: none;
}

.grp-player button.grp-share:hover {
	background: var(--grp-border);
	color: var(--grp-text);
}

.grp-player .grp-share svg {
	width: 20px;
	height: 20px;
}

.grp-desc {
	flex: 0 0 100%;
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 0 4px 8px calc(1.75em + 12px);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--grp-muted);
}

.grp-desc-text {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.grp-desc.is-open {
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.grp-desc.is-open .grp-desc-text {
	flex: none;
	width: 100%;
	white-space: pre-line;
	overflow: visible;
	color: var(--grp-text);
}

.grp-player button.grp-more {
	flex: none;
	min-height: 32px;
	padding: 0 6px;
	border-radius: 6px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--grp-text);
	text-decoration: underline;
	white-space: nowrap;
}

.grp-player button.grp-more:hover {
	background: var(--grp-surface);
}

/* ==== Version 1.8: more controls and tracklist options ==== */

.grp-player {
	border-radius: var(--grp-radius, 16px);
}

.grp-layout-showcase .grp-top {
	border-radius: max(0px, calc(var(--grp-radius, 16px) - 1px)) max(0px, calc(var(--grp-radius, 16px) - 1px)) 0 0;
}

.grp-controls {
	flex-wrap: wrap;
}

.grp-player .grp-btn.grp-shuffle[aria-pressed="true"] {
	background: var(--grp-surface);
	box-shadow: inset 0 0 0 2px var(--grp-accent);
}

.grp-player.grp-dark .grp-btn.grp-shuffle[aria-pressed="true"] {
	box-shadow: inset 0 0 0 2px var(--grp-wave-on);
}

.grp-player button.grp-speed,
.grp-player button.grp-skip {
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	border-radius: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--grp-text);
	flex: none;
}

.grp-player button.grp-speed:hover,
.grp-player button.grp-skip:hover {
	background: var(--grp-surface);
}

.grp-vol {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex: none;
}

.grp-player input.grp-volume {
	width: 84px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	accent-color: var(--grp-accent);
	cursor: pointer;
}

/* Phones set volume with their own buttons, and iPhones ignore a web page's volume slider. */
@media (hover: none) and (pointer: coarse) {
	.grp-player input.grp-volume {
		display: none;
	}
}

.grp-layout-compact .grp-shuffle,
.grp-layout-compact .grp-speed,
.grp-layout-compact .grp-skip,
.grp-layout-compact .grp-vol {
	display: none;
}

/* Play button over the artwork */

.grp-cover {
	position: relative;
}

.grp-player button.grp-cover-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	border-radius: inherit;
}

.grp-player .grp-cover-play svg {
	width: 48px;
	height: 48px;
	opacity: 0;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.grp-player button.grp-cover-play:hover,
.grp-player button.grp-cover-play:focus-visible {
	background: rgba(0, 0, 0, 0.38);
}

.grp-player button.grp-cover-play:hover svg,
.grp-player button.grp-cover-play:focus-visible svg {
	opacity: 1;
}

/* Tracklist options */

.grp-hide-num .grp-row .grp-num,
.grp-hide-dur .grp-row-dur,
.grp-hide-artist .grp-row-artist,
.grp-hide-desc .grp-desc {
	display: none;
}

.grp-wrap-titles .grp-row-title {
	white-space: normal;
}

.grp-hide-num .grp-desc {
	padding-left: 4px;
}

/* Grid tracklist */

.grp-list-grid ol.grp-tracklist {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
}

.grp-list-grid li.grp-row {
	justify-content: flex-start;
	align-content: flex-start;
	padding: 10px;
	border: 1px solid var(--grp-border);
}

.grp-list-grid .grp-row-play {
	flex: 0 0 100%;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}

.grp-list-grid .grp-num {
	display: none;
}

.grp-list-grid .grp-thumb {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
}

.grp-list-grid .grp-row-dur {
	margin: 0 4px 0 0;
}

.grp-list-grid .grp-desc {
	padding: 0 0 4px;
}

@container (max-width: 520px) {
	.grp-list-grid ol.grp-tracklist {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.grp-list-grid .grp-row-dur {
		display: inline;
	}
}

/* With more buttons in the row, the album buy buttons sit on their own line. */
.grp-layout-classic .grp-album-buy,
.grp-layout-showcase .grp-album-buy {
	grid-column: 1 / -1;
	justify-content: flex-start;
}

/* Hidden numbers stay hidden while their track is playing. */
.grp-player.grp-list-grid.is-playing .grp-row.is-current .grp-num,
.grp-player.grp-hide-num.is-playing .grp-row.is-current .grp-num {
	display: none;
}

/* ==== Version 1.9.1: a volume slider that looks like one on every theme ==== */

.grp-player input.grp-volume {
	-webkit-appearance: none;
	appearance: none;
	width: 96px;
	height: 28px;
	background: transparent;
}

.grp-player input.grp-volume::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(to right, var(--grp-wave-on) 0, var(--grp-wave-on) var(--grp-vol, 100%), var(--grp-muted) var(--grp-vol, 100%), var(--grp-muted) 100%);
}

.grp-player input.grp-volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -5px;
	border-radius: 50%;
	background: var(--grp-wave-on);
	border: 2px solid var(--grp-bg);
	box-shadow: 0 0 0 1px var(--grp-wave-on);
}

.grp-player input.grp-volume::-moz-range-track {
	height: 6px;
	border-radius: 3px;
	background: var(--grp-muted);
}

.grp-player input.grp-volume::-moz-range-progress {
	height: 6px;
	border-radius: 3px;
	background: var(--grp-wave-on);
}

.grp-player input.grp-volume::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--grp-wave-on);
	border: 2px solid var(--grp-bg);
	box-shadow: 0 0 0 1px var(--grp-wave-on);
}
