/* Antenne Bethel Live-Player [ab_player] – passend zum Sahifa-Theme von antenne-bethel.de */

.abpl-player {
	--abpl-accent: #c14030;
	--abpl-accent-dark: #a2321f;
	--abpl-text: #333;
	--abpl-muted: #777;
	--abpl-bg: #f4f7f9;
	--abpl-line: #e3e8ec;
	box-sizing: border-box;
	background: var(--abpl-bg);
	border-radius: 5px;
	padding: 12px;
	font-family: Arial, Helvetica, sans-serif;
	color: var(--abpl-text);
	line-height: 1.35;
	max-width: 100%;
	container-type: inline-size;
}

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

/* Jetzt läuft */
.abpl-player__now {
	display: flex;
	gap: 12px;
	align-items: center;
}

.abpl-player__cover {
	position: relative;
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.abpl-player__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity .35s ease;
}

.abpl-player__cover img.is-loading {
	opacity: 0;
}

.abpl-player__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 2px;
}

.abpl-player__live {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
	margin-bottom: 3px;
	padding: 2px 7px 1px;
	border-radius: 2px;
	background: var(--abpl-accent);
	color: #fff;
	font-family: BebasNeueRegular, "Bebas Neue", Arial, sans-serif;
	font-size: 13px;
	letter-spacing: .06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.abpl-player__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	opacity: .55;
}

.abpl-player.is-playing .abpl-player__dot {
	opacity: 1;
	animation: abpl-pulse 1.4s ease-in-out infinite;
}

@keyframes abpl-pulse {
	50% { opacity: .25; transform: scale(.7); }
}

.abpl-player__title {
	font-size: 14px;
	font-weight: 700;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.abpl-player__artist {
	font-size: 12px;
	color: var(--abpl-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.abpl-player__artist:empty {
	display: none;
}

/* Bedienung */
.abpl-player__controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--abpl-line);
}

.abpl-player button {
	appearance: none;
	margin: 0;
	border: 0;
	background: none;
	padding: 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
	line-height: 0;
}

.abpl-player button:focus-visible,
.abpl-player__slider:focus-visible {
	outline: 2px solid var(--abpl-accent);
	outline-offset: 2px;
}

.abpl-player__play {
	position: relative;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50% !important;
	background: var(--abpl-accent) !important;
	color: #fff !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
	display: grid;
	place-items: center;
	transition: background-color .15s ease, transform .1s ease;
}

.abpl-player__play:hover {
	background: var(--abpl-accent-dark) !important;
}

.abpl-player__play:active {
	transform: scale(.95);
}

.abpl-player__play svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	grid-area: 1 / 1;
}

.abpl-i-play {
	margin-left: 2px;
}

.abpl-i-stop,
.abpl-i-load,
.abpl-player.is-playing .abpl-i-play,
.abpl-player.is-loading .abpl-i-play,
.abpl-player.is-loading .abpl-i-stop {
	display: none;
}

.abpl-player.is-playing .abpl-i-stop {
	display: block;
}

.abpl-player.is-loading .abpl-i-load {
	display: block;
	grid-area: 1 / 1;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: abpl-spin .8s linear infinite;
}

@keyframes abpl-spin {
	to { transform: rotate(360deg); }
}

.abpl-player__status {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 12px;
	color: var(--abpl-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.abpl-player.is-error .abpl-player__status {
	color: var(--abpl-accent);
}

.abpl-player__volume {
	display: flex;
	align-items: center;
	gap: 4px;
}

.abpl-player__mute,
.abpl-player__popup {
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	color: #5c6773 !important;
	border-radius: 50% !important;
}

.abpl-player__mute:hover,
.abpl-player__popup:hover {
	color: var(--abpl-accent) !important;
}

.abpl-player__mute svg,
.abpl-player__popup svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	grid-area: 1 / 1;
}

.abpl-player__popup svg {
	width: 17px;
	height: 17px;
}

.abpl-i-muted,
.abpl-player.is-muted .abpl-i-vol {
	display: none;
}

.abpl-player.is-muted .abpl-i-muted {
	display: block;
}

.abpl-player__slider {
	-webkit-appearance: none;
	appearance: none;
	width: 64px;
	height: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: linear-gradient(to right, var(--abpl-accent) var(--abpl-vol, 80%), #cfd6dc var(--abpl-vol, 80%));
	cursor: pointer;
}

.abpl-player__slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--abpl-accent);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.abpl-player__slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--abpl-accent);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

/* iPhone/iPad: Lautstärke lässt sich per Skript nicht ändern → Regler ausblenden */
.abpl-player.no-volume .abpl-player__slider {
	display: none;
}

.abpl-player--nocover .abpl-player__cover {
	display: none;
}

/* Schmale Sidebar */
@container (max-width: 250px) {
	.abpl-player__slider { display: none; }
	.abpl-player__status { font-size: 11px; }
}

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

/* Popup-Fenster */
body.abpl-popup {
	margin: 0;
	min-height: 100vh;
	display: grid;
	place-items: center;
	background: #fff;
	padding: 12px;
	box-sizing: border-box;
}

body.abpl-popup .abpl-player {
	width: 100%;
	max-width: 420px;
	border-bottom: 4px solid #c14030;
	box-shadow: 0 0 3px #cacaca;
	background: #fff;
}

body.abpl-popup .abpl-player__cover {
	flex-basis: 110px;
	width: 110px;
	height: 110px;
}
