/**
 * Styles for the experimental room-overlay lab ([pillow_mockup_lab]).
 * Scoped under .pmg-lab so it never collides with the live widget (.pmg).
 */

.pmg-lab {
	max-width: 720px;
	margin: 0 auto;
	font-family: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: #1a1a1a;
}

/* Honor the [hidden] attribute even on elements that set display below
 * (loading overlay, size selector). Without this, `display: flex` overrides
 * the browser default `[hidden] { display: none }`. */
.pmg-lab [hidden] {
	display: none !important;
}

.pmg-lab__empty {
	padding: 40px 20px;
	text-align: center;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	color: #64748b;
	font-size: 15px;
}

/* Stage: room image with the pillow overlay on top */
.pmg-lab__stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 12px;
	background: #f1f5f9;
	line-height: 0;
}

.pmg-lab__room {
	display: block;
	width: 100%;
	height: auto;
}

.pmg-lab__overlay {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 34%;
	height: auto;
	transform: translate(-50%, -50%);
	pointer-events: none;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
	transition: width 0.25s ease;
}

/* Demo call-to-action (big arrow + text shown before upload) */
.pmg-lab__cta {
	position: absolute;
	top: 5%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
	pointer-events: none;
	width: max-content;
	max-width: 90%;
}

.pmg-lab__cta-text {
	font-size: clamp(18px, 3.4vw, 30px);
	font-weight: 800;
	line-height: 1.15;
	color: #1a1a1a;
	background: rgba(255, 255, 255, 0.88);
	padding: 8px 18px;
	border-radius: 100px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.pmg-lab__cta-arrow {
	width: clamp(40px, 7vw, 68px);
	height: auto;
	color: #e11d48;
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.22));
	animation: pmg-lab-bounce 1.2s ease-in-out infinite;
}

@keyframes pmg-lab-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(9px); }
}

/* Loading overlay */
.pmg-lab__loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(2px);
	line-height: 1.4;
}

.pmg-lab__lottie {
	width: 160px;
	height: 160px;
}

/* The spinner is only a fallback when the Lottie library/animation is missing */
.pmg-lab__spinner {
	display: none;
	width: 36px;
	height: 36px;
	border: 3px solid #cbd5e1;
	border-top-color: #1a1a1a;
	border-radius: 50%;
	animation: pmg-lab-spin 0.8s linear infinite;
}

.pmg-lab.is-no-lottie .pmg-lab__lottie {
	display: none;
}

.pmg-lab.is-no-lottie .pmg-lab__spinner {
	display: block;
}

.pmg-lab__loading-text {
	font-size: 14px;
	color: #334155;
}

@keyframes pmg-lab-spin {
	to { transform: rotate(360deg); }
}

/* Controls */
.pmg-lab__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

.pmg-lab__btn {
	appearance: none;
	border: 1.5px solid #1a1a1a;
	border-radius: 100px;
	background: transparent;
	color: #1a1a1a;
	font-size: 15px;
	font-weight: 600;
	padding: 10px 24px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.pmg-lab__btn--primary {
	background: #1a1a1a;
	color: #fff;
}

.pmg-lab__btn:hover {
	opacity: 0.9;
}

/* Size selector */
.pmg-lab__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pmg-lab__size {
	appearance: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-width: 76px;
	padding: 8px 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
	color: #1a1a1a;
	cursor: pointer;
	line-height: 1.2;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pmg-lab__size.is-selected {
	border-color: #1a1a1a;
	box-shadow: 0 0 0 1px #1a1a1a inset;
}

.pmg-lab__size-name {
	font-size: 14px;
	font-weight: 700;
}

.pmg-lab__size-cm {
	font-size: 12px;
	color: #64748b;
}

.pmg-lab__notice {
	margin-top: 12px;
	color: #b91c1c;
	font-size: 14px;
}
