/**
 * Figma screenshot widget — layout, floating cursors, desktop/mobile art swap.
 *
 * Desktop-first base styles (centered image, side cursors). Mobile layout is scoped to
 * max-width: 767px and Elementor editor body.elementor-device-* (wide iframe).
 */

/* --- Desktop (default) --- */
.figma-screenshot-widget {
	overflow-x: visible;
	width: 100%;
}

.figma-screenshot-widget__stage {
	position: relative;
	width: 100%;
	overflow-x: visible;
	padding: clamp(1.5rem, 4vw, 3rem) clamp(0.75rem, 2vw, 2rem) clamp(1rem, 2vw, 1.5rem);
	box-sizing: border-box;
}

/* Sit above the screenshot so arrows can overlap the image edges */
.figma-screenshot-widget__cursors {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	overflow: visible;
}

.figma-screenshot-widget__cursors--desktop {
	display: block;
}

.figma-screenshot-widget__cursors--mobile {
	display: none;
}

.figma-screenshot-widget__cursor-wrap {
	position: absolute;
	display: block;
	line-height: 0;
}

.figma-screenshot-widget__cursor {
	display: block;
	height: auto;
	width: auto;
	will-change: transform;
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor {
	max-width: min(175px, 30vw);
}

.figma-screenshot-widget__main {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.figma-screenshot-widget__figure {
	position: relative;
	z-index: 1;
	overflow: visible;
	margin: 0;
	width: 100%;
	max-width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	align-self: center;
	box-sizing: border-box;
}

.figma-screenshot-widget__img {
	position: relative;
	z-index: 0;
	display: block;
	width: 80%;
	height: auto;
	max-width: 80%;
	border-radius: 12px !important;
	overflow: hidden !important;
}

/* Desktop — frame the screenshot (mid-left + three corners). */
.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--tl {
	left: 0;
	top: 40%;
	transform: translate(-61px, -108px);
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--tr {
	right: 0;
	top: 2%;
	transform: translate(52px, -11px);
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--bl {
	left: 10%;
	bottom: -6%;
	transform: translate(-107px, 76px);
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--br {
	right: 0;
	bottom: 3%;
	transform: translate(11px, 103px);
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor {
	animation: figma-cursor-float-a 7s ease-in-out infinite;
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--tr .figma-screenshot-widget__cursor {
	animation: figma-cursor-float-b 8.5s ease-in-out infinite 0.5s;
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--bl .figma-screenshot-widget__cursor {
	animation: figma-cursor-float-c 9s ease-in-out infinite 1s;
}

.figma-screenshot-widget__cursors--desktop .figma-screenshot-widget__cursor-wrap--br .figma-screenshot-widget__cursor {
	animation: figma-cursor-float-d 7.5s ease-in-out infinite 0.25s;
}

.figma-screenshot-widget__link-wrap {
	width: 100%;
	text-align: center;
	padding: 0;
	box-sizing: border-box;
	margin-top: clamp(1rem, 3vw, 2rem);
}

.figma-screenshot-widget__link {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.figma-screenshot-widget__link:hover,
.figma-screenshot-widget__link:focus {
	text-decoration-thickness: 2px;
}

/* Mobile-only rows (Mariyam/Lorenz above, Jannis/You below image) — hidden on desktop */
.figma-screenshot-widget__mobile-cursors-row {
	display: none;
}

/* --- Mobile: narrow viewport --- */
@media screen and (max-width: 1024px) {
	.figma-screenshot-widget {
		overflow-x: visible;
	}

	.figma-screenshot-widget__stage {
		overflow-x: visible;
		padding: clamp(1.25rem, 5vw, 2rem) 0 clamp(1.5rem, 6vw, 2.5rem);
	}

	.figma-screenshot-widget__cursors--desktop {
		display: none;
	}

	.figma-screenshot-widget__cursors--mobile {
		display: block;
	}

	.figma-screenshot-widget__cursors--mobile .figma-screenshot-widget__cursor {
		max-width: min(155px, 46vw);
	}

	.figma-screenshot-widget__main {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: 0;
		align-items: flex-start;
	}

	.elementor-widget-container .figma-screenshot-widget__figure,
	.figma-screenshot-widget .figma-screenshot-widget__figure {
		width: calc(100% - var(--content-padding)) !important;
		max-width: none !important;
		justify-content: flex-start;
		align-self: flex-end;
	}

	.figma-screenshot-widget__img {
		max-width: none !important;
		width: 100% !important;
		border-radius: 6px 0px 0px  6px !important;
		overflow: hidden !important;
	}

	/* Mobile cursor rows: same flex shell as bottom row */
	.figma-screenshot-widget__mobile-cursors-row {
		display: block;
		width: 100%;
		max-width: 100vw;
		align-self: stretch;
		position: relative;
		min-height: clamp(2.75rem, 12vw, 4rem);
		pointer-events: none;
	}

	.figma-screenshot-widget__mobile-cursors-row--top {
		z-index: 3;
	}

	.figma-screenshot-widget__mobile-cursors-row--bottom {
		z-index: 2;
	}

	.figma-screenshot-widget__cursors--mobile-top {
		position: relative;
		inset: auto;
		display: flex !important;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		height: 0;
		padding: 0 clamp(0.25rem, 2vw, 0.75rem);
		box-sizing: border-box;
		overflow: visible;
	}

	.figma-screenshot-widget__cursors--mobile-top .figma-screenshot-widget__cursor-wrap {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		transform: none;
		margin: 0;
	}

	/* Mariyam + Lorenz — position within top row */
	.figma-screenshot-widget__cursors--mobile-top .figma-screenshot-widget__cursor-wrap--tl {
		left: 6%;
		top: 0;
		right: auto;
		bottom: auto;
		transform: translate(-3px, 16px);
	}

	.figma-screenshot-widget__cursors--mobile-top .figma-screenshot-widget__cursor-wrap--tr {
		right: 0;
		left: auto;
		top: 0;
		bottom: auto;
		transform: translate(0px, 20px);
	}

	.figma-screenshot-widget__cursors--mobile-top .figma-screenshot-widget__cursor-wrap--tl .figma-screenshot-widget__cursor {
		animation: figma-cursor-float-a 6.5s ease-in-out infinite;
	}

	.figma-screenshot-widget__cursors--mobile-top .figma-screenshot-widget__cursor-wrap--tr .figma-screenshot-widget__cursor {
		animation: figma-cursor-float-b 8s ease-in-out infinite 0.4s;
	}

	.figma-screenshot-widget__cursors--mobile-bottom {
		position: relative;
		inset: auto;
		display: flex !important;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		height: 0;
		padding: 0 clamp(0.25rem, 2vw, 0.75rem);
		box-sizing: border-box;
		overflow: visible;
	}

	.figma-screenshot-widget__cursors--mobile-bottom .figma-screenshot-widget__cursor-wrap {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		transform: none;
		margin: 0;
	}

	.figma-screenshot-widget__cursors--mobile-bottom .figma-screenshot-widget__cursor-wrap--bl {
		left: 6%;
		top: 0;
		right: auto;
		bottom: auto;
		transform: translate(-16px, 7px);
	}

	.figma-screenshot-widget__cursors--mobile-bottom .figma-screenshot-widget__cursor-wrap--br {
		right: 0;
		left: auto;
		top: 0;
		bottom: auto;
		transform: translate(-14px, 29px);
	}

	.figma-screenshot-widget__cursors--mobile-bottom .figma-screenshot-widget__cursor-wrap--bl .figma-screenshot-widget__cursor {
		animation: figma-cursor-float-c 8.5s ease-in-out infinite 0.8s;
	}

	.figma-screenshot-widget__cursors--mobile-bottom .figma-screenshot-widget__cursor-wrap--br .figma-screenshot-widget__cursor {
		animation: figma-cursor-float-d 7s ease-in-out infinite 0.2s;
	}

	.figma-screenshot-widget__link-wrap {
		padding: 0 clamp(1rem, 4vw, 1.5rem);
		align-self: stretch;
		margin-top: clamp(0.5rem, 2vw, 1rem);
	}
}


@keyframes figma-cursor-float-a {
	0%,
	100% {
		transform: translate(0, 0);
	}
	33% {
		transform: translate(7px, -9px);
	}
	66% {
		transform: translate(-6px, 7px);
	}
}

@keyframes figma-cursor-float-b {
	0%,
	100% {
		transform: translate(0, 0);
	}
	40% {
		transform: translate(-8px, 8px);
	}
	70% {
		transform: translate(6px, -6px);
	}
}

@keyframes figma-cursor-float-c {
	0%,
	100% {
		transform: translate(0, 0);
	}
	35% {
		transform: translate(8px, 6px);
	}
	65% {
		transform: translate(-7px, -8px);
	}
}

@keyframes figma-cursor-float-d {
	0%,
	100% {
		transform: translate(0, 0);
	}
	30% {
		transform: translate(-7px, -7px);
	}
	60% {
		transform: translate(7px, 8px);
	}
}
