/* Announcement bar. */

.njf-ab {
	position: relative;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 32px;
	padding: 4px 12px;
	background: var(--njf-accent, #111);
	color: #fff;
}

.njf-ab.is-fixed {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0);
	right: 0;
	left: 0;
	z-index: 1000;
}

/* The admin bar scrolls away on narrow screens, so the bar sits at the very top there. */
@media (max-width: 600px) {
	.njf-ab.is-fixed {
		top: 0;
	}
}

.njf-ab .njf-ab__slides {
	position: relative;
	flex: 1;
	max-width: 680px;
	min-width: 0;
	overflow: hidden;
	text-align: center;
}

.njf-ab .njf-ab__slide[hidden] {
	display: none;
}

.njf-ab .njf-ab__slide {
	position: relative;
}

.njf-ab .njf-ab__text {
	margin: 0;
	color: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.njf-ab .njf-ab__text a,
.njf-ab .njf-ab__runner a {
	color: inherit;
	text-decoration: none;
}

.njf-ab .njf-ab__text a:hover,
.njf-ab .njf-ab__text a:focus {
	color: inherit;
	text-decoration: underline;
}

/* Measuring and marquee: a single line; the original text becomes an invisible spacer. */
.njf-ab .njf-ab__slide.is-measuring .njf-ab__text,
.njf-ab .njf-ab__slide.is-marquee .njf-ab__text {
	white-space: nowrap;
}

.njf-ab .njf-ab__slide.is-marquee .njf-ab__text {
	overflow: hidden;
	visibility: hidden;
}

.njf-ab .njf-ab__runner-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	white-space: nowrap;
}

.njf-ab .njf-ab__runner {
	position: absolute;
	top: 0;
	left: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	will-change: transform;
}

.njf-ab .njf-ab__arrow,
.njf-ab .njf-ab__pause {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.njf-ab .njf-ab__arrow:hover,
.njf-ab .njf-ab__arrow:focus,
.njf-ab .njf-ab__pause:hover,
.njf-ab .njf-ab__pause:focus {
	background: rgb(255 255 255 / 15%);
	color: inherit;
}

.njf-ab .njf-ab__arrow svg,
.njf-ab .njf-ab__pause svg {
	width: 14px;
	height: 14px;
}

.njf-ab .njf-ab__pause .njf-ab__icon-play,
.njf-ab .njf-ab__pause.is-paused .njf-ab__icon-pause {
	display: none;
}

.njf-ab .njf-ab__pause.is-paused .njf-ab__icon-play {
	display: block;
}

@media (max-width: 749px) {
	.njf-ab .njf-ab__pause {
		position: absolute;
		right: 2px;
		width: 24px;
		height: 24px;
	}
}
