/*
 * "Get pricing" popup on the pricing page (modules/partials/pricing-form-modal.php).
 * The form card section below is copied from css/hx-components.css, re-scoped from
 * .hx to #get-pricing; keep the two in step. The id is needed: this form carries
 * HubSpot "custom style" rules (.hs-custom-style ... with long :not() chains) that
 * outrank class selectors.
 */

.allego-form-modal {
	--hx-ink: #0b1633;
	--hx-teal: #28ccc1;
	--hx-teal-deep: #0e9a91;
	--hx-red: #b50525;
	--hx-red-hover: #d40a2f;
	--hx-slate-500: #64748b;
	--hx-body-light: #3a445c;
	--hx-muted-light: #5a647c;
	--hx-font: "Founders Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	width: min(560px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: transparent;
	overflow-y: auto;
	overscroll-behavior: contain;
	font-family: var(--hx-font);
	box-sizing: border-box;
}

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

.allego-form-modal::backdrop {
	background: rgba(0, 8, 35, 0.75);
}

.allego-form-modal[open] {
	animation: allego-form-modal-in 0.2s ease-out;
}

@keyframes allego-form-modal-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

html:has(.allego-form-modal[open]) {
	overflow: hidden;
}

.allego-form-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(11, 22, 51, 0.07);
	color: var(--hx-ink);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.allego-form-modal__close:hover {
	background: rgba(11, 22, 51, 0.14);
}

.allego-form-modal__close:focus-visible {
	outline: 2px solid var(--hx-teal-deep);
	outline-offset: 2px;
}

.allego-form-modal__close svg {
	width: 18px;
	height: 18px;
}

/* The close button sits in the card's top corner, so the title keeps clear of it. */
.allego-form-modal .hx-form-card__title {
	margin: 0;
	padding-right: 40px;
}

.allego-form-modal .hx-form-card__text {
	margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
	.allego-form-modal[open] {
		animation: none;
	}
}

/* ------------------------------------------------------------------------ */
/* Form card (partials/hx-form.php): a HubSpot form in the Heismic card     */
/* ------------------------------------------------------------------------ */

#get-pricing .hx-form-card {
	position: relative;
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 24px;
	background: linear-gradient(165deg, #f7f9fc, #e9edf4 48%, #d9dfec);
	box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(11, 22, 51, 0.1);
	color: var(--hx-ink);
	font-weight: 400;
	text-align: left;
	container-type: inline-size;
	scroll-margin-top: 120px;
}

#get-pricing .hx-form-card__title {
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--hx-ink);
}

#get-pricing .hx-form-card__text {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--hx-body-light);
}

#get-pricing .hx-form-card.is-submitted .hx-form-card__text {
	display: none;
}

#get-pricing .hx-form-card__status:empty {
	display: none;
}

#get-pricing .hx-form-card__status,
#get-pricing .hx-form-card__noscript {
	margin-top: 22px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--hx-body-light);
}

#get-pricing .hx-form-card__status[role="alert"] {
	color: var(--hx-red);
}

#get-pricing .hx-form-card__fallback {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: 10px;
}

#get-pricing .hx-form-card__fallback button,
#get-pricing .hx-form-card__fallback a,
#get-pricing .hx-form-card__noscript a {
	padding: 0;
	border: 0;
	background: none;
	font-weight: 600;
	color: var(--hx-teal-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Room for the fields while HubSpot loads, so the hero does not jump as far. */
#get-pricing .hx-form-card.is-loading .hx-form-card__target {
	min-height: 340px;
}

#get-pricing .hx-form-card .hs-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 24px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--hx-ink);
}

#get-pricing .hx-form-card .hs-form > * {
	grid-column: 1 / -1;
	min-width: 0;
}

#get-pricing .hx-form-card .hs-form fieldset {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	width: 100%;
	min-width: 0;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
}

