/* Fuggi Podcast – neutrales Design: übernimmt Schrift und Farben vom Joomla-Template. */

.fuggi-podcast {
	--fp-accent: var(--fp-accent-custom, var(--cassiopeia-color-primary, #2a5d8f));
	--fp-line: color-mix(in srgb, currentColor 18%, transparent);
	--fp-soft: color-mix(in srgb, currentColor 6%, transparent);
	--fp-hover: color-mix(in srgb, currentColor 10%, transparent);
	--fp-muted: color-mix(in srgb, currentColor 68%, transparent);
	--fp-r: .6rem;
	container: fuggi-podcast / inline-size;
	box-sizing: border-box;
	color: inherit;
	font: inherit;
	line-height: 1.4;
}

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

.fuggi-podcast.fp-bordered { border: 1px solid var(--fp-line); padding: 1rem; }
.fuggi-podcast.fp-r-none   { --fp-r: 0; }
.fuggi-podcast.fp-r-small  { --fp-r: .3rem; }
.fuggi-podcast.fp-r-medium { --fp-r: .6rem; }
.fuggi-podcast.fp-r-large  { --fp-r: 1.1rem; }
.fuggi-podcast.fp-bordered { border-radius: var(--fp-r); }

.fuggi-podcast.fp-unavailable { padding: 1rem; border: 1px dashed var(--fp-line); border-radius: var(--fp-r); }
.fuggi-podcast.fp-unavailable p { margin: 0; }

.fuggi-podcast ul,
.fuggi-podcast ol { list-style: none; margin: 0; padding: 0; }
.fuggi-podcast p  { margin: 0; }

.fuggi-podcast button { font: inherit; color: inherit; }

.fuggi-podcast :focus-visible {
	outline: 2px solid var(--fp-accent);
	outline-offset: 2px;
}

/* ---------- Kopfbereich ---------- */
.fp-head {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"cover text"
		"cover sub";
	column-gap: 1.25rem;
	row-gap: .9rem;
	align-items: start;
	margin-bottom: 1.25rem;
}

.fp-no-cover .fp-head {
	grid-template-columns: 1fr;
	grid-template-areas: "text" "sub";
}

.fp-cover {
	grid-area: cover;
	width: 9rem;
	height: 9rem;
	max-width: none;
	object-fit: cover;
	border-radius: var(--fp-r);
	background: var(--fp-soft);
}

.fp-head-text { grid-area: text; min-width: 0; align-self: end; }
.fp-subscribe { grid-area: sub; min-width: 0; align-self: start; }

.fp-headline { margin: 0 0 .35rem; font-size: 1.35em; line-height: 1.2; }
.fp-desc { color: var(--fp-muted); max-width: 60ch; }

.fp-sub-label { font-size: .9em; color: var(--fp-muted); margin-bottom: .45rem; }
.fp-sub-list { display: flex; flex-wrap: wrap; gap: .5rem; }

.fp-chip {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	min-height: 2.5rem;
	padding: .4rem .9rem;
	border: 1px solid var(--fp-line);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: .92em;
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.fp-chip:hover { border-color: var(--fp-accent); background: var(--fp-soft); color: inherit; text-decoration: none; }
.fp-chip .fp-i { width: 1.15rem; height: 1.15rem; flex: none; }

/* ---------- Player ---------- */
.fp-player {
	border: 1px solid var(--fp-line);
	background: var(--fp-soft);
	border-radius: var(--fp-r);
	padding: 1rem 1.1rem;
	margin-bottom: 1.25rem;
}

.fp-audio { width: 100%; display: block; }
.fp-js .fp-audio { display: none; }
.fuggi-podcast:not(.fp-js) .fp-custom { display: none; }

.fp-now { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .8rem; min-width: 0; }
.fp-now-title { font-size: 1.1em; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-now-meta { color: var(--fp-muted); font-size: .9em; min-height: 1.2em; }

.fp-progress { display: flex; align-items: center; gap: .65rem; }
.fp-time { font-variant-numeric: tabular-nums; font-size: .85em; color: var(--fp-muted); min-width: 3.2ch; }
.fp-time.fp-dur { text-align: right; }
.fp-seek,
.fp-volume { accent-color: var(--fp-accent); cursor: pointer; }
.fp-seek { flex: 1 1 auto; min-width: 0; height: 1.6rem; margin: 0; }

.fp-controls { display: flex; align-items: center; gap: .25rem; margin-top: .4rem; flex-wrap: wrap; }
.fp-spacer { flex: 1 1 auto; }

.fp-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 .5rem;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .15s;
}
.fp-btn:hover { background: var(--fp-hover); }
.fp-btn .fp-i { width: 1.6rem; height: 1.6rem; }

.fp-skip-n {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: .22rem;
	font-size: .58rem;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}
.fp-fwd .fp-i-skip { transform: scaleX(-1); }

.fp-play {
	width: 3.4rem;
	height: 3.4rem;
	margin: 0 .35rem;
	background: var(--fp-accent);
	color: #fff;
}
.fp-play:hover { background: var(--fp-accent); filter: brightness(1.12); }
.fp-play .fp-i { width: 1.7rem; height: 1.7rem; }

.fp-speed { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .92em; border-color: var(--fp-line); min-width: 3.4rem; }

.fp-vol { display: flex; align-items: center; gap: .25rem; }
.fp-volume { width: 5.5rem; }

/* Play/Pause und Stumm-Symbole umschalten */
.fp-i-pause, .fp-i-muted { display: none; }
.is-playing .fp-play .fp-i-play { display: none; }
.is-playing .fp-play .fp-i-pause { display: block; }
.is-muted .fp-mute .fp-i-vol { display: none; }
.is-muted .fp-mute .fp-i-muted { display: block; }
.is-loading .fp-play { opacity: .75; }

.fp-error { margin-top: .6rem; padding: .5rem .75rem; border-left: 3px solid var(--fp-accent); background: var(--fp-hover); border-radius: 0 var(--fp-r) var(--fp-r) 0; font-size: .92em; }
.fp-error[hidden] { display: none; }

/* ---------- Episodenliste ---------- */
.fp-list-title { margin: 0 0 .5rem; font-size: 1.05em; font-weight: 600; line-height: 1.3; }
.fp-list { border-top: 1px solid var(--fp-line); }

.fp-item {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	border-bottom: 1px solid var(--fp-line);
}
.fp-item::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 2px;
	width: calc(var(--fp-prog, 0) * 100%);
	background: var(--fp-accent);
	opacity: .55;
	pointer-events: none;
}
.fp-js .fp-item.is-current { display: none; }

.fp-ep {
	display: flex;
	align-items: center;
	gap: .8rem;
	width: 100%;
	padding: .75rem .5rem;
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
	min-width: 0;
}
.fp-ep:hover { background: var(--fp-hover); }
.fuggi-podcast:not(.fp-js) .fp-ep { cursor: default; pointer-events: none; }

.fp-ep-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--fp-line);
	border-radius: 50%;
}
.fp-ep-icon .fp-i { width: 1rem; height: 1rem; }

