/* ---- Botón flotante ---- */

/* Los !important evitan que los estilos de botón del tema/Elementor lo deformen. */
button.uv-envivo-fab {
	position: fixed !important;
	top: 90px !important;
	right: 22px !important;
	bottom: auto !important;
	left: auto !important;
	z-index: 99998 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 9px !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 12px 22px !important;
	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	outline: none;
	border-radius: 999px !important;
	background: linear-gradient(135deg, #ff3b30 0%, #d70015 55%, #99000f 100%) !important;
	color: #fff !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	letter-spacing: 2px !important;
	line-height: 1 !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	text-shadow: none !important;
	white-space: nowrap !important;
	cursor: pointer !important;
	overflow: hidden !important;
	isolation: isolate;
	box-shadow:
		0 10px 30px rgba(215, 0, 21, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
	animation:
		uv-envivo-drop 600ms cubic-bezier(0.16, 1, 0.3, 1) both,
		uv-envivo-glow 2.4s ease-in-out 600ms infinite;
	transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

/* Variante "PRÓXIMAMENTE": directo programado a punto de empezar */
button.uv-envivo-fab.uv-envivo-fab--upcoming {
	background: linear-gradient(135deg, #ffb100 0%, #f08c00 55%, #c96a00 100%) !important;
	font-size: 13px !important;
	letter-spacing: 1.5px !important;
	box-shadow:
		0 10px 30px rgba(240, 140, 0, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
	animation:
		uv-envivo-drop 600ms cubic-bezier(0.16, 1, 0.3, 1) both,
		uv-envivo-glow-upcoming 2.4s ease-in-out 600ms infinite;
}

button.uv-envivo-fab.uv-envivo-fab--upcoming:hover,
button.uv-envivo-fab.uv-envivo-fab--upcoming:focus-visible {
	background: linear-gradient(135deg, #ffb100 0%, #f08c00 55%, #c96a00 100%) !important;
	box-shadow:
		0 14px 38px rgba(255, 177, 0, 0.6),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@keyframes uv-envivo-glow-upcoming {
	0%,
	100% {
		box-shadow:
			0 10px 30px rgba(240, 140, 0, 0.4),
			inset 0 1px 0 rgba(255, 255, 255, 0.35);
	}
	50% {
		box-shadow:
			0 10px 40px rgba(255, 177, 0, 0.75),
			inset 0 1px 0 rgba(255, 255, 255, 0.35);
	}
}

/* Brillo que recorre el botón */
button.uv-envivo-fab::before {
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: linear-gradient(
		105deg,
		transparent,
		rgba(255, 255, 255, 0.55),
		transparent
	);
	transform: skewX(-20deg);
	animation: uv-envivo-shine 3.4s ease-in-out 1s infinite;
	pointer-events: none;
}

button.uv-envivo-fab:hover,
button.uv-envivo-fab:focus-visible {
	transform: translateY(-2px) scale(1.05);
	filter: brightness(1.08);
	background: linear-gradient(135deg, #ff3b30 0%, #d70015 55%, #99000f 100%) !important;
	box-shadow:
		0 14px 38px rgba(255, 59, 48, 0.6),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
	color: #fff !important;
}

button.uv-envivo-fab:active {
	transform: translateY(0) scale(0.98);
}

.uv-envivo-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
	animation: uv-envivo-pulse 1.6s ease-out infinite;
}

@keyframes uv-envivo-drop {
	from {
		opacity: 0;
		transform: translateY(-18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes uv-envivo-glow {
	0%,
	100% {
		box-shadow:
			0 10px 30px rgba(215, 0, 21, 0.4),
			inset 0 1px 0 rgba(255, 255, 255, 0.35);
	}
	50% {
		box-shadow:
			0 10px 40px rgba(255, 59, 48, 0.75),
			inset 0 1px 0 rgba(255, 255, 255, 0.35);
	}
}

@keyframes uv-envivo-shine {
	0% {
		left: -75%;
	}
	55% {
		left: 125%;
	}
	100% {
		left: 125%;
	}
}

@keyframes uv-envivo-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.75);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	button.uv-envivo-fab,
	button.uv-envivo-fab::before,
	.uv-envivo-dot,
	.uv-envivo-player {
		animation: none !important;
	}
}

/* ---- Modal ---- */

.uv-envivo-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.uv-envivo-modal[hidden] {
	display: none;
}

.uv-envivo-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	cursor: pointer;
}

.uv-envivo-player {
	position: relative;
	width: min(960px, 100%);
	animation: uv-envivo-in 200ms ease-out;
}

@keyframes uv-envivo-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.uv-envivo-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.uv-envivo-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

button.uv-envivo-close {
	position: absolute !important;
	top: -46px !important;
	right: 0 !important;
	width: 38px !important;
	height: 38px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.14) !important;
	color: #fff !important;
	font-size: 0 !important;
	line-height: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: none !important;
	cursor: pointer !important;
	transition: background 150ms ease, transform 150ms ease !important;
}

button.uv-envivo-close svg {
	width: 16px;
	height: 16px;
	display: block;
}

button.uv-envivo-close:hover,
button.uv-envivo-close:focus-visible {
	background: rgba(255, 255, 255, 0.3) !important;
	transform: scale(1.08);
	color: #fff !important;
}

/* ---- Redes sociales en el pie del popup ---- */

.uv-envivo-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 14px;
	margin-top: 16px;
	text-align: center;
}

.uv-envivo-social-label {
	color: rgba(255, 255, 255, 0.75);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
}

a.uv-envivo-social-link {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 42px !important;
	height: 42px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.12) !important;
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background 160ms ease, transform 160ms ease !important;
}

a.uv-envivo-social-link svg {
	width: 20px;
	height: 20px;
	display: block;
}

a.uv-envivo-social-link:hover,
a.uv-envivo-social-link:focus-visible {
	transform: translateY(-3px) scale(1.08);
	color: #fff !important;
}

a.uv-envivo-social-instagram:hover,
a.uv-envivo-social-instagram:focus-visible {
	background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
}

a.uv-envivo-social-facebook:hover,
a.uv-envivo-social-facebook:focus-visible {
	background: #1877f2 !important;
}

a.uv-envivo-social-youtube:hover,
a.uv-envivo-social-youtube:focus-visible {
	background: #ff0000 !important;
}

/* Bloquea el scroll del fondo mientras el modal está abierto */
body.uv-envivo-lock {
	overflow: hidden;
}

/* ---- Página "En Vivo" (shortcode [univista_en_vivo]) ---- */

.uv-envivo-page {
	max-width: 1140px;
	margin: 0 auto;
	padding: 10px 0 30px;
}

.uv-envivo-page-headline {
	margin: 0 0 18px;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	color: #333;
}

.uv-envivo-page-headline--live {
	color: #d70015;
}

.uv-envivo-page-headline--upcoming {
	color: #c96a00;
}

.uv-envivo-page .uv-envivo-frame {
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

.uv-envivo-page .uv-envivo-social {
	margin-top: 20px;
}

.uv-envivo-page .uv-envivo-social--top {
	margin-top: 0;
	margin-bottom: 18px;
}

/* Enlaces en texto (con botón copiar) en la página En Vivo */
.uv-envivo-links {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
}

.uv-envivo-links .uv-envivo-social-label {
	color: #555;
	font-size: 14px;
	font-weight: 600;
}

.uv-envivo-link-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

a.uv-envivo-link {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 8px 14px !important;
	border-radius: 999px !important;
	background: rgba(0, 0, 0, 0.06) !important;
	color: #1d2327 !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background 150ms ease, color 150ms ease !important;
}

a.uv-envivo-link svg {
	width: 18px;
	height: 18px;
	display: block;
	flex-shrink: 0;
}

a.uv-envivo-link:hover,
a.uv-envivo-link:focus-visible {
	color: #fff !important;
}

a.uv-envivo-link.uv-envivo-social-facebook:hover,
a.uv-envivo-link.uv-envivo-social-facebook:focus-visible {
	background: #1877f2 !important;
}

a.uv-envivo-link.uv-envivo-social-youtube:hover,
a.uv-envivo-link.uv-envivo-social-youtube:focus-visible {
	background: #ff0000 !important;
}

a.uv-envivo-link.uv-envivo-social-instagram:hover,
a.uv-envivo-link.uv-envivo-social-instagram:focus-visible {
	background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
}

button.uv-envivo-copy {
	display: inline-flex !important;
	align-items: center !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 8px 14px !important;
	border: 1px solid rgba(0, 0, 0, 0.25) !important;
	border-radius: 999px !important;
	background: transparent !important;
	color: #1d2327 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transition: background 150ms ease, color 150ms ease, border-color 150ms ease !important;
}

button.uv-envivo-copy:hover,
button.uv-envivo-copy:focus-visible {
	background: #1d2327 !important;
	color: #fff !important;
	border-color: #1d2327 !important;
}

button.uv-envivo-copy.is-copied {
	background: #00a32a !important;
	color: #fff !important;
	border-color: #00a32a !important;
}

.uv-envivo-page .uv-envivo-social-label {
	color: #555;
}

.uv-envivo-page a.uv-envivo-social-link {
	background: rgba(0, 0, 0, 0.08) !important;
	color: #222 !important;
}

.uv-envivo-page a.uv-envivo-social-link:hover,
.uv-envivo-page a.uv-envivo-social-link:focus-visible {
	color: #fff !important;
}

/* Botón "Activar sonido" sobre el reproductor de la página */
button.uv-envivo-unmute {
	position: absolute !important;
	top: 14px !important;
	left: 50% !important;
	transform: translateX(-50%);
	z-index: 5;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 10px 18px !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 999px !important;
	background: rgba(0, 0, 0, 0.75) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.5px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
	transition: background 150ms ease, transform 150ms ease !important;
	animation: uv-envivo-pulse 2s ease-out infinite;
}

button.uv-envivo-unmute svg {
	width: 18px;
	height: 18px;
	display: block;
}

button.uv-envivo-unmute:hover,
button.uv-envivo-unmute:focus-visible {
	background: #d70015 !important;
	color: #fff !important;
	transform: translateX(-50%) scale(1.05);
}

/* ---- Punto de estado en el ítem del menú ---- */

.uv-envivo-menu-item .uv-envivo-menu-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 7px;
	border-radius: 50%;
	background: #9aa0a6;
	vertical-align: middle;
}

.uv-envivo-menu-item .uv-envivo-menu-dot--live {
	background: #e01414;
	animation: uv-envivo-pulse 1.6s ease-out infinite;
}

.uv-envivo-menu-item .uv-envivo-menu-dot--upcoming {
	background: #f0a000;
}

/* ---- Móvil ---- */

@media (max-width: 600px) {
	button.uv-envivo-fab {
		top: 74px !important;
		right: 14px !important;
		padding: 10px 16px !important;
		font-size: 12px !important;
		letter-spacing: 1.5px !important;
	}

	.uv-envivo-modal {
		padding: 12px;
	}

	.uv-envivo-close {
		top: -44px;
	}
}
