/* ============================================================
   Contact form – submit animation + meteor sweep + success state
   ============================================================ */

/* ----------------------------------------------------------
   Hide Kadence's default success message and loading spinner.
   .lg-cf-submitting is added on submit-start.
   .lg-cf-handled   is added on success.
   ---------------------------------------------------------- */
.lg-cf-submitting .kb-adv-form-loading,
.lg-cf-handled .kb-adv-form-loading,
.lg-cf-handled ~ .kb-adv-form-success {
	display: none !important;
}

/* ----------------------------------------------------------
   Loading overlay (shown during submission)
   ---------------------------------------------------------- */
.lg-cf-loading-overlay {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.96);
	border-radius: inherit;
	animation: lg-cf-fade-in 0.2s ease forwards;
}

/* Three-dot pulse */
.lg-cf-loading-dots {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.lg-cf-loading-dots span {
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #7c3aed;
	animation: lg-cf-dot-bounce 1.1s ease-in-out infinite;
}

.lg-cf-loading-dots span:nth-child(1) { animation-delay: 0s; }
.lg-cf-loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.lg-cf-loading-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes lg-cf-dot-bounce {
	0%, 80%, 100% { transform: translateY(0);    opacity: 0.35; }
	40%            { transform: translateY(-8px); opacity: 1; }
}

@keyframes lg-cf-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ----------------------------------------------------------
   Meteor sweep overlay
   Injected as a sibling over the target block container.
   ---------------------------------------------------------- */
.lg-cf-meteor-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 10;
	border-radius: inherit;
}

/* The streak */
.lg-cf-meteor-wrap::before {
	content: '';
	position: absolute;
	/* Size: tall enough to cross the whole block diagonally */
	width: 60%;
	height: 250%;
	/* Start off the top-left */
	top: -150%;
	left: -60%;
	/* Diagonal gradient: faint → bright white → faint */
	background: linear-gradient(
		to bottom,
		transparent 0%,
		rgba(255, 255, 255, 0.0) 30%,
		rgba(255, 255, 255, 0.55) 48%,
		rgba(255, 255, 255, 0.9) 50%,
		rgba(255, 255, 255, 0.55) 52%,
		rgba(255, 255, 255, 0.0) 70%,
		transparent 100%
	);
	transform: rotate(30deg);
	animation: lg-meteor-sweep 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes lg-meteor-sweep {
	0%   { transform: rotate(30deg) translateY(0); }
	100% { transform: rotate(30deg) translateY(220%); }
}

/* ----------------------------------------------------------
   Success state panel
   Replaces the block content after the sweep.
   ---------------------------------------------------------- */
.lg-cf-success-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 3rem 2rem;
	gap: 1.25rem;
	opacity: 0;
	transform: translateY(12px);
	animation: lg-cf-success-in 0.4s 0s ease forwards;
}

@keyframes lg-cf-success-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Icon circle */
.lg-cf-success-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #ede9fe;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.lg-cf-success-icon svg {
	display: block !important;
	width: 36px !important;
	height: 36px !important;
	color: #7c3aed;
}

/* Text */
.lg-cf-success-title {
	font-size: 1.625rem;
	font-weight: 700;
	color: #111827;
	margin: 0;
	line-height: 1.25;
}

.lg-cf-success-sub {
	font-size: 1rem;
	color: #6b7280;
	margin: 0;
	line-height: 1.6;
}
