/* MP3 Folder Player – Gestaltung nach den Plugin-Designregeln (Vorbild: Podcast Player) */

/* ---------- Farben: Dunkel ist Standard ---------- */
.mp3p {
	--mp3p-bg: #17171a;
	--mp3p-text: #f2f2f4;
	--mp3p-muted: #a4a4ad;
	--mp3p-line: #2e2e34;
	--mp3p-hover: rgba(255, 255, 255, .06);
	--mp3p-accent: #ff7a3d;
	--mp3p-on-accent: #141416;
}
.mp3p--dark.mp3p--acc-blau    { --mp3p-accent: #6ea8ff; }
.mp3p--dark.mp3p--acc-petrol  { --mp3p-accent: #2dd4bf; }
.mp3p--dark.mp3p--acc-schwarz { --mp3p-accent: #f2f2f4; }

.mp3p--light {
	--mp3p-bg: #ffffff;
	--mp3p-text: #1c1c1e;
	--mp3p-muted: #5f5f66;
	--mp3p-line: #e0ded8;
	--mp3p-hover: rgba(0, 0, 0, .05);
	--mp3p-accent: #c2410c;
	--mp3p-on-accent: #ffffff;
}
.mp3p--light.mp3p--acc-blau    { --mp3p-accent: #1d4ed8; }
.mp3p--light.mp3p--acc-petrol  { --mp3p-accent: #0f766e; }
.mp3p--light.mp3p--acc-schwarz { --mp3p-accent: #16161a; }

@media (prefers-color-scheme: light) {
	.mp3p--auto {
		--mp3p-bg: #ffffff;
		--mp3p-text: #1c1c1e;
		--mp3p-muted: #5f5f66;
		--mp3p-line: #e0ded8;
		--mp3p-hover: rgba(0, 0, 0, .05);
		--mp3p-accent: #c2410c;
		--mp3p-on-accent: #ffffff;
	}
	.mp3p--auto.mp3p--acc-blau    { --mp3p-accent: #1d4ed8; }
	.mp3p--auto.mp3p--acc-petrol  { --mp3p-accent: #0f766e; }
	.mp3p--auto.mp3p--acc-schwarz { --mp3p-accent: #16161a; }
}

/* Eigene Farbe wird inline gesetzt (--mp3p-accent, --mp3p-on-accent) und gilt in beiden Modi. */

/* ---------- Karte ---------- */
.mp3p {
	box-sizing: border-box;
	max-width: 760px;
	margin: 1.5em auto;
	padding: 16px;
	background: var(--mp3p-bg) !important;
	color: var(--mp3p-text) !important;
	border: 1px solid var(--mp3p-line);
	border-radius: 12px;
	font-size: 16px;
	line-height: 1.45;
	text-align: left;
}
.mp3p *, .mp3p *::before, .mp3p *::after { box-sizing: border-box; }

/* Schutz gegen Theme-Regeln */
.mp3p h3, .mp3p p, .mp3p span, .mp3p div, .mp3p li, .mp3p ul, .mp3p button, .mp3p label {
	text-transform: none !important;
	letter-spacing: normal !important;
	text-shadow: none !important;
	font-family: inherit;
	text-align: left;
}
.mp3p h3, .mp3p p, .mp3p span, .mp3p li, .mp3p ul, .mp3p div { color: var(--mp3p-text) !important; }
.mp3p h3, .mp3p p, .mp3p ul, .mp3p li { margin: 0; padding: 0; background: none !important; border: 0; box-shadow: none !important; }
.mp3p ul, .mp3p li { list-style: none !important; }
.mp3p li::marker { content: none; }

.mp3p .mp3p__heading { font-size: 20px; font-weight: 700; line-height: 1.25; margin: 0 0 12px; }
.mp3p .mp3p__note { font-size: 13px; color: var(--mp3p-muted) !important; }

/* ---------- Aktueller Titel ---------- */
.mp3p .mp3p__now { display: flex; align-items: center; gap: 14px; }
.mp3p .mp3p__art {
	flex: 0 0 auto;
	width: 72px; height: 72px;
	border-radius: 8px;
	background: var(--mp3p-hover) !important;
	border: 1px solid var(--mp3p-line);
	overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	color: var(--mp3p-muted) !important;
}
.mp3p .mp3p__art img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.mp3p .mp3p__art svg { width: 28px; height: 28px; }
.mp3p .mp3p__info { min-width: 0; flex: 1 1 auto; }
.mp3p .mp3p__cur-title { font-size: 20px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.mp3p .mp3p__cur-meta, .mp3p .mp3p__item-meta, .mp3p .mp3p__time, .mp3p .mp3p__dur { font-size: 13px; color: var(--mp3p-muted) !important; }
.mp3p .mp3p__cur-meta { margin-top: 2px; }
.mp3p .mp3p__status { font-size: 13px; color: var(--mp3p-accent) !important; margin-top: 2px; min-height: 0; }
.mp3p .mp3p__status:empty { display: none; }

/* ---------- Bedienung ---------- */
.mp3p .mp3p__controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

.mp3p button {
	-webkit-appearance: none; appearance: none;
	margin: 0;
	background: transparent !important;
	box-shadow: none !important;
	text-shadow: none !important;
	font: inherit;
	cursor: pointer;
	color: var(--mp3p-text) !important;
}
.mp3p button svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mp3p button svg .fill { fill: currentColor; stroke: none; }

.mp3p .mp3p__btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px;
	padding: 0;
	border: 1px solid var(--mp3p-line) !important;
	border-radius: 8px;
}
.mp3p .mp3p__btn:hover { border-color: var(--mp3p-accent) !important; }
.mp3p .mp3p__btn svg { width: 18px; height: 18px; }

.mp3p .mp3p__play {
	display: inline-flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; min-width: 56px;
	padding: 0;
	border: 0 !important;
	border-radius: 50%;
	background: var(--mp3p-accent) !important;
	color: var(--mp3p-on-accent) !important;
}
.mp3p .mp3p__play:hover { filter: brightness(1.08); }
.mp3p .mp3p__play svg { width: 22px; height: 22px; }

.mp3p .mp3p__seekwrap { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.mp3p .mp3p__time { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.mp3p .mp3p__time--end { text-align: right !important; }

.mp3p input[type="range"] {
	-webkit-appearance: auto; appearance: auto;
	flex: 1 1 auto; min-width: 0;
	width: 100%; height: 44px;
	margin: 0; padding: 0;
	background: transparent;
	border: 0; box-shadow: none;
	accent-color: var(--mp3p-accent);
	cursor: pointer;
}

.mp3p .mp3p__vol { display: none; align-items: center; gap: 6px; color: var(--mp3p-muted) !important; }
.mp3p .mp3p__vol svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mp3p .mp3p__vol input[type="range"] { width: 90px; flex: 0 0 90px; }

/* ---------- Liste (scrollbar, Höhe einstellbar) ---------- */
.mp3p .mp3p__list {
	margin: 14px 0 0;
	max-height: var(--mp3p-height, 360px);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: var(--mp3p-line) transparent;
}
.mp3p.mp3p--fullheight .mp3p__list { max-height: none; overflow-y: visible; }
.mp3p .mp3p__list:empty { display: none; }
.mp3p .mp3p__list::-webkit-scrollbar { width: 8px; }
.mp3p .mp3p__list::-webkit-scrollbar-thumb { background: var(--mp3p-line); border-radius: 4px; }

.mp3p .mp3p__li { border-top: 1px solid var(--mp3p-line) !important; }
.mp3p .mp3p__li:first-child { border-top: 0 !important; }

.mp3p .mp3p__item {
	display: flex; align-items: center; gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 6px 8px;
	border: 0 !important;
	border-radius: 8px;
	text-align: left;
}
.mp3p .mp3p__item:hover { background: var(--mp3p-hover) !important; }
.mp3p .mp3p__li.is-active .mp3p__item { background: var(--mp3p-hover) !important; }
.mp3p .mp3p__li.is-active .mp3p__item-title { color: var(--mp3p-accent) !important; }

.mp3p .mp3p__thumb {
	flex: 0 0 auto;
	width: 44px; height: 44px;
	border-radius: 6px;
	background: var(--mp3p-hover) !important;
	border: 1px solid var(--mp3p-line);
	overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	color: var(--mp3p-muted) !important;
}
.mp3p .mp3p__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.mp3p .mp3p__thumb svg { width: 16px; height: 16px; }
.mp3p .mp3p__li.is-playing .mp3p__thumb { color: var(--mp3p-accent) !important; }

.mp3p .mp3p__item-text { flex: 1 1 auto; min-width: 0; display: block; }
.mp3p .mp3p__item-title { display: block; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.mp3p .mp3p__item-meta { display: block; margin-top: 1px; overflow-wrap: anywhere; }
.mp3p .mp3p__dur { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

.mp3p .mp3p__empty { padding: 12px 0 4px; font-size: 13px; color: var(--mp3p-muted) !important; }

/* ---------- Fokus ---------- */
.mp3p button:focus-visible, .mp3p input[type="range"]:focus-visible {
	outline: 2px solid var(--mp3p-accent) !important;
	outline-offset: 3px;
}

/* ---------- Breiter Bildschirm: Lautstärke zeigen ---------- */
@media (min-width: 560px) {
	.mp3p .mp3p__vol { display: inline-flex; }
}

/* ---------- Handy ---------- */
@media (max-width: 480px) {
	.mp3p { padding: 16px; }
	.mp3p .mp3p__art { width: 56px; height: 56px; }
	.mp3p .mp3p__controls { flex-wrap: wrap; }
	.mp3p .mp3p__seekwrap { flex: 1 1 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
	.mp3p * { transition: none !important; animation: none !important; }
}
