/**
 * Mockup HP untuk pratinjau undangan (form + halaman demo).
 *
 * Layar selalu 390x844 CSS px — ukuran HP yang paling umum dipakai tamu —
 * lalu seluruh perangkat diskalakan lewat --sn-phone-scale (diisi JS sesuai
 * ruang yang tersedia). Tema WDP punya layout desktop sendiri; dengan layar
 * dikunci selebar HP, yang terlihat selalu layout HP yang diterima tamu.
 */
.sn-phone-wrap {
	--sn-phone-scale: 1;
	position: relative;
	width: calc(418px * var(--sn-phone-scale));
	height: calc(872px * var(--sn-phone-scale));
	flex: none;
	margin: 0 auto;
}

.sn-phone {
	position: absolute;
	top: 0;
	left: 0;
	width: 418px;
	height: 872px;
	padding: 14px;
	box-sizing: border-box;
	border-radius: 62px;
	background: linear-gradient(145deg, #2b2320 0%, #120e0c 55%, #2b2320 100%);
	box-shadow:
		0 0 0 2px #3d3330,
		0 40px 80px -30px rgba(35, 26, 17, .55),
		0 18px 36px -18px rgba(35, 26, 17, .35),
		inset 0 0 0 1px rgba(255, 255, 255, .08);
	transform: scale(var(--sn-phone-scale));
	transform-origin: top left;
}

/* Tombol samping — detail kecil yang membuat bentuknya terbaca sebagai HP. */
.sn-phone::before,
.sn-phone::after {
	content: "";
	position: absolute;
	width: 4px;
	border-radius: 2px;
	background: #3d3330;
}
.sn-phone::before { left: -4px; top: 170px; height: 64px; box-shadow: 0 86px 0 #3d3330; }
.sn-phone::after { right: -4px; top: 220px; height: 96px; }

.sn-phone__screen {
	position: relative;
	width: 390px;
	height: 844px;
	overflow: hidden;
	border-radius: 48px;
	background: #fff;
	isolation: isolate;
}

.sn-phone__island {
	position: absolute;
	top: 11px;
	left: 50%;
	z-index: 3;
	width: 118px;
	height: 34px;
	margin-left: -59px;
	border-radius: 20px;
	background: #0b0908;
	pointer-events: none;
}

.sn-phone__frame {
	display: block;
	width: 390px;
	height: 844px;
	border: 0;
	background: #fff;
}

/* Skeleton selama undangan dimuat. */
.sn-phone__loading {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: grid;
	place-content: center;
	gap: 14px;
	justify-items: center;
	background: linear-gradient(180deg, #FFF6EF, #F4E4D8);
	color: #8D4B4C;
	font: 600 14px/1.4 "Plus Jakarta Sans", Arial, sans-serif;
	transition: opacity .3s ease;
}
.sn-phone__loading.is-done { opacity: 0; pointer-events: none; }
.sn-phone__spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid rgba(141, 75, 76, .2);
	border-top-color: #8D4B4C;
	animation: sn-phone-spin .8s linear infinite;
}
@keyframes sn-phone-spin { to { transform: rotate(360deg); } }

/* Garis progres tipis saat pratinjau langsung memuat ulang. */
.sn-phone__bar {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 4;
	height: 3px;
	overflow: hidden;
	opacity: 0;
	transition: opacity .2s;
	pointer-events: none;
}
.sn-phone__bar.is-on { opacity: 1; }
.sn-phone__bar span { display: block; width: 40%; height: 100%; background: #8D4B4C; animation: sn-phone-load 1s ease-in-out infinite; }
@keyframes sn-phone-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (prefers-reduced-motion: reduce) {
	.sn-phone__spinner, .sn-phone__bar span { animation-duration: 2.4s; }
}
