/*!
 * Tejas Logo Carousel - front-end styles.
 * Everything is scoped to .tjlc-wrap. No global selectors.
 */
.tjlc-wrap {
	--tjlc-h: 60px;
	--tjlc-gap: 48px;
	--tjlc-speed: 60;
	--tjlc-iw: auto;
	--tjlc-imw: 180px;
	--tjlc-op: 1;
	--tjlc-oph: 1;
	--tjlc-jc: center;
	--tjlc-pos: center center;
	--tjlc-ta: center;
	--tjlc-shift: 0px;
	--tjlc-dur: 30s;
	--tjlc-dir: normal;
	--tjlc-focus: #2271b1;

	position: relative;
	display: block;
	clear: both;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	box-sizing: border-box;
}

.tjlc-wrap *,
.tjlc-wrap *::before,
.tjlc-wrap *::after {
	box-sizing: border-box;
}

.tjlc-wrap .tjlc-inner {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* Heading ---------------------------------------------------------------- */
.tjlc-wrap .tjlc-head {
	margin: 0 0 24px;
	text-align: var(--tjlc-ta);
}

.tjlc-wrap .tjlc-title {
	margin: 0 0 0.4em;
}

.tjlc-wrap .tjlc-desc > :last-child {
	margin-bottom: 0;
}

/* Viewport / track ------------------------------------------------------- */
.tjlc-wrap .tjlc-viewport {
	position: relative;
	width: 100%;
	padding: 6px 0;
	overflow: hidden;
	direction: ltr;
	container-type: inline-size;
}

.tjlc-wrap .tjlc-track {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	width: max-content;
	margin: 0;
	padding: 0;
}

.tjlc-wrap .tjlc-set {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.tjlc-wrap .tjlc-item {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: var(--tjlc-jc);
	width: var(--tjlc-iw);
	height: var(--tjlc-h);
	margin: 0 var(--tjlc-gap) 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
	background: none;
	border: 0;
	opacity: var(--tjlc-op);
	transition: opacity 0.25s ease;
}

.tjlc-wrap .tjlc-item::before,
.tjlc-wrap .tjlc-item::after {
	content: none !important;
}

.tjlc-wrap .tjlc-item:hover,
.tjlc-wrap .tjlc-item:focus-within {
	opacity: var(--tjlc-oph);
}

.tjlc-wrap .tjlc-link {
	display: flex;
	align-items: center;
	justify-content: inherit;
	max-width: 100%;
	height: 100%;
	text-decoration: none;
	border: 0;
	box-shadow: none;
}

.tjlc-wrap .tjlc-img {
	display: block;
	width: auto !important;
	height: var(--tjlc-h) !important;
	max-width: var(--tjlc-imw) !important;
	max-height: 100%;
	margin: 0 !important;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
	object-position: var(--tjlc-pos);
	transition: filter 0.25s ease;
	-webkit-user-drag: none;
	user-select: none;
}

/* Grayscale -> colour on hover/focus ------------------------------------- */
.tjlc-wrap.tjlc-wrap--gray .tjlc-img {
	filter: grayscale(1);
}

.tjlc-wrap.tjlc-wrap--gray .tjlc-item:hover .tjlc-img,
.tjlc-wrap.tjlc-wrap--gray .tjlc-item:focus-within .tjlc-img {
	filter: none;
}

/* Focus ------------------------------------------------------------------ */
.tjlc-wrap .tjlc-link:focus {
	outline: none;
}

.tjlc-wrap .tjlc-link:focus-visible {
	outline: 3px solid var(--tjlc-focus);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Edge fade -------------------------------------------------------------- */
.tjlc-wrap.tjlc-wrap--fade .tjlc-viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

/* Auto-scroll (enabled by JS once the loop has been built) --------------- */
.tjlc-wrap.tjlc-running .tjlc-track {
	animation: tjlc-scroll var(--tjlc-dur) linear infinite;
	animation-direction: var(--tjlc-dir);
	will-change: transform;
}

@keyframes tjlc-scroll {
	from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(calc(var(--tjlc-shift) * -1), 0, 0);
	}
}

/* Paused when off-screen or when a link has keyboard focus */
.tjlc-wrap.tjlc-offscreen .tjlc-track,
.tjlc-wrap.tjlc-focus-pause .tjlc-track {
	animation-play-state: paused;
}

/* Pause on hover: real mouse pointers only, never touch */
@media (hover: hover) and (pointer: fine) {
	.tjlc-wrap[data-tjlc-pause="1"]:hover .tjlc-track {
		animation-play-state: paused;
	}
}

/* Manual mode (auto-scroll off) and reduced-motion fallback: swipe / scroll */
.tjlc-wrap.tjlc-wrap--manual .tjlc-viewport,
.tjlc-wrap.tjlc-reduced .tjlc-viewport {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.tjlc-wrap.tjlc-wrap--manual .tjlc-viewport:focus-visible,
.tjlc-wrap.tjlc-reduced .tjlc-viewport:focus-visible {
	outline: 3px solid var(--tjlc-focus);
	outline-offset: -3px;
}

/* Static mode: wrapping grid, no movement -------------------------------- */
.tjlc-wrap.tjlc-wrap--static .tjlc-track {
	width: 100%;
}

.tjlc-wrap.tjlc-wrap--static .tjlc-set {
	flex-wrap: wrap;
	justify-content: var(--tjlc-jc);
	width: 100%;
	gap: var(--tjlc-gap);
}

.tjlc-wrap.tjlc-wrap--static .tjlc-item {
	margin: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
	.tjlc-wrap.tjlc-running .tjlc-track {
		animation: none;
	}
}

/* Utilities -------------------------------------------------------------- */
.tjlc-wrap .tjlc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tjlc-notice {
	box-sizing: border-box;
	max-width: 100%;
	margin: 1em 0;
	padding: 12px 16px;
	border: 1px dashed #b32d2e;
	background: #fff8f8;
	color: #50575e;
	font-size: 14px;
	line-height: 1.5;
}
