/**
 * Blok: Logotypy — slider.
 */

.sanus-logotypy {
	--sanus-logotypy-bg: #ffffff;
	--sanus-logotypy-fade: 96px;
	--sanus-logotypy-gap: 24px;
	--sanus-logotypy-duration: 80s;
	--sanus-logotypy-tile-w: 330px;
	--sanus-logotypy-tile-h: 190px;
	--sanus-logotypy-img-max-w: 280px;
	--sanus-logotypy-img-max-h: 130px;
	position: relative;
	overflow: hidden;
	background-color: var(--sanus-logotypy-bg);
	box-sizing: border-box;
}

.sanus-logotypy__viewport {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.sanus-logotypy__track {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	width: max-content;
	will-change: transform;
	animation: sanus-logotypy-scroll var(--sanus-logotypy-duration) linear infinite;
}

.sanus-logotypy__set {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--sanus-logotypy-gap);
	padding-right: var(--sanus-logotypy-gap);
	flex-shrink: 0;
}

.sanus-logotypy__tile {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--sanus-logotypy-tile-w);
	height: var(--sanus-logotypy-tile-h);
	padding: 30px 25px;
	flex-shrink: 0;
	min-width: 0;
}

.sanus-logotypy__img {
	display: block;
	width: auto;
	height: auto;
	max-width: var(--sanus-logotypy-img-max-w);
	max-height: var(--sanus-logotypy-img-max-h);
	object-fit: contain;
	object-position: center;
	opacity: 0.65;
	filter: grayscale(100%);
	-webkit-filter: grayscale(100%);
	transition:
		opacity 0.35s ease,
		filter 0.35s ease,
		-webkit-filter 0.35s ease;
}

.sanus-logotypy__tile:hover .sanus-logotypy__img {
	opacity: 1;
	filter: grayscale(0%);
	-webkit-filter: grayscale(0%);
}

/* Wygaszenie krawędzi: pełny kolor tła + maska opacity. */
.sanus-logotypy::before,
.sanus-logotypy::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--sanus-logotypy-fade);
	z-index: 2;
	pointer-events: none;
	background-color: var(--sanus-logotypy-bg);
}

.sanus-logotypy::before {
	left: 0;
	-webkit-mask-image: linear-gradient(to right, #000 0%, transparent 100%);
	mask-image: linear-gradient(to right, #000 0%, transparent 100%);
}

.sanus-logotypy::after {
	right: 0;
	-webkit-mask-image: linear-gradient(to left, #000 0%, transparent 100%);
	mask-image: linear-gradient(to left, #000 0%, transparent 100%);
}

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

@media (prefers-reduced-motion: reduce) {
	.sanus-logotypy__track {
		animation: none;
		transform: none;
		flex-wrap: wrap;
		justify-content: center;
		width: 100%;
		row-gap: var(--sanus-logotypy-gap);
	}

	.sanus-logotypy__set--clone {
		display: none;
	}

	.sanus-logotypy__set {
		flex-wrap: wrap;
		justify-content: center;
		padding-right: 0;
		width: 100%;
	}

	.sanus-logotypy::before,
	.sanus-logotypy::after {
		display: none;
	}
}

/* Edytor: podgląd bez ruchu, z wygaszeniem. */
.sanus-logotypy--editor .sanus-logotypy__track {
	animation: none;
	transform: none;
	max-width: 100%;
	overflow-x: auto;
	width: 100%;
}

.sanus-logotypy--editor .sanus-logotypy__set--clone {
	display: none;
}

.sanus-logotypy--editor .sanus-logotypy__set {
	padding-right: 0;
}

.sanus-logotypy__empty {
	margin: 0;
	padding: 32px 16px;
	text-align: center;
	color: #384655;
}

.sanus-logotypy__dropzone {
	position: relative;
}

.sanus-logotypy__editor-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
	padding: 0 8px 8px;
}

.sanus-logotypy__editor-logo {
	position: relative;
}

.sanus-logotypy__editor-logo-actions {
	position: absolute;
	top: 4px;
	right: 4px;
	display: flex;
	gap: 2px;
	z-index: 3;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.sanus-logotypy__editor-logo:hover .sanus-logotypy__editor-logo-actions,
.sanus-logotypy__editor-logo:focus-within .sanus-logotypy__editor-logo-actions {
	opacity: 1;
}

.sanus-logotypy__editor-logo-actions .components-button {
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

@media (max-width: 600px) {
	.sanus-logotypy {
		--sanus-logotypy-fade: 48px;
		--sanus-logotypy-gap: 16px;
	}
}
