/**
 * Full-screen import progress overlay for starter-site imports.
 *
 * Matches the Buildler admin console: dark canvas, sharp type, restrained motion.
 */

.buildler-import-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background:
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201, 162, 39, 0.12), transparent 55%),
		radial-gradient(ellipse 50% 40% at 80% 100%, rgba(45, 90, 80, 0.18), transparent 50%),
		#0e0d0b;
	color: #f4f1ea;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.buildler-import-overlay.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.buildler-import-overlay__glow {
	position: absolute;
	width: min(520px, 70vw);
	height: min(520px, 70vw);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(201, 162, 39, 0.16), transparent 68%);
	filter: blur(8px);
	animation: buildler-import-pulse 3.6s ease-in-out infinite;
	pointer-events: none;
}

.buildler-import-overlay__card {
	position: relative;
	width: min(420px, 100%);
	padding: 40px 36px 32px;
	border: 1px solid rgba(244, 241, 234, 0.1);
	border-radius: 20px;
	background: rgba(22, 21, 18, 0.88);
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(16px);
	text-align: center;
}

.buildler-import-overlay__orbits {
	position: relative;
	width: 88px;
	height: 88px;
	margin: 0 auto 28px;
}

.buildler-import-overlay__ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1.5px solid rgba(244, 241, 234, 0.12);
}

.buildler-import-overlay__ring::before {
	content: "";
	position: absolute;
	top: -3px;
	left: 50%;
	width: 8px;
	height: 8px;
	margin-left: -4px;
	border-radius: 50%;
	background: #c9a227;
	box-shadow: 0 0 12px rgba(201, 162, 39, 0.8);
}

.buildler-import-overlay__ring--a {
	animation: buildler-import-spin 2.4s linear infinite;
}

.buildler-import-overlay__ring--b {
	inset: 12px;
	border-color: rgba(201, 162, 39, 0.25);
	animation: buildler-import-spin 3.6s linear infinite reverse;
}

.buildler-import-overlay__ring--b::before {
	background: #f4f1ea;
	box-shadow: 0 0 10px rgba(244, 241, 234, 0.55);
	width: 6px;
	height: 6px;
	margin-left: -3px;
}

.buildler-import-overlay__core {
	position: absolute;
	inset: 28px;
	border-radius: 50%;
	background: linear-gradient(145deg, rgba(201, 162, 39, 0.35), rgba(201, 162, 39, 0.05));
	animation: buildler-import-breathe 2.2s ease-in-out infinite;
}

.buildler-import-overlay__kicker {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(201, 162, 39, 0.95);
}

.buildler-import-overlay__title {
	margin: 0 0 6px;
	font-family: "Bricolage Grotesque", "DM Sans", Georgia, serif;
	font-size: clamp(1.45rem, 2.4vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: #f4f1ea;
}

.buildler-import-overlay__site {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.45;
	color: rgba(244, 241, 234, 0.62);
}

.buildler-import-overlay__site strong {
	color: #f4f1ea;
	font-weight: 600;
}

.buildler-import-overlay__percent-wrap {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	margin-bottom: 14px;
}

.buildler-import-overlay__percent {
	font-family: "Bricolage Grotesque", "DM Sans", Georgia, serif;
	font-size: clamp(3rem, 8vw, 3.75rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	background: linear-gradient(180deg, #fff8e7 0%, #c9a227 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.buildler-import-overlay__percent-sign {
	font-size: 1.25rem;
	font-weight: 700;
	color: rgba(201, 162, 39, 0.85);
}

.buildler-import-overlay__bar {
	position: relative;
	height: 6px;
	margin: 0 0 18px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(244, 241, 234, 0.08);
}

.buildler-import-overlay__bar-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0%;
	border-radius: inherit;
	background: linear-gradient(90deg, #8a7020, #c9a227, #f0d78c);
	box-shadow: 0 0 16px rgba(201, 162, 39, 0.45);
	transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.buildler-import-overlay__bar-fill::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 30%,
		rgba(255, 255, 255, 0.35) 48%,
		transparent 66%
	);
	background-size: 200% 100%;
	animation: buildler-import-shimmer 1.8s linear infinite;
}

.buildler-import-overlay__status {
	margin: 0;
	min-height: 1.4em;
	font-size: 13px;
	color: rgba(244, 241, 234, 0.55);
	opacity: 1;
	transition: opacity 0.25s ease;
}

.buildler-import-overlay__hint {
	margin: 18px 0 0;
	font-size: 12px;
	color: rgba(244, 241, 234, 0.38);
}

html.buildler-import-busy,
html.buildler-import-busy body {
	overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
	.buildler-import-overlay__glow,
	.buildler-import-overlay__ring--a,
	.buildler-import-overlay__ring--b,
	.buildler-import-overlay__core,
	.buildler-import-overlay__bar-fill::after {
		animation: none;
	}

	.buildler-import-overlay__bar-fill {
		transition: none;
	}
}

@keyframes buildler-import-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes buildler-import-pulse {
	0%,
	100% {
		opacity: 0.55;
		transform: scale(0.92);
	}
	50% {
		opacity: 1;
		transform: scale(1.05);
	}
}

@keyframes buildler-import-breathe {
	0%,
	100% {
		transform: scale(0.92);
		opacity: 0.7;
	}
	50% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes buildler-import-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}
