/* Scoped site notification ticker styles. Does not target WooCommerce notices. */
.ws-snt {
	--ws-snt-duration: 20s;
	box-sizing: border-box;
	width: 100%;
	line-height: 1.4;
}

.ws-snt *,
.ws-snt *::before,
.ws-snt *::after {
	box-sizing: border-box;
}

.ws-snt--empty .ws-snt__placeholder {
	margin: 0;
	padding: 0.75rem 1rem;
	opacity: 0.8;
}

.ws-snt--font-variant-normal {
	font-variant-caps: normal;
}

.ws-snt--font-variant-small-caps {
	font-variant-caps: small-caps;
}

.ws-snt--font-variant-all-small-caps {
	font-variant-caps: all-small-caps;
}

.ws-snt__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 100%;
}

.ws-snt__track {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.ws-snt__close {
	flex: 0 0 auto;
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0.15rem 0.35rem;
	opacity: 0.85;
}

.ws-snt__close:hover,
.ws-snt__close:focus {
	opacity: 1;
}

.ws-snt__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ws-snt__link {
	color: inherit;
	text-decoration: underline;
}

.ws-snt.has-link-color .ws-snt__link {
	color: var(--wp--style--color--link, inherit);
}

.ws-snt__link:hover,
.ws-snt__link:focus {
	text-decoration: none;
}

/* Static single message */
.ws-snt--static .ws-snt__static {
	text-align: center;
}

.ws-snt--static .ws-snt__item {
	display: inline;
	white-space: normal;
}

/* Marquee */
.ws-snt--marquee .ws-snt__marquee {
	display: flex;
	width: max-content;
	animation: ws-snt-marquee var(--ws-snt-duration, 20s) linear infinite;
	will-change: transform;
}

.ws-snt--marquee.ws-snt--reduced-motion .ws-snt__marquee {
	animation: none;
	width: 100%;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
}

.ws-snt--marquee.ws-snt--reduced-motion .ws-snt__marquee-set[aria-hidden="true"] {
	display: none;
}

.ws-snt__marquee-set {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: clamp(2.5rem, 6vw, 5rem);
	padding-inline-end: clamp(2.5rem, 6vw, 5rem);
	white-space: nowrap;
}

.ws-snt--marquee.ws-snt--reduced-motion .ws-snt__marquee-set {
	flex-wrap: wrap;
	justify-content: center;
	white-space: normal;
	padding-inline-end: 0;
}

.ws-snt__item {
	display: inline-block;
}

@keyframes ws-snt-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(calc(-1 * var(--ws-snt-shift, 50%)));
	}
}

/* Rotate */
.ws-snt--rotate .ws-snt__rotate-list {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: center;
	position: relative;
}

.ws-snt--rotate .ws-snt__item {
	display: block;
	margin: 0;
	padding: 0;
}

/* display:block above would otherwise override the hidden attribute and stack every message. */
.ws-snt--rotate .ws-snt__item[hidden] {
	display: none;
}

.ws-snt--rotate .ws-snt__item.is-active {
	animation: ws-snt-fade-in 0.35s ease;
}

.ws-snt--rotate.ws-snt--reduced-motion .ws-snt__item.is-active {
	animation: none;
}

@keyframes ws-snt-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ws-snt--marquee .ws-snt__marquee {
		animation: none;
		width: 100%;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.5rem 1.5rem;
	}

	.ws-snt--marquee .ws-snt__marquee-set[aria-hidden="true"] {
		display: none;
	}

	.ws-snt--marquee .ws-snt__marquee-set {
		flex-wrap: wrap;
		justify-content: center;
		white-space: normal;
		padding-inline-end: 0;
	}
}
