/* EnParaguay Radio — Player Bar moderno v3.0.1
   Namespace propio (.enpy-*): NINGUNA regla del CSS original de wp-radio lo toca.
   La lista de emisoras (.wp-radio-listing) NO se modifica. */

:root {
	--enpy-bg:     rgba(12, 14, 22, 0.97);
	--enpy-accent: #f6931f;
	--enpy-live:   #22c55e;
	--enpy-text:   #ffffff;
	--enpy-muted:  rgba(255, 255, 255, 0.45);
	--enpy-h:      74px;
}

body.enpy-bar-open { padding-bottom: var(--enpy-h); }

/* ===================== BAR ===================== */
.enpy-player {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99999;
	box-sizing: border-box;
	width: 100%;
	height: var(--enpy-h);
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 24px;
	background: var(--enpy-bg);
	-webkit-backdrop-filter: blur(26px) saturate(1.7);
	backdrop-filter: blur(26px) saturate(1.7);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 -6px 38px rgba(0, 0, 0, 0.5);
	color: var(--enpy-text);
	transform: translateY(0);
	transition: transform .38s cubic-bezier(.4, 0, .2, 1);
	font-family: inherit;
}
.enpy-player.enpy-hidden {
	transform: translateY(120%);
	pointer-events: none;
}

/* Reset defensivo contra el tema */
.enpy-player * { box-sizing: border-box; }
.enpy-player button {
	margin: 0; padding: 0; border: none; background: none;
	font: inherit; color: inherit; cursor: pointer; line-height: 1;
	-webkit-appearance: none; appearance: none;
}
.enpy-player a { text-decoration: none; color: inherit; }
.enpy-player img { display: block; max-width: none; }

/* ===================== ALBUM ART ===================== */
.enpy-art-wrap {
	flex-shrink: 0;
	width: 50px; height: 50px;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.enpy-art {
	width: 100%; height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
.enpy-art[src=""] { visibility: hidden; }

/* ===================== META ===================== */
.enpy-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
}
.enpy-name {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--enpy-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
}
.enpy-name:hover { color: #fff; }

.enpy-sub {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
}

/* Badge EN VIVO / OFFLINE */
.enpy-badge {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	padding: 2px 7px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--enpy-muted);
	transition: background .2s, color .2s;
}
.enpy-badge-dot {
	width: 5px; height: 5px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}
/* Reproduciendo → verde pulsante */
.enpy-player.is-playing .enpy-badge {
	background: rgba(34, 197, 94, 0.16);
	color: var(--enpy-live);
}
.enpy-player.is-playing .enpy-badge-dot {
	animation: enpy-pulse 1.8s ease-in-out infinite;
}
/* Cargando → naranja */
.enpy-player.is-buffering .enpy-badge { color: var(--enpy-accent); background: rgba(246, 147, 31, .14); }
/* Error / offline → rojo */
.enpy-player.is-error .enpy-badge {
	background: rgba(239, 68, 68, 0.16);
	color: #ef4444;
}
@keyframes enpy-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); opacity: 1; }
	50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); opacity: .65; }
}

.enpy-song {
	min-width: 0;
	flex: 1 1 auto;
	font-size: 11.5px;
	color: var(--enpy-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
}
.enpy-song:empty { display: none; }

/* ===================== CONTROLS ===================== */
.enpy-controls {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 16px;
}

/* Play / Pause */
.enpy-play {
	position: relative;
	width: 48px; height: 48px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--enpy-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 18px rgba(246, 147, 31, .4);
	transition: transform .15s, background .2s, box-shadow .2s;
}
.enpy-play:hover {
	background: #ff9e2c;
	transform: scale(1.07);
	box-shadow: 0 5px 24px rgba(246, 147, 31, .58);
}
.enpy-play:active { transform: scale(.95); }

.enpy-play .dashicons {
	font-size: 24px;
	width: 24px; height: 24px;
	line-height: 24px;
	color: #fff;
}
/* Iconos: por defecto play; reproduciendo pausa */
.enpy-play .enpy-ico-pause { display: none; }
.enpy-player.is-playing .enpy-play .enpy-ico-play  { display: none; }
.enpy-player.is-playing .enpy-play .enpy-ico-pause { display: inline-block; }

/* Buffering → ocultar iconos, mostrar ondas */
.enpy-bars { display: none; align-items: flex-end; gap: 3px; height: 20px; }
.enpy-bars i {
	width: 3px; height: 6px;
	background: #fff; border-radius: 2px;
	animation: enpy-wave .9s ease-in-out infinite;
}
.enpy-bars i:nth-child(1) { animation-delay: 0s;   }
.enpy-bars i:nth-child(2) { animation-delay: .15s; height: 14px; }
.enpy-bars i:nth-child(3) { animation-delay: .3s;  height: 20px; }
.enpy-bars i:nth-child(4) { animation-delay: .45s; height: 11px; }
.enpy-player.is-buffering .enpy-play .dashicons { display: none; }
.enpy-player.is-buffering .enpy-bars { display: flex; }
@keyframes enpy-wave {
	0%, 100% { transform: scaleY(.35); opacity: .6; }
	50%       { transform: scaleY(1);   opacity: 1;  }
}

/* ===================== VOLUME (range nativo, horizontal) ===================== */
.enpy-vol-wrap {
	display: flex;
	align-items: center;
	gap: 9px;
}
.enpy-vol-btn {
	color: var(--enpy-muted);
	display: flex; align-items: center;
	transition: color .15s;
}
.enpy-vol-btn:hover { color: var(--enpy-text); }
.enpy-vol-btn .dashicons {
	font-size: 18px; width: 18px; height: 18px; line-height: 18px;
}

.enpy-vol {
	width: 84px; height: 4px;
	-webkit-appearance: none; appearance: none;
	background: transparent;
	cursor: pointer;
	margin: 0;
}
/* WebKit track con relleno via variable */
.enpy-vol::-webkit-slider-runnable-track {
	height: 4px; border-radius: 2px;
	background: linear-gradient(to right,
		#fff var(--enpy-vol, 80%),
		rgba(255, 255, 255, .2) var(--enpy-vol, 80%));
}
.enpy-vol::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 12px; height: 12px;
	margin-top: -4px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
	transition: transform .12s;
}
.enpy-vol:hover::-webkit-slider-thumb { transform: scale(1.25); }
/* Firefox */
.enpy-vol::-moz-range-track {
	height: 4px; border-radius: 2px;
	background: rgba(255, 255, 255, .2);
}
.enpy-vol::-moz-range-progress {
	height: 4px; border-radius: 2px; background: #fff;
}
.enpy-vol::-moz-range-thumb {
	width: 12px; height: 12px; border: none;
	border-radius: 50%; background: #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
}

/* ===================== MOBILE ===================== */
@media (max-width: 600px) {
	.enpy-player { padding: 0 14px; gap: 12px; }
	.enpy-vol-wrap { display: none; }
	.enpy-art-wrap { width: 42px; height: 42px; }
	.enpy-name { font-size: 13px; }
}
@media (max-width: 380px) {
	.enpy-badge-txt { display: none; }
	.enpy-badge { padding: 4px; }
}
