/**
 * FrontBlocks Stacked Images Styles
 */

/* Wrapper – centered, compact size on all viewports */
.frbl-stacked-images-wrapper {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 65vh;
	margin-left: auto;
	margin-right: auto;
	overflow: visible;
	display: block;
	background: transparent;
	padding: 40px;
	box-sizing: border-box;
}

/* Container – center content horizontally and vertically */
.frbl-stacked-images-container {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	margin: 0 auto;
}

/* Individual image – flex center so img is always centered */
.frbl-stacked-image {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	will-change: transform, opacity;
	opacity: 0;
	visibility: hidden;
	overflow: visible;
	margin: auto;
}

/* Show when initialized */
.frbl-initialized .frbl-stacked-image {
	visibility: visible;
}

.frbl-stacked-image img {
	max-width: 85%;
	max-height: 85%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center;
	display: block;
	margin: auto;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Placeholder */
.frbl-stacked-images-placeholder {
	padding: 40px;
	text-align: center;
	background: #f0f0f0;
	border: 2px dashed #ccc;
	border-radius: 8px;
	color: #666;
	font-size: 16px;
}

/* Editor styles */
.frbl-stacked-images-editor {
	min-height: 200px;
}

.frbl-stacked-images-preview {
	border: 2px dashed #ddd;
	border-radius: 8px;
	overflow: visible;
	background: #fafafa;
	position: relative;
	padding: 50px;
	margin: 20px;
}

.frbl-stacked-image-preview {
	border-radius: 4px;
	overflow: visible;
	transition: transform 0.3s ease;
}

.frbl-stacked-image-preview:hover {
	transform: scale(1.02) !important;
	z-index: 999 !important;
}

.frbl-stacked-image-preview img {
	display: block;
	transition: all 0.3s ease;
	pointer-events: none;
}

/* Tablet / ventana media: aquí suele verse enorme, lo limitamos mucho */
@media (min-width: 769px) and (max-width: 1200px) {
	.frbl-stacked-images-wrapper {
		max-width: 420px;
		max-height: 55vh;
		padding: 24px;
	}
	.frbl-stacked-image img {
		max-width: 82%;
		max-height: 82%;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.frbl-stacked-images-wrapper {
		min-height: 260px;
		max-height: 60vh;
		max-width: 88%;
		margin-left: auto;
		margin-right: auto;
		padding: 20px;
	}
	.frbl-stacked-images-container {
		min-height: 260px;
		margin: 0 auto;
	}
	.frbl-stacked-image img {
		max-width: 85%;
		max-height: 55vh;
		object-position: center;
		margin: auto;
	}
}
