/*
 * SM Events slider.
 *
 * Every custom property is declared on .sme-slider, never on :root, so two
 * sliders on one page keep their own sizing and Elementor can target one
 * instance through {{WRAPPER}}.
 */

.sme-slider {
	--sme-gap: 20px;
	--sme-row-gap: 20px;
	--sme-radius: 0px;
	--sme-ratio: 1 / 1;
	--sme-card-w: min(20vw, 900px);
	--sme-card-bg: transparent;
	--sme-hover-scale: 1.025;
	--sme-stair-drop-factor: 0.8;
	--sme-stair-drop: calc(var(--sme-card-w) * var(--sme-stair-drop-factor));
	--sme-pad-top: 24px;
	--sme-pad-bottom: calc(var(--sme-stair-drop) + 48px);

	position: relative;
	width: 100%;
	overflow: hidden;
	padding: var(--sme-pad-top) 0 var(--sme-pad-bottom);
	overscroll-behavior-inline: contain;
}

.sme-slider[data-sme-stair="flat"] {
	--sme-pad-bottom: 24px;
}

.sme-row {
	overflow: visible;
}

.sme-row--2 {
	margin-top: var(--sme-row-gap);
}

.sme-track,
.sme-seq {
	display: flex;
	flex-flow: row nowrap;
	align-items: flex-start;
	gap: var(--sme-gap);
	width: max-content;
}

.sme-track {
	transform: translate3d(0, 0, 0);
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
}

.sme-slider[data-sme-drag="true"] .sme-track {
	cursor: grab;
}

.sme-slider.is-sme-active .sme-track {
	will-change: transform;
}

.sme-slider.is-sme-dragging .sme-track {
	cursor: grabbing;
}

.sme-slide {
	display: block;
	flex: 0 0 var(--sme-card-w);
	width: var(--sme-card-w);
	aspect-ratio: var(--sme-ratio);
	margin: 0;
	overflow: hidden;
	position: relative;
	text-decoration: none;
	-webkit-user-drag: none;
	background: var(--sme-card-bg);
	border-radius: var(--sme-radius);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
	z-index: var(--sme-slide-z, 1);
	transform: translate3d(0, var(--sme-slide-y, 0px), 0);
}

.sme-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border: 0;
	pointer-events: none;
	transition: transform 0.25s ease;
}

/*
 * With --sme-ratio: auto the card has no fixed height, so the percentage
 * height on the image resolves to auto and the original proportions survive.
 * An imageless card has no content at all, so it needs a floor.
 */
.sme-slide--empty {
	aspect-ratio: 1 / 1;
	min-height: 60px;
	background: var(--sme-card-bg, rgba(0, 0, 0, 0.08));
}

@media (hover: hover) and (pointer: fine) {
	.sme-slider[data-sme-hover="true"] .sme-slide:hover {
		box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
	}

	.sme-slider[data-sme-hover="true"] .sme-slide:hover img {
		transform: scale(var(--sme-hover-scale));
	}
}

.sme-slider[data-sme-hover].is-sme-dragging .sme-slide:hover img {
	transform: none;
	transition: none;
}

.sme-slider[data-sme-debug="true"] .sme-slide {
	outline: 2px solid #20c997;
	outline-offset: -2px;
}

.sme-slider[data-sme-debug="true"] .sme-slide[data-sme-debug-kind="clone"] {
	outline-color: #e64980;
}

.sme-slider[data-sme-debug="true"] .sme-slide[data-sme-debug-kind="fill"] {
	outline-color: #f08c00;
}

.sme-slider[data-sme-debug="true"] .sme-slide::after {
	content: attr(data-sme-debug-label);
	position: absolute;
	top: 4px;
	left: 4px;
	z-index: 20;
	max-width: calc(100% - 8px);
	overflow: hidden;
	padding: 3px 5px;
	background: rgba(0, 0, 0, 0.82);
	color: #fff;
	font: 11px/1.2 monospace;
	letter-spacing: 0;
	pointer-events: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sme-slide:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.sme-notice {
	padding: 16px 18px;
	border: 1px dashed rgba(0, 0, 0, 0.35);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.03);
	color: inherit;
	font-size: 13px;
	line-height: 1.5;
}

/*
 * Built-in responsive defaults. Elementor's per-device controls override these
 * because its generated rules carry the element wrapper's specificity.
 */
@media (max-width: 1024px) {
	.sme-slider {
		--sme-card-w: min(28vw, 900px);
	}
}

@media (max-width: 768px) {
	.sme-slider {
		--sme-card-w: min(160px, 900px);
		--sme-row-gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sme-track {
		transform: none !important;
	}

	.sme-slide img {
		transition: none !important;
	}
}
