/* VPTM — Radios de muestra (tarjeta del hero + reproductor del pie)
   Estilo propio de Voces PTM: cristal oscuro, logos redondos y degradado de marca. */

.vptm-radios,
.vptm-pie {
	--vptm-grad: linear-gradient(135deg, #22d3ee 0%, #2563eb 50%, #7c3aed 100%);
	--vptm-txt: #f1f5f9;
	--vptm-sub: rgba(226, 232, 240, .62);
	--vptm-linea: rgba(255, 255, 255, .09);
	--vptm-cian: #22d3ee;
}

.vptm-radios {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 430px;
	margin: 0 auto;
	padding: 24px 20px 12px;
	background: linear-gradient(160deg, rgba(15, 23, 42, .82), rgba(8, 12, 24, .9));
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	color: var(--vptm-txt);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 20px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
	font-family: inherit;
	text-align: left;
	overflow: hidden;
}
/* Filo de color arriba */
.vptm-radios::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--vptm-grad);
}
.vptm-radios *, .vptm-radios *::before, .vptm-radios *::after { box-sizing: border-box; }

/* ---------- Cabecera ---------- */
.vptm-radios__cab { display: flex; flex-direction: column; gap: 6px; padding: 0 2px 16px; }
.vptm-radios__ante {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--vptm-cian);
}
.vptm-radios__ante i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 0 0 rgba(239, 68, 68, .6);
	animation: vptm-onda 1.8s ease-out infinite;
}
.vptm-radios .vptm-radios__titulo {
	margin: 0;
	font-size: 21px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #fff;
	text-transform: none;
}
.vptm-radios__cuenta { font-size: 13px; line-height: 1.45; color: var(--vptm-sub); }
.vptm-radios__cuenta strong { font-weight: 700; color: #a5f3fc; }

/* ---------- Buscador ---------- */
.vptm-radios__buscar {
	position: relative;
	display: block;
	margin: 0 0 8px;
	cursor: text;
}
.vptm-radios__buscar svg {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--vptm-sub);
	pointer-events: none;
}
/* El kit de Elementor pinta todos los input: se anula aquí. */
.vptm-radios .vptm-radios__buscar input[type="search"] {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 16px 0 44px !important;
	border: 1px solid rgba(255, 255, 255, .1) !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, .06) !important;
	box-shadow: none !important;
	outline: 0;
	font: inherit;
	font-size: 14px !important;
	color: var(--vptm-txt) !important;
	transition: border-color .15s, background-color .15s;
}
.vptm-radios .vptm-radios__buscar input[type="search"]:focus {
	border-color: rgba(34, 211, 238, .6) !important;
	background: rgba(255, 255, 255, .09) !important;
}
.vptm-radios__buscar input::placeholder { color: rgba(226, 232, 240, .45); opacity: 1; }
.vptm-radios__buscar input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.vptm-radios__sr {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Lista ---------- */
.vptm-radios__lista {
	list-style: none;
	margin: 0 -8px;
	padding: 0 4px;
	max-height: 372px; /* unas 6 emisoras a la vista */
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, .22) transparent;
	-webkit-mask-image: linear-gradient(#000 88%, transparent);
	mask-image: linear-gradient(#000 88%, transparent);
}
.vptm-radios__lista::-webkit-scrollbar { width: 5px; }
.vptm-radios__lista::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 5px; }

.vptm-radio {
	display: flex;
	align-items: center;
	gap: 13px;
	margin: 0;
	padding: 9px 8px;
	border-bottom: 1px solid var(--vptm-linea);
	border-radius: 12px;
	transition: background-color .2s;
}
.vptm-radio:last-child { border-bottom-color: transparent; }
.vptm-radio:hover { background: rgba(255, 255, 255, .05); }
.vptm-radio.is-activa { background: rgba(37, 99, 235, .16); border-bottom-color: transparent; }
.vptm-radio[hidden] { display: none; }

.vptm-radio__logo,
.vptm-pie__logo {
	flex: none;
	position: relative;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	background: linear-gradient(135deg, var(--vptm-c), color-mix(in srgb, var(--vptm-c) 45%, #0b1220));
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .03em;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .1);
}
.vptm-radio__logo img,
.vptm-pie__logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #fff;
	border-radius: 0;
}
/* Anillo de marca en la emisora que suena */
.vptm-radio.is-activa .vptm-radio__logo { box-shadow: 0 0 0 2px #0b1220, 0 0 0 4px var(--vptm-cian); }

.vptm-radio__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vptm-radio__nombre {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.vptm-radio__estado {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	font-size: 12.5px;
	line-height: 1.3;
	color: var(--vptm-sub);
}
.vptm-radio__estado > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vptm-radio.is-activa .vptm-radio__estado { color: #a5f3fc; }
.vptm-radio.is-error .vptm-radio__estado { color: #fca5a5; }

/* Ecualizador: quieto en reposo, se mueve en la que suena */
.vptm-eq { flex: none; display: inline-flex; align-items: flex-end; gap: 2px; width: 12px; height: 11px; }
.vptm-eq b { display: block; width: 3px; height: 40%; border-radius: 1px; background: rgba(226, 232, 240, .45); }
.vptm-eq b:nth-child(2) { height: 75%; }
.vptm-eq b:nth-child(3) { height: 55%; }
.vptm-radio.is-activa .vptm-eq b { background: var(--vptm-cian); animation: vptm-eq .9s ease-in-out infinite; }
.vptm-radio.is-activa .vptm-eq b:nth-child(2) { animation-delay: -.3s; }
.vptm-radio.is-activa .vptm-eq b:nth-child(3) { animation-delay: -.6s; }

/* ---------- Botón play (contorno; se rellena con el degradado) ---------- */
.vptm-radios .vptm-radio__play,
.vptm-radios .vptm-radio__play:focus,
.vptm-pie .vptm-pie__play,
.vptm-pie .vptm-pie__play:focus {
	flex: none;
	position: relative;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, .28) !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #fff !important;
	cursor: pointer;
	box-shadow: none;
	transition: border-color .2s, transform .2s, box-shadow .2s;
}
.vptm-radios .vptm-radio__play:hover,
.vptm-pie .vptm-pie__play:hover,
.vptm-radios .vptm-radio__play.is-sonando,
.vptm-radios .vptm-radio__play.is-cargando,
.vptm-pie .vptm-pie__play {
	border-color: transparent !important;
	background: var(--vptm-grad) !important;
	box-shadow: 0 6px 18px rgba(37, 99, 235, .45);
}
.vptm-radios .vptm-radio__play:hover { transform: scale(1.06); }
.vptm-radios .vptm-radio__play:focus-visible,
.vptm-pie .vptm-pie__play:focus-visible,
.vptm-pie .vptm-pie__cerrar:focus-visible { outline: 2px solid var(--vptm-cian); outline-offset: 3px; }
.vptm-radio__play svg,
.vptm-pie__play svg { width: 16px; height: 16px; fill: currentColor; }
.vptm-ico-play { margin-left: 2px; }

.vptm-ico-pausa, .vptm-ico-carga { display: none; }
.is-sonando .vptm-ico-play, .is-cargando .vptm-ico-play { display: none; }
.is-sonando .vptm-ico-pausa { display: block; }
.is-cargando .vptm-ico-carga {
	display: block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: vptm-gira .8s linear infinite;
}

.vptm-radios__vacio { margin: 12px 2px 8px; font-size: 14px; color: var(--vptm-sub); }

/* ---------- Reproductor fijo del pie ---------- */
.vptm-pie {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px max(16px, calc((100vw - 1140px) / 2)) calc(11px + env(safe-area-inset-bottom));
	background: rgba(8, 12, 24, .94);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	color: var(--vptm-txt);
	box-shadow: 0 -12px 34px rgba(0, 0, 0, .35);
	font-family: inherit;
	transform: translateY(110%);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
/* Línea de degradado animada arriba */
.vptm-pie::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 2px;
	background: linear-gradient(90deg, #22d3ee, #2563eb, #7c3aed, #22d3ee);
	background-size: 300% 100%;
}
.vptm-pie.is-sonando::before { animation: vptm-flujo 6s linear infinite; }
.vptm-pie.is-visible { transform: none; }
body.vptm-pie-activo { padding-bottom: 74px; }

.vptm-pie__logo { width: 48px; height: 48px; font-size: 15px; }
.vptm-pie.is-sonando .vptm-pie__logo { box-shadow: 0 0 0 2px #0b1220, 0 0 0 4px var(--vptm-cian); }

.vptm-pie__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vptm-pie__nombre {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.25;
	color: #fff;
	white-space: nowrap;
}
.vptm-pie__nombre b { overflow: hidden; text-overflow: ellipsis; font-weight: inherit; }
.vptm-pie__envivo {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 8px;
	border: 1px solid rgba(239, 68, 68, .55);
	border-radius: 6px;
	color: #fca5a5;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.vptm-pie__envivo::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ef4444;
}
.vptm-pie.is-sonando .vptm-pie__envivo::before { animation: vptm-latido 1.4s ease-in-out infinite; }
.vptm-pie__titulo {
	font-size: 13px;
	line-height: 1.3;
	color: var(--vptm-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vptm-pie__eq { flex: none; display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.vptm-pie__eq span { width: 3px; height: 30%; border-radius: 2px; background: var(--vptm-cian); opacity: .5; }
.vptm-pie.is-sonando .vptm-pie__eq span { opacity: 1; animation: vptm-eq 1s ease-in-out infinite; }
.vptm-pie__eq span:nth-child(2) { animation-delay: -.3s !important; }
.vptm-pie__eq span:nth-child(3) { animation-delay: -.6s !important; }
.vptm-pie__eq span:nth-child(4) { animation-delay: -.15s !important; }

.vptm-pie__vol { flex: none; display: flex; align-items: center; gap: 8px; color: var(--vptm-sub); }
.vptm-pie__vol svg { width: 19px; height: 19px; fill: currentColor; }
.vptm-pie__vol input[type="range"] { width: 104px; accent-color: #22d3ee; cursor: pointer; background: transparent !important; border: 0 !important; padding: 0 !important; }

.vptm-pie .vptm-pie__play,
.vptm-pie .vptm-pie__play:focus { width: 46px; height: 46px; }
.vptm-pie .vptm-pie__play svg { width: 18px; height: 18px; }

.vptm-pie .vptm-pie__cerrar,
.vptm-pie .vptm-pie__cerrar:hover,
.vptm-pie .vptm-pie__cerrar:focus {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--vptm-sub) !important;
	cursor: pointer;
}
.vptm-pie .vptm-pie__cerrar:hover { background: rgba(255, 255, 255, .08) !important; color: #fff !important; }
.vptm-pie__cerrar svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.4; fill: none; }

@media (max-width: 767px) {
	.vptm-radios { max-width: 100%; padding: 20px 14px 10px; }
	.vptm-radios .vptm-radios__titulo { font-size: 19px; }
	.vptm-radios__lista { max-height: 318px; }
	.vptm-pie { gap: 10px; }
	.vptm-pie__vol, .vptm-pie__eq { display: none; }
	.vptm-pie__logo { width: 42px; height: 42px; }
	.vptm-pie__envivo { display: none; }
	body.vptm-pie-activo { padding-bottom: 68px; }
}

@keyframes vptm-latido { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes vptm-onda { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); } 100% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } }
@keyframes vptm-gira { to { transform: rotate(360deg); } }
@keyframes vptm-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes vptm-flujo { to { background-position: 300% 0; } }

@media (prefers-reduced-motion: reduce) {
	.vptm-pie { transition: none; }
	.vptm-radios__ante i,
	.vptm-radio.is-activa .vptm-eq b,
	.vptm-pie__envivo::before,
	.vptm-pie::before,
	.vptm-pie.is-sonando .vptm-pie__eq span { animation: none !important; }
}
