.lym-lead-forms-runtime,
.lym-lead-forms-runtime * {
	box-sizing: border-box;
}

body.lym-lead-modal-open {
	overflow: hidden;
}

.lym-lead-modal[hidden],
.lym-service-select__panel[hidden],
.lym-lead-field__other[hidden],
.lym-lead-form__main[hidden],
.lym-lead-form__success[hidden] {
	display: none !important;
}

.lym-lead-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 20px;
	isolation: isolate;
}

.lym-lead-modal__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--lym-lead-overlay-background, rgba(5, 20, 31, 0.72));
	opacity: 0;
	transition: opacity var(--lym-lead-transition-duration, 320ms) ease;
	backdrop-filter: blur(4px);
}

.lym-lead-modal__dialog {
	position: relative;
	width: min(calc(100vw - 32px), var(--lym-lead-popup-width, 720px));
	max-height: min(90vh, 920px);
	overflow: auto;
	outline: none;
	opacity: 0;
	transform: translateY(24px) scale(0.985);
	transition:
		opacity var(--lym-lead-transition-duration, 320ms) ease,
		transform var(--lym-lead-transition-duration, 320ms) cubic-bezier(.2,.8,.2,1);
}

.lym-lead-modal.is-open .lym-lead-modal__backdrop,
.lym-lead-modal.is-closing .lym-lead-modal__backdrop {
	opacity: 1;
}

.lym-lead-modal.is-open .lym-lead-modal__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.lym-lead-modal.is-closing .lym-lead-modal__backdrop,
.lym-lead-modal.is-closing .lym-lead-modal__dialog {
	opacity: 0;
}

.lym-lead-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	display: grid;
	place-items: center;
	width: var(--lym-lead-close-size, 42px);
	height: var(--lym-lead-close-size, 42px);
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--lym-lead-close-bg, #eef2f4);
	color: var(--lym-lead-close-color, #0a3042);
	cursor: pointer;
	transition: transform 180ms ease, opacity 180ms ease;
}

.lym-lead-modal__close:hover,
.lym-lead-modal__close:focus-visible {
	transform: rotate(4deg) scale(1.06);
}

.lym-lead-modal__close:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--lym-lead-input-focus, #4a56cd) 35%, transparent);
	outline-offset: 3px;
}

.lym-lead-modal__close svg {
	width: 20px;
	height: 20px;
}

