/* Barikada Radio — sticky player */

:root {
	/*
	 * Set by player.js from the measured height of any ad docked at the bottom
	 * of the viewport (purpleads #psdn-slot, AdSense anchor). The player sits
	 * above them instead of covering them: obscuring a sticky ad breaks Google's
	 * placement policy and invites accidental clicks.
	 */
	--brk-radio-offset: 0px;
	--brk-radio-height: 56px;
}

.brk-radio {
	position: fixed;
	left: 0;
	right: 0;
	bottom: var(--brk-radio-offset);
	z-index: 900;
	background: #16181c;
	border-top: 2px solid #c1121f;
	box-shadow: 0 -4px 18px rgba(0, 0, 0, .35);
	font-family: inherit;
	transform: translateY(100%);
	transition: transform .25s ease, bottom .2s ease;
}

.brk-radio[hidden] {
	display: none;
}

.brk-radio.is-ready {
	transform: translateY(0);
}

.brk-radio__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 1200px;
	height: var(--brk-radio-height);
	margin: 0 auto;
	padding: 0 16px;
}

/* Play / pause */

.brk-radio__toggle {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c1121f;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease;
}

.brk-radio__toggle:hover {
	background: #e01e2b;
}

.brk-radio__toggle:focus-visible,
.brk-radio__mute:focus-visible,
.brk-radio__slider:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.brk-radio__icon--play {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-left: 12px solid currentColor;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
}

.brk-radio__icon--pause {
	width: 12px;
	height: 14px;
	border-left: 4px solid currentColor;
	border-right: 4px solid currentColor;
}

.brk-radio__icon--spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: brk-radio-spin .7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.brk-radio { transition: none; }
	.brk-radio__icon--spinner { animation-duration: 2s; }
}

/* Only one icon shows at a time, driven by state on the root element. */
.brk-radio__icon--pause,
.brk-radio__icon--spinner { display: none; }

.brk-radio.is-playing .brk-radio__icon--play,
.brk-radio.is-loading .brk-radio__icon--play { display: none; }

.brk-radio.is-playing .brk-radio__icon--pause { display: block; }

.brk-radio.is-loading .brk-radio__icon--pause { display: none; }
.brk-radio.is-loading .brk-radio__icon--spinner { display: block; }

/* Station name + status */

.brk-radio__meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.brk-radio__name {
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.brk-radio__status {
	flex: 0 0 auto;
	color: #9aa0a6;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	white-space: nowrap;
}

.brk-radio.is-playing .brk-radio__status {
	color: #c1121f;
	font-weight: 700;
}

.brk-radio.is-error .brk-radio__status {
	color: #e8a33d;
}

/* Volume */

.brk-radio__volume {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.brk-radio__mute {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: none;
	color: #9aa0a6;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.brk-radio__mute:hover { color: #fff; }

.brk-radio__mute svg {
	width: 18px;
	height: 18px;
	display: block;
	fill: currentColor;
}

.brk-radio__mute .brk-radio__waves { display: block; }
.brk-radio__mute .brk-radio__cross { display: none; }

.brk-radio.is-muted .brk-radio__waves { display: none; }
.brk-radio.is-muted .brk-radio__cross { display: block; }

.brk-radio.is-muted .brk-radio__mute {
	color: #c1121f;
}

/*
 * The theme applies a bare `input { appearance:none; height:40px; border:3px
 * solid; padding:0 15px; width:100% }` rule (style.css:196) to every input on
 * the site, which renders a range control as a bordered white box. There is no
 * native widget left for accent-color to tint, so the track and thumb are drawn
 * from scratch here. The class beats the theme's element selector on
 * specificity, so load order doesn't matter.
 */
.brk-radio__slider {
	-webkit-appearance: none;
	appearance: none;
	width: 90px;
	height: 14px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	/* Filled portion; kept in sync by player.js. */
	--brk-fill: 100%;
}

.brk-radio__slider::-webkit-slider-runnable-track {
	height: 4px;
	border: 0;
	border-radius: 2px;
	background:
		linear-gradient(#c1121f, #c1121f) 0 / var(--brk-fill) 100% no-repeat,
		rgba(255, 255, 255, .28);
}

.brk-radio__slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 12px;
	margin-top: -4px;
	border: 0;
	border-radius: 50%;
	background: #fff;
}

.brk-radio__slider::-moz-range-track {
	height: 4px;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, .28);
}

.brk-radio__slider::-moz-range-progress {
	height: 4px;
	border-radius: 2px;
	background: #c1121f;
}

.brk-radio__slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border: 0;
	border-radius: 50%;
	background: #fff;
}

/* Mobile: the volume slider is dead weight — hardware buttons own volume. */
@media (max-width: 782px) {
	:root { --brk-radio-height: 50px; }

	.brk-radio__slider { display: none; }
	.brk-radio__inner { gap: 10px; padding: 0 12px; }
	.brk-radio__meta { flex-direction: column; align-items: flex-start; gap: 0; }
	.brk-radio__status { font-size: 10px; }
}
