/* AF News Wire — ticker */
.afnw-ticker {
	--afnw-bg: #1f1a2e;
	--afnw-text: #f1efe9;
	--afnw-label-bg: #f2b544;
	--afnw-label-text: #1f1a2e;
	--afnw-accent: #f2b544;
	--afnw-size: 14px;
	--afnw-height: 44px;
	--afnw-font: inherit;
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	height: var(--afnw-height);
	background: var(--afnw-bg);
	color: var(--afnw-text);
	font-family: var(--afnw-font);
	font-size: var(--afnw-size);
	line-height: 1.2;
	overflow: hidden;
	box-sizing: border-box;
	z-index: 99990;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.afnw-ticker *,
.afnw-ticker *::before,
.afnw-ticker *::after { box-sizing: border-box; }

.afnw-ticker.afnw-pos-bottom { border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, .06); }

.afnw-ticker.afnw-fixed { position: fixed; left: 0; right: 0; }
.afnw-ticker.afnw-fixed.afnw-pos-top { top: 0; }
.afnw-ticker.afnw-fixed.afnw-pos-bottom { bottom: 0; }
.admin-bar .afnw-ticker.afnw-fixed.afnw-pos-top { top: 32px; }
@media screen and (max-width: 782px) {
	.admin-bar .afnw-ticker.afnw-fixed.afnw-pos-top { top: 46px; }
}
@media screen and (max-width: 600px) {
	/* The admin bar scrolls away on small screens. */
	.admin-bar .afnw-ticker.afnw-fixed.afnw-pos-top { top: 0; }
}

.afnw-ticker.afnw-inline { border-radius: 10px; margin: 1em 0; border: 0; }

/* Label */
.afnw-ticker__label {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: .55em;
	padding: 0 1.1em 0 1em;
	background: var(--afnw-label-bg);
	color: var(--afnw-label-text);
	font-weight: 700;
	font-size: .86em;
	letter-spacing: .04em;
	white-space: nowrap;
	position: relative;
	z-index: 2;
	clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
	padding-right: 1.6em;
}
.afnw-uppercase .afnw-ticker__label { text-transform: uppercase; letter-spacing: .1em; }
.afnw-ticker__pulse {
	width: .55em;
	height: .55em;
	border-radius: 50%;
	background: currentColor;
	position: relative;
	flex: 0 0 auto;
}
.afnw-ticker__pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: currentColor;
	animation: afnw-pulse 1.8s ease-out infinite;
}
@keyframes afnw-pulse {
	0% { transform: scale(1); opacity: .6; }
	100% { transform: scale(2.8); opacity: 0; }
}

/* Viewport & track */
.afnw-ticker__viewport {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 32px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 32px), transparent 100%);
}
.afnw-ticker__track {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	white-space: nowrap;
	flex: 0 0 auto;
	will-change: transform;
}
.afnw-ticker__item {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 0 0 auto;
}
.afnw-ticker__item::before,
.afnw-ticker__item::marker { content: none; }

.afnw-ticker__sep {
	color: var(--afnw-accent);
	opacity: .85;
	padding: 0 1.1em;
	font-size: .9em;
}
.afnw-effect-scroll .afnw-ticker__item:first-child .afnw-ticker__sep { padding-left: 1em; }

.afnw-ticker__link,
.afnw-ticker__link:visited {
	display: inline-flex;
	align-items: center;
	gap: .6em;
	color: var(--afnw-text) !important;
	text-decoration: none !important;
	border: 0;
	box-shadow: none;
	outline-offset: 2px;
}
.afnw-ticker__link:hover .afnw-ticker__text,
.afnw-ticker__link:focus .afnw-ticker__text { color: var(--afnw-accent); }
.afnw-ticker__text { transition: color .2s ease; font-weight: 500; }

.afnw-ticker__source {
	--afnw-src: var(--afnw-accent);
	display: inline-flex;
	align-items: center;
	gap: .4em;
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--afnw-src);
	padding: .3em .6em;
	border-radius: 4px;
	border: 1px solid currentColor;
	line-height: 1;
}
.afnw-ticker__time { font-size: .78em; opacity: .55; font-variant-numeric: tabular-nums; }

/* Scroll effect */
.afnw-effect-scroll.is-ready .afnw-ticker__track {
	animation: afnw-scroll var(--afnw-duration, 40s) linear infinite;
}
.afnw-effect-scroll.is-paused .afnw-ticker__track { animation-play-state: paused; }
@keyframes afnw-scroll {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(var(--afnw-distance, -50%), 0, 0); }
}

/* Fade effect */
.afnw-effect-fade .afnw-ticker__track { position: relative; flex: 1 1 auto; width: 100%; height: 100%; }
.afnw-effect-fade .afnw-ticker__item {
	position: absolute;
	left: 1em;
	right: 1em;
	top: 50%;
	transform: translateY(calc(-50% + 8px));
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s ease, transform .45s ease, visibility .45s;
	overflow: hidden;
}
.afnw-effect-fade .afnw-ticker__item.is-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%);
}
.afnw-effect-fade .afnw-ticker__link { max-width: 100%; }
.afnw-effect-fade .afnw-ticker__text { overflow: hidden; text-overflow: ellipsis; }

/* Close */
.afnw-ticker__close {
	flex: 0 0 auto;
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--afnw-text);
	opacity: .55;
	width: var(--afnw-height);
	max-width: 44px;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0;
	z-index: 2;
}
.afnw-ticker__close:hover,
.afnw-ticker__close:focus-visible { opacity: 1; }

.afnw-ticker.is-closed { display: none !important; }

@media screen and (max-width: 600px) {
	.afnw-ticker__label { padding: 0 1.1em 0 .75em; }
	.afnw-ticker__label-text { display: none; }
	.afnw-ticker__label { gap: 0; }
	.afnw-ticker__time { display: none; }
	.afnw-hide-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.afnw-ticker__pulse::after { animation: none; }
	.afnw-effect-scroll.is-ready .afnw-ticker__track { animation-duration: calc(var(--afnw-duration, 40s) * 2.5); }
}