#get-pricing .hx-form-card .hs-form fieldset:has(input[type="hidden"]):not(:has(input:not([type="hidden"]), select, textarea, .hs-richtext)) {
	display: none;
}

#get-pricing .hx-form-card .hs-form fieldset > .hs-form-field {
	flex: 1 1 0%;
	float: none;
	width: auto;
	min-width: 0;
}

#get-pricing .hx-form-card .hs-form > fieldset:has(> :is(.hs_jobtitle, .hs_company):only-child) {
	grid-column: auto;
}

#get-pricing .hx-form-card .hs-form .hs-form-field,
#get-pricing .hx-form-card .hs-form .input {
	min-width: 0;
	margin: 0;
}

/* Placeholders stand in for the labels of typed fields; choice and file fields keep theirs. */
#get-pricing .hx-form-card .hs-form .hs-form-field:not(.hs-fieldtype-booleancheckbox):not(.hs-fieldtype-checkbox):not(.hs-fieldtype-radio):not(.hs-fieldtype-file) > label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

#get-pricing .hx-form-card .hs-form .hs-form-field > label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--hx-muted-light);
}

#get-pricing .hx-form-card .hs-form .hs-input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
	display: block;
	width: 100% !important;
	min-width: 0;
	max-width: 100%;
	min-height: 48px;
	height: auto;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid rgba(11, 22, 51, 0.15);
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	font: 400 14px/1.5 var(--hx-font);
	color: var(--hx-ink);
	transition: border-color 150ms ease;
}

#get-pricing .hx-form-card .hs-form textarea.hs-input {
	min-height: 110px;
	resize: vertical;
}

#get-pricing .hx-form-card .hs-form select.hs-input {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 40px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%230b1633' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
}

#get-pricing .hx-form-card .hs-form .hs-input::placeholder {
	color: var(--hx-slate-500);
	opacity: 1;
}

#get-pricing .hx-form-card .hs-form .hs-input:focus {
	border-color: var(--hx-teal);
	outline: 2px solid rgba(40, 204, 193, 0.35);
	outline-offset: 2px;
}

#get-pricing .hx-form-card .hs-form .hs-input:is(.error, .invalid):not(:focus) {
	border-color: #e3a5b0;
}

/* Keep browser autofill on the same white surface as the other fields. */
#get-pricing .hx-form-card .hs-form .hs-input:is(:autofill, :-webkit-autofill) {
	box-shadow: 0 0 0 1000px #fff inset;
	-webkit-text-fill-color: var(--hx-ink);
	caret-color: var(--hx-ink);
}

#get-pricing .hx-form-card .hs-form input[type="checkbox"],
#get-pricing .hx-form-card .hs-form input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 2px 8px 0 0;
	accent-color: var(--hx-teal-deep);
}

#get-pricing .hx-form-card .hs-form .inputs-list label {
	font-size: 14px;
	color: var(--hx-body-light);
}

#get-pricing .hx-form-card .hs-form .hs-error-msgs {
	margin-top: 6px;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--hx-red);
}

#get-pricing .hx-form-card .hs-form .hs-error-msgs label {
	display: block;
	margin: 0;
	font: inherit;
	color: inherit;
}

#get-pricing .hx-form-card .hs-form .hs-richtext,
#get-pricing .hx-form-card .hs-form .hs-richtext p,
#get-pricing .hx-form-card .hs-form .legal-consent-container p {
	font-size: 12px;
	line-height: 1.55;
	color: var(--hx-muted-light);
}

#get-pricing .hx-form-card .hs-form .hs-richtext a,
#get-pricing .hx-form-card .hs-form .legal-consent-container a {
	color: var(--hx-teal-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}

#get-pricing .hx-form-card .hs-form .hs_submit {
	margin-top: 4px;
	padding-top: 20px;
	border-top: 1px solid rgba(11, 22, 51, 0.1);
}

