/* Host Cloud Leads — modal UI (scoped, theme-safe) */

body.hcl-open {
	overflow: hidden;
}

.hcl-modal[hidden] {
	display: none !important;
}

.hcl-modal {
	--hcl-navy: #0c1f40;
	--hcl-navy-mid: #1d3664;
	--hcl-blue: #3b82f6;
	--hcl-cyan: #6ec1e4;
	--hcl-text: #0f172a;
	--hcl-muted: #64748b;
	--hcl-border: rgba(15, 23, 42, 0.1);
	--hcl-radius: 22px;
	--hcl-font: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--hcl-font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	font-family: var(--hcl-font-body);
	-webkit-font-smoothing: antialiased;
}

.hcl-modal *,
.hcl-modal *::before,
.hcl-modal *::after {
	box-sizing: border-box;
}

.hcl-backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
		rgba(8, 15, 30, 0.78);
	backdrop-filter: blur(12px) saturate(120%);
	-webkit-backdrop-filter: blur(12px) saturate(120%);
	opacity: 0;
	transition: opacity 0.32s ease;
}

.hcl-modal.hcl-visible .hcl-backdrop {
	opacity: 1;
}

.hcl-card {
	position: relative;
	width: min(100%, 440px);
	max-height: calc(100vh - 2.5rem);
	overflow: hidden auto;
	background: #fff;
	border-radius: var(--hcl-radius);
	border: 1px solid rgba(255, 255, 255, 0.65);
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.04),
		0 32px 64px -12px rgba(12, 31, 64, 0.35),
		0 12px 24px -8px rgba(12, 31, 64, 0.18);
	opacity: 0;
	transform: translateY(18px) scale(0.97);
	transition:
		opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.hcl-modal.hcl-visible .hcl-card {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.hcl-close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, 0.14) !important;
	color: rgba(255, 255, 255, 0.92) !important;
	font-size: 1.35rem !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	box-shadow: none !important;
}

.hcl-close:hover {
	background: rgba(255, 255, 255, 0.24) !important;
	transform: scale(1.05);
}

.hcl-head {
	position: relative;
	padding: 1.75rem 1.75rem 1.35rem;
	background:
		linear-gradient(145deg, var(--hcl-navy) 0%, var(--hcl-navy-mid) 55%, #254a8a 100%);
	color: #fff;
	overflow: hidden;
}

.hcl-head::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 85% 15%, rgba(110, 193, 228, 0.35), transparent 42%),
		radial-gradient(circle at 10% 90%, rgba(59, 130, 246, 0.22), transparent 38%);
	pointer-events: none;
}

.hcl-head::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 1.25rem;
	background: #fff;
	border-radius: 1.25rem 1.25rem 0 0;
}

.hcl-head-inner {
	position: relative;
	z-index: 1;
	padding-right: 2rem;
}

.hcl-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.85rem;
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	font-family: var(--hcl-font);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.92);
}

.hcl-badge-dot {
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 999px;
	background: var(--hcl-cyan);
	box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.25);
}

.hcl-title {
	margin: 0 0 0.45rem;
	font-family: var(--hcl-font);
	font-size: clamp(1.35rem, 4vw, 1.65rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #fff !important;
}

.hcl-domain-chip {
	display: inline-block;
	margin: 0 0 0.55rem;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
	word-break: break-all;
}

.hcl-domain-chip[hidden] {
	display: none !important;
}

.hcl-sub {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.78) !important;
}

.hcl-body {
	padding: 0.35rem 1.75rem 1.65rem;
}

.hcl-form {
	display: grid;
	gap: 0.85rem;
}

.hcl-field {
	display: block;
	margin: 0;
}

.hcl-field span {
	display: block;
	margin-bottom: 0.38rem;
	font-family: var(--hcl-font);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hcl-text);
}

.hcl-field em {
	font-style: normal;
	font-weight: 500;
	color: var(--hcl-blue);
}

.hcl-field input,
.hcl-field select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.78rem 0.95rem !important;
	border: 1px solid var(--hcl-border) !important;
	border-radius: 12px !important;
	background: #f8fafc !important;
	color: var(--hcl-text) !important;
	font-family: var(--hcl-font-body) !important;
	font-size: 1rem !important;
	line-height: 1.4 !important;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.hcl-field select {
	padding-right: 2.4rem !important;
	background-image:
		linear-gradient(45deg, transparent 50%, #64748b 50%),
		linear-gradient(135deg, #64748b 50%, transparent 50%) !important;
	background-position:
		calc(100% - 18px) calc(50% - 3px),
		calc(100% - 12px) calc(50% - 3px) !important;
	background-size: 6px 6px, 6px 6px !important;
	background-repeat: no-repeat !important;
	cursor: pointer;
}

.hcl-field input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.hcl-field input:hover,
.hcl-field select:hover {
	border-color: rgba(59, 130, 246, 0.28) !important;
	background-color: #fff !important;
}

.hcl-field input:focus,
.hcl-field select:focus {
	outline: none !important;
	border-color: var(--hcl-blue) !important;
	background-color: #fff !important;
	box-shadow:
		0 0 0 4px rgba(59, 130, 246, 0.14),
		inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.hcl-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin: 0.35rem 0 0;
	padding: 0.88rem 1.15rem !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: linear-gradient(135deg, var(--hcl-blue) 0%, #2563eb 48%, var(--hcl-navy-mid) 100%) !important;
	color: #fff !important;
	font-family: var(--hcl-font) !important;
	font-size: 0.98rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow:
		0 10px 24px -8px rgba(37, 99, 235, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		filter 0.18s ease;
	text-decoration: none !important;
	text-transform: none !important;
}

.hcl-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow:
		0 14px 28px -8px rgba(37, 99, 235, 0.62),
		inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.hcl-submit:active:not(:disabled) {
	transform: translateY(0);
}

.hcl-submit:disabled {
	opacity: 0.72;
	cursor: wait;
}

.hcl-submit-icon {
	display: inline-flex;
	font-size: 1.05rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.hcl-submit:hover:not(:disabled) .hcl-submit-icon {
	transform: translateX(3px);
}

.hcl-foot {
	margin: 0.85rem 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	text-align: center;
	color: var(--hcl-muted);
}

.hcl-msg {
	margin: 0;
	padding: 0.72rem 0.85rem;
	border-radius: 10px;
	font-size: 0.88rem;
	line-height: 1.45;
}

.hcl-msg-ok {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.hcl-msg-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.hcl-plan {
	display: none;
}

@media (max-width: 480px) {
	.hcl-modal {
		padding: 0.75rem;
		align-items: flex-end;
	}

	.hcl-card {
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		max-height: calc(100vh - 0.75rem);
	}

	.hcl-head {
		padding: 1.35rem 1.25rem 1.1rem;
	}

	.hcl-body {
		padding: 0.25rem 1.25rem 1.35rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hcl-backdrop,
	.hcl-card,
	.hcl-close,
	.hcl-submit,
	.hcl-submit-icon,
	.hcl-field input,
	.hcl-field select {
		transition: none !important;
	}

	.hcl-modal.hcl-visible .hcl-card {
		transform: none;
	}
}
