:root {
	--wwp-wp-gap: 1rem;
}
.wwp-wp-mockup {
	position: relative;
	width: 100%;
	aspect-ratio: var(--tpl-aspect); /* set inline by shortcode: overlay_w / overlay_h */
	display: block;
	overflow: hidden;
}

/* The uploaded screenshot, clipped by the overlay window */
.wwp-wp-mockup .wwp-wp-shot.layer {
	position: absolute;
	object-fit: cover;
	object-position: center;
	user-select: none;
	-webkit-user-drag: none;
	z-index:1;
}
/* The overlay PNG from plugin assets */
.wwp-wp-mockup .wwp-wp-overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}

/* Article as flex container; header spans full width */
.wwp-wp-item {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 1.25rem 0;
	border-top: 1px solid rgba(0,0,0,0.08);
}

/* Header full-width row */
.wwp-wp-item > .wwp-wp-header {
	flex: 0 0 100%;
	order: 1; /* always first */
}

/* Mobile-first order: shots above excerpt */
.wwp-wp-item > .wwp-wp-shots {
	flex: 1 1 100%;
	order: 2;
}

/* Excerpt below shots on mobile */
.wwp-wp-item > .wwp-wp-content {
	flex: 1 1 100%;
	order: 3;
}

.wwp-wp-shots {
	margin:auto;
	position: relative;
	max-width:300px;
}

/* Desktop mockup fills the row; leave visual room for phone overlay */
.wwp-wp-shots .desktop {
	position: relative;
	z-index: 1;
}

/* Phone mockup sits bottom-right over the desktop mockup */
.wwp-wp-shots .mobile {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 2;
	width: 34%;
	max-width: 220px; /* cap so it doesn’t overwhelm on small screens */
}

/* Ensure the mockups scale nicely */
.wwp-wp-shots .desktop .wwp-wp-mockup,
.wwp-wp-shots .mobile .wwp-wp-mockup {
	width: 100%;
}

@media (min-width: 1000px) {
	
	.wwp-wp-shots {
		max-width:500px;
		margin:auto 30px;
	}

	.wwp-wp-item > .wwp-wp-shots,
	.wwp-wp-item > .wwp-wp-content {
		flex: 1 1 50%;
	}

	/* Default (odd items): shots left, excerpt right */
	.wwp-wp-archive-list .wwp-wp-item:nth-child(odd) > .wwp-wp-shots { order: 2; }
	.wwp-wp-archive-list .wwp-wp-item:nth-child(odd) > .wwp-wp-content { order: 3; }

	/* Even items: swap positions (excerpt left, shots right) */
	.wwp-wp-archive-list .wwp-wp-item:nth-child(even) > .wwp-wp-shots { order: 3; }
	.wwp-wp-archive-list .wwp-wp-item:nth-child(even) > .wwp-wp-content { order: 2; }

	/* Let the overlayed phone be a bit larger on big screens */
	.wwp-wp-shots .mobile {
		width: 30%;
		max-width: 260px;
	}

}
@media (min-width: 1300px) {
	
	.wwp-wp-shots {
		max-width:500px;
	}
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	.wwp-wp-item:hover .wwp-wp-shots .mobile {
		transition: none;
		transform: none;
	}
}

