/* Playlista Dissu na raka */

.cfpl {
	--cfpl-surface: rgba(255, 255, 255, 0.035);
	--cfpl-line: rgba(255, 255, 255, 0.08);
	--cfpl-text: #fff;
	--cfpl-mute: #8e909a;
	--cfpl-red: #dc0c38;
	--cfpl-red-hi: #ff3358;
	--cfpl-display: "Poppins", sans-serif;
	--cfpl-mono: "Azeret Mono", ui-monospace, monospace;

	position: relative;
	padding: 6px;
	border: 1px solid var(--cfpl-line);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--cfpl-text);
	font-family: var(--cfpl-mono);
}

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

/* Nagłówek */

.cfpl-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px 12px;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.cfpl-head-label {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: rgba(255, 255, 255, 0.78);
}

.cfpl-head-label::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cfpl-red);
}

.cfpl.is-playing .cfpl-head-label::before {
	animation: cfpl-pulse 1.6s ease-in-out infinite;
}

.cfpl-head-meta {
	color: var(--cfpl-mute);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Odtwarzacz Spotify */

.cfpl-deck {
	overflow: hidden;
	height: 152px;
	border-radius: 11px;
	background: #0b0c10;
}

.cfpl-deck iframe {
	display: block;
	width: 100%;
	height: 152px;
	border: 0;
	border-radius: 11px;
}

.cfpl-deck-wait {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 152px;
	padding: 16px;
	background: linear-gradient(120deg, #2b0a14 0%, #15161c 70%);
}

.cfpl-deck-wait img {
	flex: none;
	width: 120px;
	height: 120px;
	border-radius: 8px;
	object-fit: cover;
}

.cfpl-deck-wait-text {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.cfpl-deck-wait-title {
	font-family: var(--cfpl-display);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.cfpl-deck-wait-artists {
	overflow: hidden;
	color: var(--cfpl-mute);
	font-size: 11px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Lista utworów */

.cfpl-list {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.cfpl-track {
	margin: 0;
	padding: 0;
}

.cfpl-btn,
.cfpl-track.is-soon {
	display: grid;
	grid-template-columns: 26px 52px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 10px 12px 16px;
	border-radius: 11px;
}

.cfpl-btn {
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.cfpl-btn:hover {
	background: rgba(255, 255, 255, 0.045);
}

.cfpl-btn:focus {
	outline: none;
}

.cfpl-btn:focus-visible {
	outline: 2px solid var(--cfpl-red-hi);
	outline-offset: -2px;
}

.cfpl-track.is-active .cfpl-btn {
	background: rgba(220, 12, 56, 0.11);
}

/* Numer / ikona */

.cfpl-num {
	position: relative;
	display: grid;
	place-items: center;
	height: 20px;
	color: var(--cfpl-mute);
	font-size: 12px;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
}

.cfpl-num > * {
	grid-area: 1 / 1;
}

.cfpl-num-play,
.cfpl-num-pause,
.cfpl-eq {
	visibility: hidden;
}

.cfpl-btn:hover .cfpl-num-n,
.cfpl-track.is-active .cfpl-num-n {
	visibility: hidden;
}

.cfpl-btn:hover .cfpl-num-play {
	visibility: visible;
	color: #fff;
}

.cfpl-track.is-active .cfpl-num-play {
	visibility: visible;
	color: var(--cfpl-red-hi);
}

.cfpl.is-playing .cfpl-track.is-active .cfpl-num-play {
	visibility: hidden;
}

.cfpl.is-playing .cfpl-track.is-active .cfpl-eq {
	visibility: visible;
}

.cfpl.is-playing .cfpl-track.is-active .cfpl-btn:hover .cfpl-eq {
	visibility: hidden;
}

.cfpl.is-playing .cfpl-track.is-active .cfpl-btn:hover .cfpl-num-pause {
	visibility: visible;
	color: #fff;
}

.cfpl-eq {
	display: flex;
	align-items: flex-end;
	gap: 2px;
	height: 13px;
}

.cfpl-eq i {
	display: block;
	width: 3px;
	height: 100%;
	border-radius: 1px;
	background: var(--cfpl-red-hi);
	transform-origin: bottom;
	animation: cfpl-eq 0.9s ease-in-out infinite;
}

.cfpl-eq i:nth-child(2) {
	animation-delay: -0.35s;
	animation-duration: 0.75s;
}

.cfpl-eq i:nth-child(3) {
	animation-delay: -0.6s;
	animation-duration: 1.05s;
}

/* Okładka */

.cfpl-cover {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 7px;
	background: #1d1f26;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Tytuł, artyści, kreska postępu */

.cfpl-text {
	position: relative;
	display: grid;
	gap: 3px;
	min-width: 0;
}

.cfpl-title {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	font-family: var(--cfpl-display);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.92);
}

.cfpl-title-t {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.cfpl-track.is-active .cfpl-title {
	color: #fff;
}

.cfpl-e {
	flex: none;
	padding: 1px 4px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.16);
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--cfpl-mono);
	font-size: 9px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: help;
}

.cfpl-artists {
	overflow: hidden;
	color: var(--cfpl-mute);
	font-size: 11.5px;
	line-height: 1.45;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.cfpl-ink {
	position: absolute;
	left: -2px;
	right: 0;
	bottom: -13px;
	width: calc(100% + 2px);
	height: 9px;
	overflow: visible;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.cfpl-ink path {
	fill: none;
	stroke-width: 2.6;
	stroke-linecap: round;
}

.cfpl-ink-bg {
	stroke: rgba(255, 255, 255, 0.1);
}

.cfpl-ink-fg {
	stroke: var(--cfpl-red-hi);
	stroke-dasharray: 1 1;
	stroke-dashoffset: 1;
	transition: stroke-dashoffset 0.6s linear;
}

.cfpl-track.is-active .cfpl-ink {
	opacity: 1;
}

.cfpl-time {
	color: var(--cfpl-mute);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

/* Miejsce na kolejny utwór */

.cfpl-track.is-soon .cfpl-num {
	color: rgba(255, 255, 255, 0.28);
}

.cfpl-cover-soon {
	background: transparent;
	box-shadow: none;
}

.cfpl-cover-soon svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.cfpl-cover-soon rect {
	fill: none;
	stroke: rgba(255, 255, 255, 0.24);
	stroke-width: 1.2;
	stroke-dasharray: 4 4;
	animation: cfpl-ants 14s linear infinite;
}

.cfpl-cover-soon path {
	fill: none;
	stroke: rgba(255, 255, 255, 0.45);
	stroke-width: 1.6;
	stroke-linecap: round;
}

.cfpl-track.is-soon .cfpl-title {
	color: rgba(255, 255, 255, 0.5);
}

.cfpl-track.is-soon .cfpl-artists {
	color: var(--cfpl-red-hi);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Stopka */

.cfpl-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	margin-top: 4px;
	padding: 12px 12px 8px;
	border-top: 1px solid var(--cfpl-line);
}

.cfpl-foot-link,
.cfpl-foot-link:visited {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #fff;
	font-family: var(--cfpl-display);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease;
}

.cfpl-foot-link:hover,
.cfpl-foot-link:focus-visible {
	color: var(--cfpl-red-hi);
}

.cfpl-foot-link:focus-visible {
	outline: 2px solid var(--cfpl-red-hi);
	outline-offset: 3px;
	border-radius: 2px;
}

.cfpl-foot-note {
	color: var(--cfpl-mute);
	font-size: 10.5px;
}

/* Animacje */

@keyframes cfpl-eq {
	0%, 100% { transform: scaleY(0.3); }
	50% { transform: scaleY(1); }
}

@keyframes cfpl-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(220, 12, 56, 0.6); }
	70% { box-shadow: 0 0 0 7px rgba(220, 12, 56, 0); }
}

@keyframes cfpl-ants {
	to { stroke-dashoffset: -96; }
}

@media (prefers-reduced-motion: reduce) {
	.cfpl-eq i,
	.cfpl.is-playing .cfpl-head-label::before,
	.cfpl-cover-soon rect {
		animation: none;
	}
	.cfpl-eq i:nth-child(1) { transform: scaleY(0.55); }
	.cfpl-eq i:nth-child(3) { transform: scaleY(0.75); }
	.cfpl-ink-fg,
	.cfpl-btn,
	.cfpl-ink {
		transition: none;
	}
}

/* Telefon */

@media (max-width: 600px) {
	.cfpl {
		padding: 4px;
		border-radius: 14px;
	}
	.cfpl-head {
		padding: 10px 10px 10px;
		font-size: 10px;
		letter-spacing: 0.07em;
	}
	.cfpl-head-label {
		gap: 7px;
	}
	.cfpl-btn,
	.cfpl-track.is-soon {
		grid-template-columns: 20px 44px minmax(0, 1fr) auto;
		gap: 12px;
		padding: 9px 10px 15px;
	}
	.cfpl-cover {
		width: 44px;
		height: 44px;
		border-radius: 6px;
	}
	.cfpl-title {
		align-items: flex-start;
		font-size: 14px;
	}
	.cfpl-title-t {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		white-space: normal;
	}
	.cfpl-e {
		margin-top: 2px;
	}
	.cfpl-artists {
		font-size: 11px;
	}
	.cfpl-foot {
		padding: 12px 10px 8px;
	}
}
