:root {
	--sap-accent: #7C3AED;
	--sap-accent-hover: #3B82F6;

	--sap-bg: rgba(8,12,25,.88);
	--sap-bg-elevated: rgba(18,24,40,.90);

	--sap-text: #FFFFFF;
	--sap-text-muted: #B8C5D6;

	--sap-height: 82px;
	--sap-height-collapsed: 50px;
}

.sap-player {
	position: fixed;
	left: 12px;
	right: 12px;
	z-index: 999999;
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--sap-height);
	padding: 0 18px;
	background: linear-gradient(
		135deg,
		rgba(34, 46, 80, 0.94),
		rgba(27, 38, 68, 0.92),
		rgba(21, 29, 55, 0.94)
	);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid rgba(90, 140, 255, 0.18);
	border-radius: 18px 18px 0 0;
	color: var(--sap-text);
	box-shadow:
		0 8px 30px rgba(0,0,0,.35),
		0 0 16px rgba(59,130,246,.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transition: all .25s ease;
	box-sizing: border-box;
}

.sap-player.sap-pos-top {
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

body.sap-has-player {
	transition: margin-bottom 0.25s ease, margin-top 0.25s ease;
}

.sap-player * {
	box-sizing: border-box;
}

.sap-player.sap-collapsed {
	height: var(--sap-height-collapsed);
}

.sap-player.sap-collapsed .sap-art-wrap {
	width: 32px;
	height: 32px;
}

.sap-player.sap-collapsed .sap-song-artist {
	display: none;
}

.sap-art-wrap {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 14px;
	overflow: hidden;
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.10);
	box-shadow:
		0 8px 24px rgba(0,0,0,.28);
	transition: all .30s ease;
}

.sap-art-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}

.sap-player:hover .sap-art-wrap img {
	transform: scale(1.05);
}

.sap-meta {
	flex: 1 1 auto;
	min-width: 0;
}

.sap-song-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: #FFFFFF;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sap-song-artist {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: #CBD5E1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sap-controls {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.sap-btn {
	background: transparent;
	border: none;
	color: var(--sap-text);
	cursor: pointer;
	padding: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	line-height: 1;
	transition: all .25s ease;
}

.sap-btn:hover {
	background: rgba(59,130,246,.12);
	color: #7C3AED;
	transform: translateY(-2px);
}

.sap-play-btn {
	position: relative;
	width: 48px;
	height: 48px;
	color: #fff;
	font-size: 16px;
	border-radius: 50%;
	background: linear-gradient(
		135deg,
		#7C3AED,
		#06B6D4);

	box-shadow: 0 10px 30px rgba(59,130,246,.35);
	transition: all .25s ease;
}

.sap-play-btn::before {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	background: linear-gradient(
		135deg,
		#7C3AED,
		#06B6D4
	);

	filter: blur(8px);
	opacity: .18;
	z-index: -1;
	transition: opacity .25s ease;
}

.sap-play-btn:hover::before {
	opacity: .30;
}

.sap-play-btn:hover {
	transform: scale(1.08);
	filter: brightness(1.08);
}

.sap-icon-pause {
	display: none;
}

.sap-player.is-playing .sap-icon-play {
	display: none;
}

.sap-player.is-playing .sap-icon-pause {
	display: inline;
}

.sap-volume-wrap {
	display: none;
	align-items: center;
	gap: 6px;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(236,72,153,.35);
	}
	70% {
		box-shadow: 0 0 0 12px rgba(236,72,153,0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(236,72,153,0);
	}
}

@media (min-width: 640px) {
	.sap-volume-wrap {
		display: flex;
	}
}

#sap-volume {
	width: 90px;
	accent-color: var(--sap-accent);
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: linear-gradient(to right, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%);
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

#sap-volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--sap-accent), #06B6D4);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
	transition: all 0.2s ease;
}

#sap-volume::-webkit-slider-thumb:hover {
	transform: scale(1.2);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

#sap-volume::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--sap-accent), #06B6D4);
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
	transition: all 0.2s ease;
}

#sap-volume::-moz-range-thumb:hover {
	transform: scale(1.2);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

#sap-volume::-moz-range-track {
	background: transparent;
	border: none;
}

.sap-live-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	color: #FFFFFF;
	padding: 5px 12px;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		#EC4899,
		#EF4444
	);
	opacity: .85;
}

.sap-live-badge.is-live {
	animation: pulse 6s ease-out infinite;
}

.sap-collapse-btn {
	flex: 0 0 auto;
}

.sap-chevron {
	display: inline-block;
	transition: transform 0.25s ease;
}

.sap-player.sap-collapsed .sap-chevron {
	transform: rotate(180deg);
}

@media (max-width:640px){
	.sap-player{
		height:78px;
		padding:0 12px;
		gap:10px;
	}
	.sap-art-wrap{
		width:52px;
		height:52px;
	}
	.sap-song-title{
		font-size:15px;
	}
	.sap-song-artist{
		display:none;
	}
	.sap-play-btn{
		width:42px;
		height:42px;
		font-size:14px;
	}
	.sap-volume-wrap{
		display:none;
	}
}

/* Shortcode popup-trigger button: [azuracast_popup_button] */
.sap-popup-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--sap-accent);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: filter 0.15s ease;
}

.sap-popup-btn:hover {
	filter: brightness(1.1);
}
