.svp-wrapper {
	margin: 20px 0;
}

.svp-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 18px;
	position: relative;
	z-index: 2;
}

.svp-view-toggle {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.svp-toggle-btn {
	padding: 8px 16px;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	cursor: pointer;
	border-radius: 4px;
	font-size: 14px;
	transition: background .15s, color .15s, border-color .15s;
}

.svp-toggle-btn:hover {
	border-color: #999;
}

.svp-toggle-btn.active {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.svp-filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.svp-category-select,
.svp-youtube-select {
	flex: 0 0 auto;
	width: auto !important;
	max-width: 220px !important;
	padding: 7px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font-size: 13px;
}

.svp-filterbar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.svp-letter-btn {
	min-width: 30px;
	height: 30px;
	padding: 0 6px;
	border: 1px solid #999;
	background: #fff;
	color: #111;
	font-weight: 700;
	cursor: pointer;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1;
	transition: background .15s, color .15s, border-color .15s;
}

.svp-letter-btn:hover:not(:disabled) {
	border-color: #555;
	background: #f5f5f5;
}

.svp-letter-btn.active {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.svp-letter-btn:disabled,
.svp-letter-btn.svp-letter-disabled {
	color: #ccc;
	border-color: #eee;
	font-weight: 400;
	cursor: not-allowed;
}

.svp-song-item.svp-letter-hidden {
	display: none !important;
}

/* ---------- Kartenansicht ---------- */

.svp-songs.svp-view-karten {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.svp-view-karten .svp-song-item {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s, background-color .4s ease;
}

.svp-view-karten .svp-song-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

/* Helle Schriftvariante, falls die aus dem Bild ermittelte Hintergrundfarbe
   dennoch zu dunkel für dunklen Text ausfällt (z.B. bei sehr dunklen Covern).
   Die serverseitige Berechnung wählt diese Variante nur, wenn sie ein
   WCAG-AA-konformes Kontrastverhältnis (mind. 4,5:1) liefert. */
.svp-song-item.svp-dark-bg .svp-song-title,
.svp-song-item.svp-dark-bg .svp-interpret {
	color: #fff;
}

.svp-song-item.svp-dark-bg .svp-song-meta {
	color: #f0f0f0;
}

.svp-song-item.svp-dark-bg .svp-song-youtube a {
	color: #fff;
	text-decoration: underline;
}

.svp-song-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	right: auto;
	bottom: auto;
	display: inline-block;
	width: max-content;
	max-width: calc(100% - 20px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: rgba(20, 20, 20, .72);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 999px;
	line-height: 1.4;
}

.svp-song-badge-lyrics {
	top: auto;
	left: auto;
	right: 10px;
	bottom: 10px;
	background: rgba(34, 113, 177, .85);
}

.svp-song-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.svp-view-karten .svp-song-image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f0f0f0;
}

.svp-song-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.svp-song-image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #eee, #ddd);
}

.svp-view-karten .svp-song-info {
	padding: 14px 16px;
}

.svp-song-title {
	margin: 0 0 4px;
	font-size: 17px;
	line-height: 1.3;
	color: #1a1a1a;
}

.svp-song-meta {
	margin: 2px 0;
	font-size: 13px;
	color: #444;
}

.svp-interpret {
	font-weight: 600;
	color: #1a1a1a;
	font-size: 14px;
}

.svp-song-youtube {
	padding: 0 16px 14px;
}

.svp-song-youtube a {
	font-size: 13px;
	color: #c00;
	text-decoration: none;
}

.svp-song-youtube a:hover {
	text-decoration: underline;
}

/* ---------- Listenansicht ---------- */

.svp-songs.svp-view-liste {
	display: flex;
	flex-direction: column;
	border-top: 1px solid #e2e2e2;
}

.svp-view-liste .svp-song-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: none;
	border-bottom: 1px solid #e2e2e2;
	border-radius: 0;
}

.svp-view-liste .svp-song-link {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 16px;
	padding: 10px 0;
	min-width: 0;
}

.svp-view-liste .svp-song-image {
	position: relative;
	width: 90px;
	flex-shrink: 0;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 4px;
}

.svp-view-liste .svp-song-badge {
	top: 4px;
	left: 4px;
	padding: 2px 6px;
	font-size: 9px;
}

.svp-view-liste .svp-song-badge-lyrics {
	top: auto;
	left: auto;
	right: 4px;
	bottom: 4px;
}

.svp-view-liste .svp-song-info {
	padding: 0;
	display: flex;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
	min-width: 0;
}

.svp-view-liste .svp-song-title {
	font-size: 15px;
	margin: 0;
	min-width: 160px;
}

.svp-view-liste .svp-song-youtube {
	padding: 0 4px;
	flex-shrink: 0;
}

@media (max-width: 480px) {
	.svp-view-liste .svp-song-link {
		flex-wrap: wrap;
	}
	.svp-view-liste .svp-song-image {
		width: 70px;
	}
}
