/* LIA FM Radio Player */
#lfmrp {
	--lfmrp-bg: #1c1c1c;
	--lfmrp-accent: #c8102e;
	--lfmrp-text: #ffffff;
	--lfmrp-h: 68px;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	height: var(--lfmrp-h);
	background: var(--lfmrp-bg);
	color: var(--lfmrp-text);
	box-shadow: 0 -4px 18px rgba(0, 0, 0, .28);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.3;
	box-sizing: border-box;
	padding-bottom: env(safe-area-inset-bottom, 0);
	transform: translateY(0);
	transition: transform .3s ease;
}
#lfmrp *, #lfmrp *::before, #lfmrp *::after { box-sizing: border-box; }
#lfmrp button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
#lfmrp button:focus-visible, #lfmrp input:focus-visible { outline: 2px solid var(--lfmrp-accent); outline-offset: 2px; }
#lfmrp svg { width: 22px; height: 22px; fill: currentColor; display: block; }

body.lfmrp-on { padding-bottom: var(--lfmrp-h, 68px) !important; }
/* Botón "volver arriba" y chats flotantes comunes: subirlos por encima de la barra */
body.lfmrp-on #wpfront-scroll-top-container,
body.lfmrp-on .scroll-to-top,
body.lfmrp-on #scroll-top,
body.lfmrp-on .joinchat { bottom: calc(68px + 16px) !important; }

.lfmrp__inner {
	height: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	gap: 14px;
}

/* Play */
#lfmrp .lfmrp__play {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--lfmrp-accent);
	color: #fff !important;
	transition: transform .15s ease, filter .15s ease;
}
#lfmrp .lfmrp__play:hover { transform: scale(1.06); filter: brightness(1.1); }
#lfmrp .lfmrp__play svg { width: 24px; height: 24px; }
.lfmrp__i-pause, .lfmrp__spinner { display: none !important; }
#lfmrp[data-state="playing"] .lfmrp__i-play { display: none; }
#lfmrp[data-state="playing"] .lfmrp__i-pause { display: block !important; }
#lfmrp[data-state="loading"] .lfmrp__i-play { display: none; }
#lfmrp[data-state="loading"] .lfmrp__spinner { display: block !important; }
.lfmrp__spinner {
	width: 22px;
	height: 22px;
	border: 3px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: lfmrp-spin .8s linear infinite;
}
@keyframes lfmrp-spin { to { transform: rotate(360deg); } }

.lfmrp__logo {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	background: rgba(255, 255, 255, .08);
}

/* Info */
.lfmrp__info { flex: 1 1 auto; min-width: 0; }
.lfmrp__top { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.lfmrp__live {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	padding: 2px 7px;
	border-radius: 3px;
	background: rgba(255, 255, 255, .12);
}
.lfmrp__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
#lfmrp[data-state="playing"] .lfmrp__live { background: var(--lfmrp-accent); color: #fff; }
#lfmrp[data-state="playing"] .lfmrp__dot { opacity: 1; animation: lfmrp-pulse 1.4s ease-in-out infinite; }
@keyframes lfmrp-pulse { 50% { opacity: .25; } }
.lfmrp__station { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.lfmrp__title {
	margin-top: 3px;
	opacity: .78;
	overflow: hidden;
	white-space: nowrap;
	mask-image: linear-gradient(90deg, #000 92%, transparent);
	-webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.lfmrp__title span { display: inline-block; }
.lfmrp__title.is-marquee span { padding-right: 48px; animation: lfmrp-marquee var(--lfmrp-dur, 12s) linear infinite; }
@keyframes lfmrp-marquee { 0%, 12% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Ecualizador */
#lfmrp .lfmrp__eq { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 3px; height: 20px; opacity: 0; transition: opacity .3s; }
#lfmrp .lfmrp__eq i { width: 3px; height: 30%; background: var(--lfmrp-accent); border-radius: 1px; }
#lfmrp[data-state="playing"] .lfmrp__eq { opacity: 1; }
#lfmrp[data-state="playing"] .lfmrp__eq i { animation: lfmrp-eq 1s ease-in-out infinite alternate; }
#lfmrp .lfmrp__eq i:nth-child(2) { animation-delay: -.4s !important; }
#lfmrp .lfmrp__eq i:nth-child(3) { animation-delay: -.7s !important; }
#lfmrp .lfmrp__eq i:nth-child(4) { animation-delay: -.2s !important; }
@keyframes lfmrp-eq { 0% { height: 20%; } 100% { height: 100%; } }

/* Volumen */
.lfmrp__vol { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
#lfmrp .lfmrp__mute, #lfmrp .lfmrp__popout { width: 36px; height: 36px; border-radius: 50%; opacity: .85; }
#lfmrp .lfmrp__mute:hover, #lfmrp .lfmrp__popout:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
#lfmrp .lfmrp__popout svg { width: 19px; height: 19px; }
.lfmrp__i-muted { display: none !important; }
#lfmrp.is-muted .lfmrp__i-vol { display: none !important; }
#lfmrp.is-muted .lfmrp__i-muted { display: block !important; }

#lfmrp .lfmrp__range {
	-webkit-appearance: none;
	appearance: none;
	width: 110px;
	height: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	background: linear-gradient(90deg, var(--lfmrp-accent) var(--lfmrp-v, 80%), rgba(255, 255, 255, .25) var(--lfmrp-v, 80%));
}
#lfmrp .lfmrp__range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--lfmrp-text); border: 0; }
#lfmrp .lfmrp__range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--lfmrp-text); border: 0; }
#lfmrp .lfmrp__range::-moz-range-track { background: transparent; }

/* Estado de error */
#lfmrp[data-state="error"] .lfmrp__title { color: #ffb4b4; opacity: 1; }

/* Móvil */
@media (max-width: 767px) {
	#lfmrp { --lfmrp-h: 62px; }
	.lfmrp__inner { gap: 10px; padding: 0 12px; }
	#lfmrp .lfmrp__play { width: 42px; height: 42px; }
	.lfmrp__logo { width: 40px; height: 40px; }
	#lfmrp .lfmrp__range, #lfmrp .lfmrp__eq { display: none; }
	.lfmrp__station { font-size: 14px; }
	body.lfmrp-on #wpfront-scroll-top-container,
	body.lfmrp-on .scroll-to-top,
	body.lfmrp-on #scroll-top,
	body.lfmrp-on .joinchat { bottom: calc(62px + 12px) !important; }
}

/* Ventana emergente */
#lfmrp.lfmrp--popup { position: static; height: 100vh; box-shadow: none; }
#lfmrp.lfmrp--popup .lfmrp__inner { flex-wrap: wrap; align-content: center; justify-content: center; padding: 16px; }
#lfmrp.lfmrp--popup .lfmrp__info { flex-basis: calc(100% - 140px); }
#lfmrp.lfmrp--popup .lfmrp__vol { flex-basis: 100%; justify-content: center; }
#lfmrp.lfmrp--popup .lfmrp__range { display: block; width: 70%; }
#lfmrp.lfmrp--popup .lfmrp__eq { display: none; }

/* Barra de carga de navegación continua */
.lfmrp-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--lfmrp-accent, #c8102e); z-index: 100000; transition: width .25s ease, opacity .3s; }

@media (prefers-reduced-motion: reduce) {
	#lfmrp *, #lfmrp { animation: none !important; transition: none !important; }
}
@media print { #lfmrp { display: none !important; } }
body.lfmrp-popup-body { padding: 0 !important; overflow: hidden; }
