/* ==========================================================================
   Gravity Forms 3.x fixes + practice area sidebar form (Juris Digital, Nov 2026)
   GF's own CSS is switched off on this site, so the theme styles every GF element.
   ========================================================================== */

/* ---------- Honeypot (spam trap) must never show ---------- */
/* Gravity Forms normally hides it with its own CSS, which is switched off on this site, and the
   footer form's flex layout would otherwise print it as a visible field. */
.gform_wrapper .gform_validation_container,
.gform_wrapper .gfield--type-honeypot {
	display: none !important;
}

/* ---------- GF 3.x: validation banner (h2.gform_submission_error) ---------- */
/* GF 3.x prints the "There was a problem" banner as an <h2>, which picks up the site's large
   heading style. Keep it a small notice. */
.gform_wrapper .gform_validation_errors {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid #c0392b;
	border-radius: 10px;
	background: #fdf2f1;
}
#wrapper .gform_wrapper .gform_validation_errors h2.gform_submission_error,
#wrapper .gform_wrapper h2.gform_submission_error {
	margin: 0;
	padding: 0;
	font-family: Outfit, sans-serif;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	text-align: left;
	color: #a02a1f;
}
.gform_wrapper h2.gform_submission_error .gform-icon {
	display: none;
}
.gform_wrapper .gfield_validation_message,
.gform_wrapper .validation_message {
	margin: 6px 0 0;
	padding: 0 6px;
	font-family: Outfit, sans-serif;
	font-size: 13px;
	line-height: 1.3;
	color: #a02a1f;
}
.gform_wrapper .gfield_error input[type="text"],
.gform_wrapper .gfield_error input[type="email"],
.gform_wrapper .gfield_error input[type="tel"],
.gform_wrapper .gfield_error textarea {
	box-shadow: 0 0 0 2px #c0392b inset;
}

/* ---------- Practice area sidebar: sticky form card (desktop) ---------- */
/* The theme already hides the sidebar at 1024px and below, so this is desktop only.
   Chat widget (.assistant-cta-container) is fixed bottom right, about 120px tall and 600px wide,
   and sits under the sidebar column. Keep the card clear of it: it sticks 130px from the top and
   is never taller than the viewport minus that top offset and --ferrante-chat-clear. If the
   viewport is short, the card scrolls inside itself instead of running under the chat widget. */
#wrapper.internal section#main-pa-container .pa-page-wrapper aside.sidebar.has-form {
	--ferrante-chat-clear: 150px;
	top: 130px;
	max-height: calc(100vh - 130px - var(--ferrante-chat-clear));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 8px 16px 0 !important;
	box-sizing: border-box;
	scrollbar-width: thin;
}

#wrapper.internal section#main-pa-container .pa-page-wrapper aside.sidebar .sidebar-cta-form.has-form {
	align-items: stretch;
	box-sizing: border-box;
	padding: 24px 22px 22px;
	border-radius: 20px;
	background: #fff;
	box-shadow: none;
}

#wrapper.internal section#main-pa-container .pa-page-wrapper aside.sidebar .sidebar-cta-form.has-form .cta-title {
	font-size: 26px;
	line-height: 1.2;
	margin-bottom: 16px;
}

.sidebar-cta-form.has-form .gform_wrapper {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: none;
	box-shadow: none;
}
.sidebar-cta-form.has-form .gform_wrapper::before,
.sidebar-cta-form.has-form .gform_wrapper::after {
	display: none;
}