.fp-ep-main { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.fp-ep-title { overflow-wrap: anywhere; }
.fp-ep-meta { display: flex; flex-wrap: wrap; gap: .1rem 1rem; font-size: .85em; color: var(--fp-muted); }
.fp-ep-meta:empty { display: none; }
.fp-ep-author { font-weight: 500; }
.fp-item.is-done .fp-ep-title { color: var(--fp-muted); }

.fp-dl {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	color: var(--fp-muted);
	border-radius: 50%;
	text-decoration: none;
}
.fp-dl:hover { color: inherit; background: var(--fp-hover); }
.fp-dl .fp-i { width: 1.25rem; height: 1.25rem; }

/* ---------- Kompakte Darstellung und schmale Spalten ---------- */
.fp-layout-compact .fp-head,
.fp-layout-compact.fp-no-cover .fp-head {
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"cover text"
		"sub sub";
	column-gap: .9rem;
}
.fp-layout-compact.fp-no-cover .fp-head { grid-template-columns: 1fr; grid-template-areas: "text" "sub"; }
.fp-layout-compact .fp-cover { width: 4.5rem; height: 4.5rem; }
.fp-layout-compact .fp-head-text { align-self: center; }
.fp-layout-compact .fp-headline { font-size: 1.1em; margin-bottom: .2rem; }
.fp-layout-compact .fp-desc { font-size: .9em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fp-layout-compact .fp-player { padding: .8rem; }
.fp-layout-compact .fp-vol { display: none; }
.fp-layout-compact .fp-ep { padding: .6rem .3rem; gap: .6rem; }
.fp-layout-compact .fp-ep-icon { width: 1.75rem; height: 1.75rem; }
.fp-layout-compact .fp-sub-label { font-size: .8em; margin-bottom: .3rem; }
.fp-layout-compact .fp-sub-list { gap: .35rem; }
.fp-layout-compact .fp-chip { min-height: 1.9rem; padding: .15rem .6rem; gap: .35rem; font-size: .8em; }
.fp-layout-compact .fp-chip .fp-i { width: .95rem; height: .95rem; }
.fp-layout-compact .fp-head { margin-bottom: .9rem; row-gap: .6rem; }
.fp-layout-compact .fp-list-title { font-size: 1em; }

@container fuggi-podcast (max-width: 34rem) {
	.fp-head,
	.fp-no-cover .fp-head {
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"cover text"
			"sub sub";
		column-gap: .9rem;
	}
	.fp-no-cover .fp-head { grid-template-columns: 1fr; grid-template-areas: "text" "sub"; }
	.fp-cover { width: 5.5rem; height: 5.5rem; }
	.fp-head-text { align-self: center; }
	.fp-vol { display: none; }
	.fp-player { padding: .8rem; }
	.fp-sub-label { font-size: .8em; margin-bottom: .3rem; }
	.fp-sub-list { gap: .35rem; }
	.fp-chip { min-height: 1.9rem; padding: .15rem .6rem; gap: .35rem; font-size: .8em; }
	.fp-chip .fp-i { width: .95rem; height: .95rem; }
}

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