/* Player 13 "Metal". Same engine as the others (players/player-func.js).
   Double rule above and below, a bolt as the mark and very wide tracking.
   Every colour still comes from the site, no fixed palette. */

.pl13 {
	--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);
}

.pl13__bar {
	position: sticky;
	top: 0;
	z-index: 1045;
	color: var(--pl-fg, #16181f);
	background: var(--pl-bg, #ffffff);
	border-top: 4px double var(--pl-fg, #16181f);
	border-bottom: 4px double var(--pl-fg, #16181f);
	font-size: 14px;
	line-height: 1.25;
}

.pl13__row {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 58px;
	margin: 0 auto;
	padding: 8px 18px;
}

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

.pl13__controls { display: flex; align-items: center; flex-shrink: 0; }
.pl13__cover { display: none; }

/* Outlined, never filled: the frame is what carries the weight here */
.pl13__play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--pl-fg, #16181f);
	background: none;
	border: 2px solid var(--pl-fg, #16181f);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.pl13__play:hover { color: var(--pl-bg, #ffffff); background: var(--pl-fg, #16181f); }
.pl13__play.inactive { display: none !important; }
.pl13__play svg { margin-left: 2px; }
.fallplayer-pause.pl13__play svg { margin-left: 0; }

.pl13__mark { display: flex; align-items: center; flex-shrink: 0; color: var(--pl-accent, #d75531); }

.pl13__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;
}

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

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

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

.pl13__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;
}

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

.pl13__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 */
.pl13__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.pl13__now {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--pl-accent, #d75531);
}

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

.pl13__track .rf-playing-label2 {
	display: inline-block;
	max-width: 100%;
	font-size: 15px;
	font-weight: 300;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	white-space: nowrap;
}

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

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

.pl13__links { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.bras-player__cast .cast-on,
.pl13.is-casting .bras-player__cast .cast-off { display: none; }
.pl13.is-casting .bras-player__cast .cast-on { display: block; }
.pl13.is-casting .bras-player__cast { color: var(--pl-accent, #d75531); }

/* 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; letter-spacing: 0.14em; text-transform: uppercase; }

.pl13.is-offline .pl13__info,
.pl13.is-offline .pl13__mark,
.pl13.is-offline .pl13__controls { display: none; }
.pl13.is-offline .bras-player__offline { display: flex; }

/* Keyboard focus keeps the ring the rest of the interface uses */
.pl13 button:focus-visible,
.pl13 a:focus-visible,
.pl13 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;
}

.rf-playing-label1.pl-skeleton { max-width: 90px; }
.rf-playing-label2.pl-skeleton { min-width: 240px; }

.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) {
	.pl13__row { gap: 10px; min-height: 52px; padding: 8px 12px; }
	.pl13__volume input[type="range"] { display: none; }
	.pl13__track .rf-playing-label2 { font-size: 13px; letter-spacing: 0.2em; }
}

@media screen and (max-width: 575px) {
	.pl13__now { display: none; }
	.pl13__mark { display: none; }
	.pl13__links { gap: 0; }
}

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