/* Player 10 "Saliente". Same engine as the others (players/player-func.js).
   Footer bar with the play button as a circle rising above its edge. */

.pl10 {
	--pl-border: color-mix(in srgb, var(--pl-fg, #16181f) 14%, transparent);
	--pl-muted: color-mix(in srgb, var(--pl-fg, #16181f) 58%, transparent);
	--pl-hover: color-mix(in srgb, var(--pl-fg, #16181f) 8%, transparent);
}

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

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

.pl10__row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 62px;
	margin: 0 auto;
	padding: 8px 18px 8px 96px;
}

@media (min-width: 768px)  { .pl10__row { max-width: 750px; } }
@media (min-width: 992px)  { .pl10__row { max-width: 970px; } }
@media (min-width: 1200px) { .pl10__row { max-width: 1600px; } }

.pl10__controls { display: flex; align-items: center; }

/* Half in, half out: the circle breaks the top edge of the bar */
.pl10__play {
	position: absolute;
	bottom: 12px;
	left: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	padding: 0;
	color: var(--pl-bg, #ffffff);
	background: var(--pl-accent, #d75531);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	/* Half of the circle stands over the page: the shadow is what keeps it from
	   melting into whatever scrolls behind it */
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.38), 0 2px 5px rgba(0, 0, 0, 0.28);
	transition: filter 0.15s ease;
}

.pl10__play:hover { filter: brightness(1.08); }
.pl10__play.inactive { display: none !important; }
.pl10__play svg { margin-left: 3px; }
.fallplayer-pause.pl10__play svg { margin-left: 0; }

.pl10__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	padding: 0;
	color: var(--pl-muted);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.pl10__btn:hover { color: var(--pl-fg, #16181f); }
.pl10__btn svg { width: 17px; height: 17px; }

.pl10__btn--round { width: 34px; height: 34px; color: var(--pl-fg, #16181f); background: var(--pl-hover); }
.pl10__btn--round:hover { color: var(--pl-bg, #ffffff); background: var(--pl-accent, #d75531); }

.pl10__volume {
	position: relative !important;
	top: auto !important;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

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

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

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

.pl10__volume input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -5px;
	background: var(--pl-accent, #d75531);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

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

.pl10__volume input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--pl-accent, #d75531);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

/* What is on air */
.pl10__info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
}

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

.pl10__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.pl10__now {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--pl-muted);
}

.pl10__track { display: block; overflow: hidden; }

.pl10__track .rf-playing-label2 {
	display: inline-block;
	max-width: 100%;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

/* Long titles slide instead of being cut */
.pl-marquee.is-scrolling {
	animation: pl10Marquee var(--pl-marquee-time, 14s) linear infinite alternate;
}

@keyframes pl10Marquee {
	0%, 12% { transform: translateX(0); }
	88%, 100% { transform: translateX(var(--pl-marquee-shift, 0)); }
}

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

.pl10__links li { position: relative; display: flex; align-items: center; }
.pl10__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;
}

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

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

.bras-player__cast .cast-on,
.pl10.is-casting .bras-player__cast .cast-off { display: none; }
.pl10.is-casting .bras-player__cast .cast-on { display: block; }
.pl10.is-casting .bras-player__cast { color: var(--pl-bg, #ffffff); background: var(--pl-accent, #d75531); }
.bras-player__cast svg { width: 19px; height: 19px; }

/* 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; }

.pl10.is-offline .pl10__info,
.pl10.is-offline .pl10__play { display: none; }
.pl10.is-offline .pl10__row { padding-left: 18px; }
.pl10.is-offline .bras-player__offline { display: flex; }

/* Keyboard focus keeps the ring the rest of the interface uses */
.pl10 button:focus-visible,
.pl10 a:focus-visible,
.pl10 input:focus-visible {
	outline: 2px solid var(--pl-accent, #d75531);
	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;
}

.pl10__cover.pl-skeleton { border-radius: 8px; }
.rf-playing-label1.pl-skeleton { max-width: 90px; }
.rf-playing-label2.pl-skeleton { min-width: 220px; }

.pl-skeleton::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(125, 125, 125, 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: 64px; }

	.pl10__row { gap: 10px; min-height: 52px; padding: 6px 12px 6px 78px; }
	.pl10__play { width: 54px; height: 54px; bottom: 10px; left: 12px; }
	.pl10__play svg { width: 22px; height: 22px; }
	.pl10__cover { width: 36px; height: 36px; }
	.pl10__volume input[type="range"] { display: none; }
	.pl10__track .rf-playing-label2 { font-size: 14px; }
}

@media screen and (max-width: 575px) {
	.pl10__cover { display: none; }
	.pl10__now { display: none; }
	.pl10__links { gap: 0; }
}

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