/*
 * Ticker autónomo de Noticias Barlovento.
 * El HTML lo construye ticker.js y la animación es CSS para evitar conflictos
 * con las transformaciones/animaciones de NewsExo.
 */

body.nb-core .trending-news-area.nb-ticker-autonomo {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

body.nb-core .nb-ticker-barra {
	display: grid;
	grid-template-columns: auto minmax( 0, 1fr );
	align-items: stretch;
	width: 100%;
	min-height: 58px;
	background: #ffffff;
	overflow: hidden;
}

body.nb-core .nb-ticker-etiqueta {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0 2.2rem 0 1.4rem;
	background: #0a159f;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 900;
	line-height: 1;
	white-space: nowrap;
	z-index: 2;
}

body.nb-core .nb-ticker-etiqueta::after {
	content: '';
	position: absolute;
	top: 0;
	right: -18px;
	width: 0;
	height: 0;
	border-top: 29px solid transparent;
	border-bottom: 29px solid transparent;
	border-left: 18px solid #0a159f;
}

body.nb-core .nb-ticker-etiqueta__icono {
	font-size: 1rem;
}

body.nb-core .nb-ticker-viewport {
	position: relative;
	overflow: hidden;
	min-width: 0;
	background: #ffffff;
}

body.nb-core .nb-ticker-track {
	display: flex;
	align-items: center;
	width: max-content;
	min-width: max-content;
	height: 100%;
	animation: nb-ticker-correr 52s linear infinite;
	will-change: transform;
}

body.nb-core .nb-ticker-viewport:hover .nb-ticker-track,
body.nb-core .nb-ticker-viewport:focus-within .nb-ticker-track {
	animation-play-state: paused;
}

body.nb-core .nb-ticker-grupo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	height: 100%;
}

body.nb-core .nb-ticker-enlace {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	height: 100%;
	padding: 0 2.45rem 0 1.45rem;
	color: #172033;
	font-size: 0.94rem;
	font-weight: 750;
	line-height: 1.35;
	white-space: nowrap;
	text-decoration: none;
}

body.nb-core .nb-ticker-enlace::after {
	content: '•';
	position: absolute;
	right: 1rem;
	color: #ff5a24;
	font-size: 1rem;
	font-weight: 900;
}

body.nb-core .nb-ticker-enlace:hover,
body.nb-core .nb-ticker-enlace:focus {
	color: #ff5a24;
}

@keyframes nb-ticker-correr {
	from {
		transform: translate3d( 0, 0, 0 );
	}
	to {
		transform: translate3d( -50%, 0, 0 );
	}
}

@media ( max-width: 767px ) {
	body.nb-core .nb-ticker-barra {
		grid-template-columns: 1fr;
	}

	body.nb-core .nb-ticker-etiqueta {
		min-height: 42px;
		justify-content: center;
		padding: 0.55rem 1rem;
		font-size: 0.82rem;
	}

	body.nb-core .nb-ticker-etiqueta::after {
		display: none;
	}

	body.nb-core .nb-ticker-viewport {
		height: 44px;
	}

	body.nb-core .nb-ticker-enlace {
		font-size: 0.86rem;
		padding-left: 1rem;
		padding-right: 2rem;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	body.nb-core .nb-ticker-viewport {
		overflow-x: auto;
		scrollbar-width: thin;
	}

	body.nb-core .nb-ticker-track {
		animation: none;
	}

	body.nb-core .nb-ticker-grupo[aria-hidden='true'] {
		display: none;
	}
}
