/* Logo strip ([bml_logo_marquee]). Everything is scoped to .bml-marquee, like the site header. */
.bml-marquee {
	--bml-marquee-gap: clamp(12px, 8px + 1vw, 20px);
	--bml-marquee-logo: clamp(150px, 42vw, 220px);

	display: block;
	width: 100%;
}

@media (min-width: 600px) {
	.bml-marquee {
		--bml-marquee-logo: clamp(180px, 22vw, 260px);
	}
}

/* Without JavaScript: a row that scrolls sideways. */
.bml-marquee__viewport {
	padding-block: 8px;
	overflow-x: auto;
	scrollbar-width: none;
}

.bml-marquee__viewport::-webkit-scrollbar {
	display: none;
}

.bml-marquee__track {
	display: flex;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Spacing lives on each item (not "gap") so both copies are exactly the same width. */
.bml-marquee__item {
	flex: 0 0 var(--bml-marquee-logo);
	margin: 0 var(--bml-marquee-gap) 0 0;
	padding: 0;
}

.bml-marquee__item--clone {
	display: none; /* Only needed for the loop, once the script runs. */
}

.bml-marquee__img {
	display: block;
	width: 100%;
	height: auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgb(19 34 47 / 8%), 0 4px 12px rgb(19 34 47 / 6%);
	pointer-events: none;
	user-select: none;
}

/* With JavaScript: endless drift, soft fade at both edges, drag to move. */
.bml-marquee.is-ready .bml-marquee__viewport {
	overflow: hidden;
	cursor: grab;
	user-select: none;
	touch-action: pan-y; /* Horizontal swipes drag the strip; vertical ones still scroll the page. */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.bml-marquee.is-ready .bml-marquee__track {
	will-change: transform;
}

.bml-marquee.is-ready .bml-marquee__item--clone {
	display: block;
}

.bml-marquee.is-dragging .bml-marquee__viewport {
	cursor: grabbing;
}
