/**
 * Carousel Bar – front-end marquee styles.
 *
 * All visual values come from CSS custom properties set inline per-instance,
 * so a single stylesheet supports any configuration.
 */

.fcb-bar {
	--fcb-bg: #ffffff;
	--fcb-color: #111111;
	--fcb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--fcb-size: 15px;
	--fcb-weight: 500;
	--fcb-spacing: 0px;
	--fcb-transform: none;
	--fcb-height: 44px;
	--fcb-icon-size: 17px;
	--fcb-gap: 26px;
	--fcb-border-top: #ededed;
	--fcb-border-bot: #ededed;
	--fcb-z: 9999;

	box-sizing: border-box;
	width: 100%;
	height: var(--fcb-height);
	background: var(--fcb-bg);
	border-top: 1px solid var(--fcb-border-top);
	border-bottom: 1px solid var(--fcb-border-bot);
	overflow: hidden;
	position: relative;
	z-index: var(--fcb-z);
	-webkit-font-smoothing: antialiased;
}

.fcb-bar * {
	box-sizing: border-box;
}

.fcb-sticky {
	position: sticky;
	top: 0;
}

/* Viewport masks the overflowing, oversized track. */
.fcb-viewport {
	height: 100%;
	width: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
}

/* The track holds one or more identical "sets" laid out in a row. */
.fcb-track {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	white-space: nowrap;
	will-change: transform;
	/* --fcb-set-width and animation-duration are set by JS once measured. */
	animation-name: fcb-scroll-left;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-play-state: paused; /* JS un-pauses after measuring to avoid a jump. */
}

.fcb-track.fcb-ready {
	animation-play-state: running;
}

.fcb-track[data-direction="right"] {
	animation-name: fcb-scroll-right;
}

/* One repeated unit of content. */
.fcb-set {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	flex: 0 0 auto;
}

.fcb-item {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0 calc(var(--fcb-gap) / 2);
	color: var(--fcb-color);
	font-family: var(--fcb-font);
	font-size: var(--fcb-size);
	font-weight: var(--fcb-weight);
	letter-spacing: var(--fcb-spacing);
	text-transform: var(--fcb-transform);
	line-height: 1;
}

/* Linked items behave like the surrounding text but become interactive. */
.fcb-item-link {
	text-decoration: none;
	color: var(--fcb-color);
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.fcb-item-link:hover,
.fcb-item-link:focus {
	opacity: 0.7;
	text-decoration: none;
	color: var(--fcb-color);
}
.fcb-item-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 4px;
}

.fcb-icon {
	font-size: var(--fcb-icon-size);
	line-height: 1;
	display: inline-block;
}

.fcb-sep {
	color: var(--fcb-color);
	opacity: 0.5;
	font-family: var(--fcb-font);
	font-size: var(--fcb-size);
	font-weight: var(--fcb-weight);
}

/* Pause on hover. */
.fcb-pause-hover:hover .fcb-track {
	animation-play-state: paused;
}

@keyframes fcb-scroll-left {
	from {
		transform: translate3d(0, 0, 0);
	}
	to {
		transform: translate3d(calc(-1 * var(--fcb-set-width, 0px)), 0, 0);
	}
}

@keyframes fcb-scroll-right {
	from {
		transform: translate3d(calc(-1 * var(--fcb-set-width, 0px)), 0, 0);
	}
	to {
		transform: translate3d(0, 0, 0);
	}
}

/* Accessibility: honour the visitor's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
	.fcb-respect-rm .fcb-track {
		animation: none !important;
		transform: none !important;
	}
}
