/* Player 07. Same engine as the others (players/player-func.js), own skin.
   The bar of the top players, put on the bottom edge of the window. */

.bras-player-bottom {
	--pl-radius: 8px;
	--pl-border: color-mix(in srgb, var(--pl-fg, #ffffff) 16%, transparent);
	--pl-muted: color-mix(in srgb, var(--pl-fg, #ffffff) 60%, transparent);
	--pl-hover: color-mix(in srgb, var(--pl-fg, #ffffff) 10%, transparent);
}

/* The bar sits over the page, so the page ends above it */
body { padding-bottom: 74px; }

.foot-player {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1045;
	color: var(--pl-fg, #ffffff);
	background: var(--pl-bg, #16181f);
	border-top: 1px solid var(--pl-border);
	font-size: 14px;
	line-height: 1.25;
}

.foot-player__row {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0 auto;
	padding: 11px 15px;
}

@media (min-width: 768px)  { .foot-player__row { max-width: 750px; } }
@media (min-width: 992px)  { .foot-player__row { max-width: 970px; } }
@media (min-width: 1200px) { .foot-player__row { max-width: 1320px; } }

/* Transport in one framed group: ghost volume and a single solid play */
.foot-controls {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.foot-play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: var(--pl-bg, #16181f);
	background: var(--pl-fg, #ffffff);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.foot-play:hover { opacity: 0.85; }
.foot-play.inactive { display: none !important; }
.foot-play svg { margin-left: 2px; }
.fallplayer-pause.foot-play svg { margin-left: 0; }

.foot-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--pl-fg, #ffffff);
	background: none;
	border: 1px solid var(--pl-border);
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s ease;
}

.foot-btn:hover { background: var(--pl-hover); }

.foot-controls .foot-btn { border-color: transparent; }
.foot-controls .foot-btn:hover { background: var(--pl-hover); }

.foot-volume {
	position: relative !important;
	top: auto !important;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	padding-right: 6px;
}

.fallplayer-volume .vol-off,
.fallplayer-volume.is-muted .vol-on { display: none; }
.fallplayer-volume.is-muted .vol-off { display: block; }

.foot-volume__slider {
	display: flex;
	align-items: center;
	width: 84px;
}

/* The filled part comes from --pl-vol, written by the engine on every change */
.foot-volume input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	margin: 0;
	background: linear-gradient(to right, var(--pl-fg, #ffffff) 0 var(--pl-vol, 100%), var(--pl-border) var(--pl-vol, 100%) 100%);
	border-radius: 999px;
	outline: none;
	cursor: pointer;
}

.foot-volume input[type="range"]::-webkit-slider-runnable-track {
	height: 4px;
	background: transparent;
	border-radius: 999px;
}

.foot-volume input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	margin-top: -4px;
	background: var(--pl-fg, #ffffff);
	border: 2px solid var(--pl-bg, #16181f);
	border-radius: 50%;
	cursor: pointer;
}

.foot-volume input[type="range"]::-moz-range-track {
	height: 4px;
	background: transparent;
	border-radius: 999px;
}

.foot-volume input[type="range"]::-moz-range-thumb {
	width: 12px;
	height: 12px;
	background: var(--pl-fg, #ffffff);
	border: 2px solid var(--pl-bg, #16181f);
	border-radius: 50%;
	cursor: pointer;
}

/* What is on air */
.foot-info {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 10px;
	min-width: 0;
	max-width: 420px;
	margin-right: auto;
}

.foot-cover {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	background-color: var(--pl-hover);
	background-size: cover;
	background-position: center;
	border-radius: var(--pl-radius);
}

.foot-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	width: 100%;
	overflow: hidden;
}

.foot-now {
	font-size: 12px;
	color: var(--pl-muted);
}

/* Soft ends so the title fades instead of being cut by the box */
.foot-track {
	position: relative;
	display: block;
	overflow: hidden;
}

.foot-track::before,
.foot-track::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 16px;
	pointer-events: none;
	z-index: 2;
}

.foot-track::before {
	left: 0;
	background: linear-gradient(90deg, var(--pl-bg, #16181f), transparent);
}

.foot-track::after {
	right: 0;
	background: linear-gradient(270deg, var(--pl-bg, #16181f), transparent);
}

.foot-track .rf-playing-label2 {
	display: block;
	width: 100%;
	font-size: 14px;
	font-weight: 500;
}

/* Shortcuts fold behind the dots and open sideways */
.foot-links {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.foot-links li {
	position: relative;
	display: flex;
	align-items: center;
}

.foot-links__apps { gap: 6px; }

.bras-player__apps {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-width 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}

.bras-player-bottom.is-apps .bras-player__apps {
	max-width: 170px;
	margin-right: 6px;
	opacity: 1;
}

.bras-player__more .more-close { display: none; }
.bras-player-bottom.is-apps .bras-player__more .more-dots { display: none; }
.bras-player-bottom.is-apps .bras-player__more .more-close { display: block; }

.bras-player__cast .cast-on,
.bras-player-bottom.is-casting .bras-player__cast .cast-off { display: none; }
.bras-player-bottom.is-casting .bras-player__cast .cast-on { display: block; }

.bras-player-bottom.is-casting .bras-player__cast {
	color: var(--pl-bg, #16181f);
	background: var(--pl-accent, #ffffff);
	border-color: var(--pl-accent, #ffffff);
}

.bras-player__cast svg { width: 20px; height: 20px; }

/* Nothing on air */
.bras-player__offline {
	display: none;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	color: var(--pl-muted);
}

.bras-player__offline b {
	font-size: 13px;
	font-weight: 500;
}

.bras-player-bottom.is-offline .foot-info,
.bras-player-bottom.is-offline .foot-controls { display: none; }
.bras-player-bottom.is-offline .bras-player__offline { display: flex; }

/* Keyboard focus keeps the ring the rest of the interface uses */
.bras-player-bottom button:focus-visible,
.bras-player-bottom a:focus-visible,
.bras-player-bottom input:focus-visible {
	outline: 2px solid var(--pl-accent, #ffffff);
	outline-offset: 2px;
}

/* Skeleton until the first data arrives */
.pl-skeleton {
	position: relative;
	overflow: hidden;
	color: transparent !important;
	background-color: var(--pl-hover);
	background-image: none !important;
	border-radius: 6px;
}

.foot-cover.pl-skeleton { border-radius: var(--pl-radius); }
.rf-playing-label1.pl-skeleton { max-width: 90px; }
.rf-playing-label2.pl-skeleton { max-width: 220px; }

.pl-skeleton::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
	transform: translateX(-100%);
	animation: plSkeleton 1.4s ease-in-out infinite;
}

@keyframes plSkeleton {
	100% { transform: translateX(100%); }
}

@media screen and (max-width: 767px) {
	body { padding-bottom: 68px; }

	.foot-player__row { gap: 10px; padding: 10px 12px; }
	.foot-play { width: 40px; height: 40px; }
	.foot-cover { width: 40px; height: 40px; }
	.foot-volume__slider { display: none; }
	.foot-volume { padding-right: 0; }
	.foot-track .rf-playing-label2 { font-size: 13px; }
}

@media screen and (max-width: 575px) {
	.foot-links__apps { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pl-skeleton::after { animation: none; }
	.bras-player__apps { transition: none; }
}
