/* Logo Slot Gallery — frontend */

.lsg-gallery {
	--lsg-height: 90px;
	--lsg-maxw: 260px;
	--lsg-transition: 600ms;
	display: inline-flex;
	max-width: 100%;
	width: var(--lsg-maxw);
	margin: 0 auto;
}

/* The viewport: shows exactly one slot at a time. */
.lsg-mask {
	position: relative;
	width: 100%;
	height: var(--lsg-height);
	overflow: hidden;
	line-height: 0;
}

/* The reel is a vertical column of slides that translates up on each tick. */
.lsg-reel {
	display: block;
	will-change: transform;
	transform: translate3d(0, 0, 0);
	transition: transform var(--lsg-transition) cubic-bezier(0.22, 1.4, 0.36, 1);
}

/* Motion blur during the roll sells the slot-machine feel. */
.lsg-reel.lsg-spinning {
	filter: blur(0.6px);
}

.lsg-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--lsg-height);
}

.lsg-slide .lsg-img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Greyscale option. */
.lsg-grayscale .lsg-img {
	filter: grayscale(100%);
	opacity: 0.75;
	transition: filter 0.25s ease, opacity 0.25s ease;
}

.lsg-grayscale:hover .lsg-img {
	filter: grayscale(0%);
	opacity: 1;
}

/* Block wrapper + alignment. The gallery is inline-flex, so text-align
   positions it within the wrapper for centre / wide / full. */
.lsg-block {
	display: block;
}

.lsg-block.aligncenter,
.lsg-block.alignwide,
.lsg-block.alignfull {
	text-align: center;
}

.lsg-block.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.lsg-block.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

/* When a theme doesn't style aligncenter, this keeps it centred. */
.lsg-block.aligncenter > .lsg-gallery {
	margin-left: auto;
	margin-right: auto;
}

/* Admin-only notice. */
.lsg-empty {
	padding: 0.75em 1em;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	color: #646970;
	font-size: 13px;
}

/* Responsive: let the frame shrink and keep aspect on small screens. */
@media (max-width: 600px) {
	.lsg-gallery {
		--lsg-height: calc(var(--lsg-height) * 0.85);
	}
}

/* Respect reduced-motion: swap becomes a quick fade instead of a roll. */
@media (prefers-reduced-motion: reduce) {
	.lsg-reel {
		transition: none;
	}
	.lsg-reel.lsg-spinning {
		filter: none;
	}
	.lsg-gallery[data-reduced="1"] .lsg-slide {
		transition: opacity 0.3s ease;
	}
}