.lym-lead-form-shell {
	width: 100%;
	padding: var(--lym-lead-popup-padding, 32px);
	border: 1px solid var(--lym-lead-border-color, rgba(10, 48, 66, 0.12));
	border-radius: var(--lym-lead-popup-radius, 22px);
	background: var(--lym-lead-popup-background, #ffffff);
	box-shadow: var(--lym-lead-shadow, 0 28px 80px rgba(5, 20, 31, 0.28));
	color: var(--lym-lead-text-color, #46545c);
	font: inherit;
}

.lym-lead-form__header {
	padding-right: 42px;
	margin-bottom: 24px;
}

.lym-lead-form__title,
.lym-lead-form__success-title {
	margin: 0;
	color: var(--lym-lead-title-color, #0a3042);
	font: inherit;
	font-size: var(--lym-lead-title-size, 36px);
	font-weight: 700;
	line-height: 1.12;
}

.lym-lead-form__description {
	margin-top: 12px;
	color: var(--lym-lead-text-color, #46545c);
	font-size: var(--lym-lead-text-size, 16px);
	line-height: 1.65;
}

.lym-lead-form__description > :first-child,
.lym-lead-form__success-message > :first-child {
	margin-top: 0;
}

.lym-lead-form__description > :last-child,
.lym-lead-form__success-message > :last-child {
	margin-bottom: 0;
}

.lym-lead-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--lym-lead-field-gap, 18px);
}

.lym-lead-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.lym-lead-field--half {
	grid-column: span 1;
}

.lym-lead-field--full,
.lym-lead-field--services {
	grid-column: 1 / -1;
}

.lym-lead-field__label {
	color: var(--lym-lead-label-color, #183c4c);
	font-size: var(--lym-lead-label-size, 15px);
	font-weight: 650;
	line-height: 1.35;
}

.lym-lead-field__required {
	margin-left: 3px;
	color: #b42318;
}

.lym-lead-field input,
.lym-lead-field textarea,
.lym-service-select__toggle {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--lym-lead-input-border, #cbd5da);
	border-radius: var(--lym-lead-input-radius, 11px);
	background: var(--lym-lead-input-bg, #ffffff);
	color: var(--lym-lead-input-color, #0a3042);
	font: inherit;
	font-size: 0.98rem;
	line-height: 1.4;
	transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.lym-lead-field textarea {
	min-height: 120px;
	resize: vertical;
}

.lym-lead-field input::placeholder,
.lym-lead-field textarea::placeholder {
	color: color-mix(in srgb, var(--lym-lead-input-color, #0a3042) 48%, transparent);
}

.lym-lead-field input:focus,
.lym-lead-field textarea:focus,
.lym-service-select__toggle:focus-visible {
	border-color: var(--lym-lead-input-focus, #4a56cd);
	outline: 0;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--lym-lead-input-focus, #4a56cd) 18%, transparent);
}

.lym-service-select {
	position: relative;
}

.lym-service-select__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	text-align: left;
	cursor: pointer;
}

.lym-service-select__toggle span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lym-service-select__toggle svg {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	transition: transform 180ms ease;
}

.lym-service-select.is-open .lym-service-select__toggle svg {
	transform: rotate(180deg);
}

.lym-service-select__toggle.has-selection {
	font-weight: 600;
}

.lym-service-select__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: 260px;
	overflow: auto;
	padding: 8px;
	border: 1px solid var(--lym-lead-input-border, #cbd5da);
	border-radius: 12px;
	background: var(--lym-lead-input-bg, #ffffff);
	box-shadow: 0 18px 38px rgba(5, 20, 31, 0.16);
}

.lym-service-select__option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 11px;
	border-radius: 9px;
	color: var(--lym-lead-input-color, #0a3042);
	cursor: pointer;
	transition: background-color 160ms ease;
}

.lym-service-select__option:hover,
.lym-service-select__option:focus-within {
	background: color-mix(in srgb, var(--lym-lead-input-focus, #4a56cd) 9%, transparent);
}

.lym-service-select__option input {
	width: 18px;
	height: 18px;
	min-height: 0;
	margin: 1px 0 0;
	accent-color: var(--lym-lead-input-focus, #4a56cd);
}

.lym-lead-field__other {
	margin-top: 12px;
}

.lym-lead-form__privacy {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 18px;
	color: var(--lym-lead-text-color, #46545c);
	font-size: 0.88rem;
	line-height: 1.5;
}

.lym-lead-form__privacy input {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin-top: 2px;
	accent-color: var(--lym-lead-input-focus, #4a56cd);
}

.lym-lead-form__status {
	min-height: 22px;
	margin-top: 14px;
	font-size: 0.9rem;
	line-height: 1.45;
}

.lym-lead-form__status.is-error {
	color: #b42318;
}

.lym-lead-form__submit,
.lym-lead-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	margin-top: 8px;
	padding: 13px 24px;
	border: 0;
	width: var(--lym-lead-button-width, auto);
	border-radius: var(--lym-lead-button-radius, 999px);
	background: var(--lym-lead-button-bg, #4a56cd);
	color: var(--lym-lead-button-color, #ffffff);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.lym-lead-form__submit:hover,
.lym-lead-form__submit:focus-visible,
.lym-lead-trigger:hover,
.lym-lead-trigger:focus-visible {
	background: var(--lym-lead-button-hover-bg, #3541b8);
	color: var(--lym-lead-button-hover-color, #ffffff);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px color-mix(in srgb, var(--lym-lead-button-bg, #4a56cd) 26%, transparent);
}

.lym-lead-form__submit:focus-visible,
.lym-lead-trigger:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--lym-lead-input-focus, #4a56cd) 35%, transparent);
	outline-offset: 3px;
}

.lym-lead-form__submit:disabled {
	cursor: wait;
	opacity: 0.72;
	transform: none;
}

.lym-lead-form__spinner {
	display: none;
	width: 17px;
	height: 17px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: lym-lead-spin 700ms linear infinite;
}

.lym-lead-form.is-submitting .lym-lead-form__spinner {
	display: inline-block;
}

.lym-lead-form__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.lym-lead-form__success {
	padding: clamp(24px, 7vw, 64px) 12px;
	border-radius: calc(var(--lym-lead-popup-radius, 22px) * .7);
	background: var(--lym-lead-success-bg, #f0f8f4);
	color: var(--lym-lead-success-color, #17603a);
	text-align: center;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 240ms ease, transform 240ms ease;
	outline: none;
}

.lym-lead-form__success.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.lym-lead-form__success-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--lym-lead-success-color, #17603a) 14%, transparent);
	font-size: 2rem;
	font-weight: 800;
}

.lym-lead-form__success-title {
	color: inherit;
}

.lym-lead-form__success-message {
	max-width: 560px;
	margin: 12px auto 0;
	line-height: 1.65;
}

@keyframes lym-lead-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.lym-lead-modal {
		padding: 10px;
		align-items: end;
	}

	.lym-lead-modal__dialog {
		width: 100%;
		max-height: 94dvh;
	}

	.lym-lead-form-shell {
		padding: min(var(--lym-lead-popup-padding, 24px), 24px);
		border-radius: min(var(--lym-lead-popup-radius, 22px), 22px) min(var(--lym-lead-popup-radius, 22px), 22px) 8px 8px;
	}

	.lym-lead-form__grid {
		grid-template-columns: 1fr;
	}

	.lym-lead-field--half,
	.lym-lead-field--full,
	.lym-lead-field--services {
		grid-column: 1;
	}

	.lym-service-select__panel {
		position: static;
		margin-top: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lym-lead-modal__backdrop,
	.lym-lead-modal__dialog,
	.lym-lead-modal__close,
	.lym-lead-form__submit,
	.lym-lead-trigger,
	.lym-lead-form__success,
	.lym-service-select__toggle svg {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
	}
}