#get-pricing .hx-form-card .hs-form .hs-button {
	display: block;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 16px 24px;
	border: 0;
	border-radius: 40px 0 40px 40px;
	background: var(--hx-red);
	box-shadow: 0 10px 30px -10px rgba(181, 5, 37, 0.6);
	font: 700 15px/1.3 var(--hx-font);
	color: #fff;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	transition: background-color 150ms ease;
}

#get-pricing .hx-form-card .hs-form .hs-button:hover {
	background: var(--hx-red-hover);
}

#get-pricing .hx-form-card .hs-form .hs-button:focus-visible {
	outline: 2px solid var(--hx-teal-deep);
	outline-offset: 4px;
}

#get-pricing .hx-form-card .hs-form .hs-button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

#get-pricing .hx-form-card .submitted-message {
	margin-top: 20px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--hx-ink);
	outline: none;
}

#get-pricing .hx-form-card .submitted-message::before {
	content: "";
	display: block;
	width: 52px;
	height: 52px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: rgba(40, 204, 193, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e9a91' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 24px 24px;
}

/* HubSpot's thank-you copy carries inline Georgia and 20px styles from its editor. */
#get-pricing .hx-form-card .submitted-message :is(p, span, em, strong) {
	font-family: inherit !important;
	font-size: inherit !important;
}

#get-pricing .hx-form-card .submitted-message p + p {
	margin-top: 12px;
}

#get-pricing .hx-form-card .submitted-message a {
	color: var(--hx-teal-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@container (max-width: 279px) {
	#get-pricing .hx-form-card .hs-form > fieldset:has(> :is(.hs_jobtitle, .hs_company):only-child) {
		grid-column: 1 / -1;
	}

	#get-pricing .hx-form-card .hs-form fieldset > .hs-form-field {
		flex-basis: 100%;
	}
}

@media (min-width: 640px) {
	#get-pricing .hx-form-card {
		padding: 36px;
	}
}

@media (max-width: 767px) {
	/* 16px keeps iOS from zooming into a field on focus. */
	#get-pricing .hx-form-card .hs-form .hs-input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
		font-size: 16px;
	}
}

/* Phones: a tighter card, so the whole form fits on screen under the headline. */
@media (max-width: 639px) {
	#get-pricing .hx-form-card {
		padding: 18px 16px;
		border-radius: 20px;
	}

	#get-pricing .hx-form-card__title {
		font-size: 21px;
	}

	#get-pricing .hx-form-card__text {
		margin-top: 4px;
		font-size: 14px;
		line-height: 1.45;
	}

	#get-pricing .hx-form-card.is-loading .hx-form-card__target {
		min-height: 280px;
	}

	#get-pricing .hx-form-card .hs-form {
		gap: 10px;
		margin-top: 14px;
	}

	#get-pricing .hx-form-card .hs-form fieldset {
		gap: 10px;
	}

	/* 44px is the smallest comfortable tap target. */
	#get-pricing .hx-form-card .hs-form .hs-input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
		min-height: 44px;
		padding: 9px 12px;
		border-radius: 10px;
	}

	#get-pricing .hx-form-card .hs-form .hs-richtext,
	#get-pricing .hx-form-card .hs-form .hs-richtext p,
	#get-pricing .hx-form-card .hs-form .legal-consent-container p {
		font-size: 11px;
		line-height: 1.45;
	}

	#get-pricing .hx-form-card .hs-form .hs_submit {
		margin-top: 0;
		padding-top: 12px;
	}

	#get-pricing .hx-form-card .hs-form .hs-button {
		min-height: 48px;
		padding: 13px 20px;
	}
}

@media (forced-colors: active) {
	#get-pricing .hx-form-card .hs-form select.hs-input {
		-webkit-appearance: auto;
		appearance: auto;
		background: Canvas;
	}

	#get-pricing .hx-form-card .hs-form .hs-input:is(:autofill, :-webkit-autofill) {
		box-shadow: none;
		-webkit-text-fill-color: CanvasText;
	}
}