.sidebar-cta-form.has-form .gform_wrapper ul.gform_fields {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sidebar-cta-form.has-form .gform_wrapper ul.gform_fields > li {
	flex: 1 1 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}
/* First and last name side by side (field ids 1 and 7) to keep the card short. */
.sidebar-cta-form.has-form .gform_wrapper ul.gform_fields > li[id$="_1"],
.sidebar-cta-form.has-form .gform_wrapper ul.gform_fields > li[id$="_7"] {
	flex: 1 1 calc(50% - 6px);
	min-width: 0;
}

/* Placeholders carry the labels (as in the footer form); labels stay for screen readers. */
.sidebar-cta-form.has-form .gform_wrapper .gfield_label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sidebar-cta-form.has-form .gform_wrapper input[type="text"],
.sidebar-cta-form.has-form .gform_wrapper input[type="email"],
.sidebar-cta-form.has-form .gform_wrapper input[type="tel"],
.sidebar-cta-form.has-form .gform_wrapper textarea {
	display: block;
	width: 100%;
	height: 46px;
	max-height: none;
	margin: 0;
	padding: 11px 16px;
	box-sizing: border-box;
	border: 0;
	border-radius: 40px;
	background: #F7F7F7;
	color: #000;
	font-family: Outfit, sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
	outline: none;
}
.sidebar-cta-form.has-form .gform_wrapper textarea {
	height: 84px;
	border-radius: 22px;
	resize: none;
}
.sidebar-cta-form.has-form .gform_wrapper input::placeholder,
.sidebar-cta-form.has-form .gform_wrapper textarea::placeholder {
	color: #B4B4B4;
	font-family: Outfit, sans-serif;
	font-size: 16px;
}
.sidebar-cta-form.has-form .gform_wrapper input:focus,
.sidebar-cta-form.has-form .gform_wrapper textarea:focus {
	box-shadow: 0 0 0 2px #00B1FF inset;
}

.sidebar-cta-form.has-form .gform_wrapper .gform_footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 14px 0 0;
	padding: 0;
}
.sidebar-cta-form.has-form .gform_wrapper .gform_footer button.gform_button {
	width: 100%;
	padding: 12px 24px;
	border: 0;
	border-radius: 44px;
	background: #00B1FF;
	color: #fff !important;
	font-family: Outfit, sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.25s ease-in-out;
}
.sidebar-cta-form.has-form .gform_wrapper .gform_footer button.gform_button:hover,
.sidebar-cta-form.has-form .gform_wrapper .gform_footer button.gform_button:focus-visible {
	background: #0094d6;
	color: #fff !important;
}
.sidebar-cta-form.has-form .gform_wrapper .gform_footer button.gform_button::before {
	display: none !important;
}
/* The spinner icon only shows while the form submits. */
.sidebar-cta-form.has-form .gform_wrapper .gform_footer button.gform_button i.fa {
	display: none;
}

/* Consent checkbox: same round look as the footer form. */
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox {
	display: flex;
	align-items: center;
	column-gap: 10px;
	margin: 0;
	font-family: Outfit, sans-serif;
	font-size: 12.5px;
	font-weight: 300;
	line-height: 1.35;
	color: #0F2731;
	text-align: left;
	cursor: pointer;
}
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox .custom-checkbox {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid gray;
	border-radius: 50%;
	transition: all 0.3s ease;
}
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox .custom-checkbox::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #00B1FF;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox input:checked + .custom-checkbox::after {
	opacity: 1;
}
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox input:checked + .custom-checkbox {
	border-color: #023550;
	background: #023550;
}
.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox input:focus-visible + .custom-checkbox {
	outline: 2px solid #00B1FF;
	outline-offset: 2px;
}

/* ---------- Short viewports (laptops): compact card so the Submit button never sits behind an
   inner scroll. Under 820px tall the card is about 370px, which fits above the chat widget. ---------- */
@media (max-height: 819px) {
	#wrapper.internal section#main-pa-container .pa-page-wrapper aside.sidebar.has-form {
		--ferrante-chat-clear: 146px;
		top: 126px;
		padding-bottom: 8px !important;
	}
	#wrapper.internal section#main-pa-container .pa-page-wrapper aside.sidebar .sidebar-cta-form.has-form {
		padding: 14px 18px 16px;
	}
	#wrapper.internal section#main-pa-container .pa-page-wrapper aside.sidebar .sidebar-cta-form.has-form .cta-title {
		font-size: 21px;
		margin-bottom: 10px;
	}
	.sidebar-cta-form.has-form .gform_wrapper ul.gform_fields {
		gap: 8px;
	}
	.sidebar-cta-form.has-form .gform_wrapper input[type="text"],
	.sidebar-cta-form.has-form .gform_wrapper input[type="email"],
	.sidebar-cta-form.has-form .gform_wrapper input[type="tel"],
	.sidebar-cta-form.has-form .gform_wrapper textarea {
		height: 40px;
		padding: 8px 14px;
		font-size: 15px;
		line-height: 22px;
	}
	.sidebar-cta-form.has-form .gform_wrapper textarea {
		height: 56px;
		border-radius: 20px;
	}
	.sidebar-cta-form.has-form .gform_wrapper .gform_footer {
		margin-top: 10px;
		gap: 8px;
	}
	.sidebar-cta-form.has-form .gform_wrapper .gform_footer button.gform_button {
		padding: 10px 20px;
		font-size: 17px;
	}
	.sidebar-cta-form.has-form .gform_wrapper .gform-checkbox {
		font-size: 12px;
		line-height: 1.3;
	}
}
