/* IMM Announcements: a strip above the header that scrolls short messages from right to left.
   Colours: the site's navy (#14305e, as the quick-contact bar) and gold (#C9A54A, as the legal notices). White on this navy is 12.5:1.
   Height is fixed (one line), so the page never jumps. Immigway's desktop header is an overlay (position absolute, top 0), but it is
   positioned inside its own wrapper (#pxl-header-elementor), which sits below the strip in the page flow, so the strip needs no
   rule for the header (measured in the browser at 1440 px wide: the header starts exactly where the strip ends). */
.imm-ann {
	--imm-ann-h: 40px;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
	height: var(--imm-ann-h);
	background: #14305e;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: var(--imm-ann-h);
	direction: ltr; /* the movement is the same whatever the page's text direction */
	overflow: hidden;
}

.imm-ann__viewport {
	height: 100%;
	overflow: hidden;
}

.imm-ann__track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	height: 100%;
	animation: imm-ann-scroll var(--imm-ann-dur, 60s) linear infinite;
	will-change: transform;
}

.imm-ann__set {
	display: flex;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.imm-ann__set li {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0 0 0 28px;
	white-space: nowrap;
}

/* the gold dot after every message (empty content: nothing for a screen reader to read) */
.imm-ann__set li::after {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	margin-left: 28px;
	border-radius: 50%;
	background: #c9a54a;
}

.imm-ann a,
.imm-ann a:visited {
	color: inherit;
	text-decoration: none;
}

.imm-ann a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.imm-ann a:focus-visible {
	outline: 2px solid #c9a54a;
	outline-offset: 2px;
	text-decoration: underline;
}

@keyframes imm-ann-scroll {
	from {
		transform: translate3d(0, 0, 0);
	}
	to {
		transform: translate3d(-50%, 0, 0);
	}
}

/* Pause: the mouse is over it (devices with a real pointer only: on a touch screen a "hover" would stay stuck after a tap) */
@media (hover: hover) and (pointer: fine) {
	.imm-ann:hover .imm-ann__track {
		animation-play-state: paused;
	}
}

/* Pause: a finger is held on it (the script sets the class) */
.imm-ann.is-held .imm-ann__track {
	animation-play-state: paused;
}

/* Keyboard focus inside it: the track stops and returns to its start, so the focused link is where the browser can show it */
.imm-ann:focus-within .imm-ann__track {
	animation: none;
	transform: none;
}

/* The device asks for less motion: nothing moves. One still row that can be scrolled sideways (same height as before, so the header
   offset still fits); on phones and tablets the messages wrap instead. The copies are not needed and are hidden. */
@media (prefers-reduced-motion: reduce) {
	.imm-ann__track {
		animation: none;
		transform: none;
		width: auto;
		will-change: auto;
	}

	.imm-ann__viewport {
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: thin;
	}

	.imm-ann__set[aria-hidden="true"] {
		display: none;
	}

	.imm-ann__set li:last-child::after {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) and (max-width: 1199px) {
	.imm-ann {
		height: auto;
		line-height: 1.4;
	}

	.imm-ann__viewport {
		overflow: visible;
	}

	.imm-ann__track {
		display: block; /* a flex row would keep each set as wide as its text; a block lets the set take the screen's width and wrap */
		height: auto;
	}

	.imm-ann__set {
		flex-wrap: wrap;
		padding: 6px 0;
	}

	.imm-ann__set li {
		white-space: normal;
		padding: 4px 16px;
	}

	.imm-ann__set li::after {
		display: none;
	}
}

/* Preview inside the admin screen: no header to move, a normal block */
.imm-ann--preview {
	margin: 8px 0 16px;
}

@media print {
	.imm-ann {
		display: none;
	}
}
