/**
 * HubSpot Form Overrides
 *
 * Contact page + Footer form styles for HubSpot embeds.
 */

/* --------------------------------------------------------
   Contact page form
   -------------------------------------------------------- */
.syntax-hubspot-form {
	--syntax-form-text: var(--color-text, #333333);
	--syntax-form-border: var(--color-primary-light, #1eb4e6);
	--syntax-form-font: var(--font-body, 'rigsans', sans-serif);
	width: 100%;
}

.syntax-hubspot-form .hs-form,
.syntax-hubspot-form .hs-form fieldset {
	max-width: 100%;
	width: 100%;
	padding: 0;
	border: 0;
	margin-left: 0;
	margin-right: 0;
}

/* Force inputs to fill their column — fixes right-edge misalignment */
/* Exclude checkboxes and radios — they must not go full-width */
.syntax-hubspot-form .hs-input:not([type="checkbox"]):not([type="radio"]) {
	width: 100% !important;
	box-sizing: border-box;
}

.syntax-hubspot-form .hs-form-field {
	margin-bottom: 1.25em;
}

.syntax-hubspot-form label {
	display: block;
	margin-bottom: 0.4em;
	font-family: var(--syntax-form-font);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--syntax-form-text);
}

.syntax-hubspot-form input[type="text"],
.syntax-hubspot-form input[type="email"],
.syntax-hubspot-form input[type="tel"],
.syntax-hubspot-form input[type="number"],
.syntax-hubspot-form input[type="password"],
.syntax-hubspot-form input[type="date"],
.syntax-hubspot-form select,
.syntax-hubspot-form textarea {
	width: 100%;
	padding: 0.625em 0;
	font-family: var(--syntax-form-font);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--syntax-form-text);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--syntax-form-border);
	border-radius: 0;
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.syntax-hubspot-form textarea {
	min-height: 120px;
	resize: vertical;
}

.syntax-hubspot-form input:focus,
.syntax-hubspot-form select:focus,
.syntax-hubspot-form textarea:focus {
	outline: none;
	border-bottom: 1px solid var(--syntax-form-border);
	box-shadow: none;
}

.syntax-hubspot-form ::placeholder {
	color: var(--syntax-form-text);
	opacity: 0.7;
}

.syntax-hubspot-form .hs-error-msg,
.syntax-hubspot-form .hs-main-font-element,
.syntax-hubspot-form .hs-richtext {
	font-family: var(--syntax-form-font);
	font-size: 0.875rem;
	color: var(--syntax-form-text);
}

.syntax-hubspot-form .actions {
	margin-top: 1.5em;
}

.syntax-hubspot-form .hs-button,
.syntax-hubspot-form input[type="submit"] {
	display: inline-block;
	padding: 0.8em 1.5em;
	font-family: var(--syntax-form-font);
	font-size: 0.875rem;
	line-height: 1.2;
	color: var(--syntax-form-text);
	background: transparent;
	border: 1px solid var(--syntax-form-border);
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.syntax-hubspot-form .hs-button:hover,
.syntax-hubspot-form input[type="submit"]:hover {
	opacity: 0.85;
}

.syntax-hubspot-form .submitted-message {
	font-family: var(--syntax-form-font);
	font-size: 0.875rem;
	color: var(--syntax-form-text);
}

/* Hide HubSpot's powered-by branding */
.syntax-hubspot-form .hs-form__virality-link {
	display: none;
}

/* -------------------------------------------------------
   Contact page — ERP inline checkboxes
   ------------------------------------------------------- */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-erp-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em 2em;
	list-style: none !important;
	margin: 0.75em 0 0;
	padding: 0;
}

/* Kill theme li::before bullets */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-erp-checkboxes li,
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-erp-checkboxes li::before {
	position: static;
	content: none !important;
	display: flex;
	align-items: center;
	gap: 0.5em;
	font-family: var(--syntax-form-font);
	font-size: 0.875rem;
	color: var(--syntax-form-text);
	padding: 0;
	margin: 0;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-erp-checkboxes li::before {
	display: none !important;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-erp-checkboxes input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 1.1em;
	height: 1.1em;
	border: 1px solid #aaa;
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-erp-checkboxes input[type="checkbox"]:checked {
	background-color: var(--color-primary-light, #1eb4e6);
	border-color: var(--color-primary-light, #1eb4e6);
}

/* -------------------------------------------------------
   Contact page — validation error messages
   In-flow (not absolute) since the page has room to breathe.
   ------------------------------------------------------- */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-form-field {
	position: relative;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-error-msgs {
	list-style: none;
	margin: 0.4em 0 0;
	padding: 0;
}

/* Kill theme li::before bullets inside contact error lists */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-error-msgs li::before {
	content: none !important;
	display: none !important;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-error-msg {
	display: inline-block;
	background: #fff;
	color: #c0392b;
	font-size: 0.65rem;
	padding: 0.4em 0.85em;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.12);
	margin-bottom: 0.25em;
}

/* -------------------------------------------------------
   Contact page — layout & typography matching reference
   ------------------------------------------------------- */

/* Uppercase labels (incl. ERP label that stays visible) — but NOT inside the consent block */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-form-field label {
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	color: #888;
	margin-bottom: 0.5em;
}

/* Uppercase placeholders to match reference — but NOT inside the consent block */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-form-field ::placeholder {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.875rem;
}

/* More generous spacing between fields */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-form-field {
	margin-bottom: 2.25em;
}

/* Taller textarea (plenty of height on contact page) */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) textarea {
	min-height: 160px;
}

/* -------------------------------------------------------
   Contact page — consent / bottom block (stacked)
   ------------------------------------------------------- */

/* Hard-hide the ERP select even if HubSpot overrides inline style */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs_what_is_your_core_erp_ select {
	display: none !important;
}

/* HubSpot renders its own GDPR consent block as a fieldset/ul —
   kill the global li::before bullets and style the text */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container li,
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container li::before {
	position: static;
	content: none !important;
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	padding: 0;
	margin: 0;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container li::before {
	display: none !important;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container ul {
	list-style: none !important;
	padding: 0;
	margin: 0;
}

/* Privacy paragraph text */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container p,
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container .hs-richtext {
	font-size: 0.875rem;
	line-height: 1.7;
	color: var(--syntax-form-text);
	margin-bottom: 1.25em;
}

/* "I agree" checkbox row */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container .hs-form-booleancheckbox-display {
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--syntax-form-text);
	margin-bottom: 1.75em;
}

/* Style HubSpot's consent checkbox to match ERP checkboxes */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 1.25em;
	height: 1.25em;
	min-width: 1.25em;
	border: 2px solid var(--color-primary-light, #1eb4e6);
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
	margin-top: 0.1em;
}

.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .legal-consent-container input[type="checkbox"]:checked {
	background-color: var(--color-primary-light, #1eb4e6);
}

/* Remove our now-unused injected block styles */
.syntax-hubspot-form:not(.syntax-hubspot-form--footer) .hs-contact-bottom-row {
	display: none;
}


/* --------------------------------------------------------
   Footer form
   -------------------------------------------------------- */
.syntax-hubspot-form--footer {
	margin-top: 0;
}

/* Reset HubSpot stacked layout */
.syntax-hubspot-form--footer .hs-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0 1.5em;
}

/* Every field takes full width by default (mobile) */
.syntax-hubspot-form--footer .hs-form-field,
.syntax-hubspot-form--footer .hs_submit {
	width: 100%;
	flex: 0 0 100%;
	margin-bottom: 1.25em;
}

/* Labels: uppercase, small, muted */
.syntax-hubspot-form--footer label {
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	color: #888;
	margin-bottom: 0.4em;
	display: block;
}

/* Suppress HubSpot inline label-span (we use the label element) */
.syntax-hubspot-form--footer .hs-form-required {
	display: none;
}

/* ERP inline checkbox group */
.syntax-hubspot-form--footer .hs-erp-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1.75em;
	list-style: none !important;
	margin: 0.5em 0 0;
	padding: 0 0 0 0;
}

/* Kill global li::before bullet that the theme injects on all li elements */
.syntax-hubspot-form--footer .hs-erp-checkboxes li,
.syntax-hubspot-form--footer .hs-erp-checkboxes li::before {
	position: static;
	content: none !important;
	display: flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.875rem;
	color: var(--color-text, #333);
	padding: 0;
	margin: 0;
}

.syntax-hubspot-form--footer .hs-erp-checkboxes li::before {
	display: none !important;
}

/* Native checkbox styled to match CF7 reference squares */
.syntax-hubspot-form--footer .hs-erp-checkboxes input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 1.1em;
	height: 1.1em;
	border: 1px solid #aaa;
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
}

.syntax-hubspot-form--footer .hs-erp-checkboxes input[type="checkbox"]:checked {
	background-color: var(--color-primary-light, #1eb4e6);
	border-color: var(--color-primary-light, #1eb4e6);
}

/* Bottom row: [privacy grows] [I agree shrinks] [Submit shrinks] */
.syntax-hubspot-form--footer .hs-footer-bottom-row {
	width: 100%;
	flex: 0 0 100%;
	margin-bottom: 1.25em;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75em 1.5em;
}

.syntax-hubspot-form--footer .hs-footer-privacy {
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--color-text, #333);
	margin: 0;
	width: 100%;
}

.syntax-hubspot-form--footer .hs-footer-agree {
	display: flex;
	align-items: center;
	gap: 0.5em;
	font-size: 0.875rem;
	color: var(--color-text, #333);
}

.syntax-hubspot-form--footer .hs-footer-agree input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 1.25em;
	height: 1.25em;
	border: 2px solid var(--color-primary-light, #1eb4e6);
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
}

.syntax-hubspot-form--footer .hs-footer-agree input[type="checkbox"]:checked {
	background-color: var(--color-primary-light, #1eb4e6);
}

/* Submit inside bottom row */
.syntax-hubspot-form--footer .hs-footer-bottom-row .hs_submit,
.syntax-hubspot-form--footer .hs-footer-bottom-row .hs-submit {
	margin-bottom: 0;
	flex: 0 0 auto;
	width: auto;
}

.syntax-hubspot-form--footer .hs-footer-bottom-row .hs-submit .actions {
	margin-top: 0;
}

.syntax-hubspot-form--footer .hs-button,
.syntax-hubspot-form--footer input[type="submit"] {
	width: 100%;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Certains éléments text (text-19 widget h6) */
.site-footer .widget_text h6 {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--color-text, #333);
	margin: 0.5em 0 0;
	font-style: italic;
}

/* -------------------------------------------------------
   Floating / fading validation error messages
   Positioned so they do NOT push the form layout.
   Fade in on show, fade out when field is corrected,
   persist on submit.
   ------------------------------------------------------- */
.syntax-hubspot-form--footer .hs-form-field {
	position: relative;
}

.syntax-hubspot-form--footer .hs-error-msgs {
	position: absolute;
	bottom: calc(100% + 2px);
	left: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 10;
}

.syntax-hubspot-form--footer .hs-error-msgs.hs-visible {
	opacity: 1;
}

/* On submit the form gets .hs-was-validated; keep errors showing */
.syntax-hubspot-form--footer .hs-form.hs-was-validated .hs-error-msgs {
	opacity: 1;
}

/* Kill theme li::before bullets inside error lists */
.syntax-hubspot-form--footer .hs-error-msgs li::before {
	content: none !important;
	display: none !important;
}

.syntax-hubspot-form--footer .hs-error-msg {
	display: block;
	background: #fff;
	color: #c0392b;
	font-size: 0.65rem;
	padding: 0.25em 0.6em;
	white-space: nowrap;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* --------------------------------------------------------
   Footer form — desktop layout (≥70em)
   Row 1: First Name | Last Name | Business Email | Request Category (4 across)
   Row 2: What is your Core ERP? (full width with inline checkboxes)
   Row 3: How Can We Help? (full width textarea)
   Row 4: [Privacy+Agree — grows] [Submit — shrinks]
   -------------------------------------------------------- */
@media screen and (min-width: 70em) {

	/* Row 1 fields: each takes 25% of the row, with explicit order */
	.syntax-hubspot-form--footer .hs_firstname {
		flex: 0 0 calc(25% - 1.125em);
		width: calc(25% - 1.125em);
		margin-bottom: 1.5em;
		order: 1;
	}

	.syntax-hubspot-form--footer .hs_lastname {
		flex: 0 0 calc(25% - 1.125em);
		width: calc(25% - 1.125em);
		margin-bottom: 1.5em;
		order: 2;
	}

	.syntax-hubspot-form--footer .hs_email {
		flex: 0 0 calc(25% - 1.125em);
		width: calc(25% - 1.125em);
		margin-bottom: 1.5em;
		order: 3;
	}

	.syntax-hubspot-form--footer .hs_request_category {
		flex: 0 0 calc(25% - 1.125em);
		width: calc(25% - 1.125em);
		margin-bottom: 1.5em;
		order: 4;
	}

	/* Company Name + Phone: hide to match reference layout */
	.syntax-hubspot-form--footer .hs_company,
	.syntax-hubspot-form--footer .hs_phone {
		display: none;
	}

	/* Row 2: ERP — full width */
	.syntax-hubspot-form--footer .hs_what_is_your_core_erp_ {
		flex: 0 0 100%;
		width: 100%;
		margin-bottom: 1.5em;
		order: 5;
	}

	/* Row 3: Message — full width */
	.syntax-hubspot-form--footer .hs_message {
		flex: 0 0 100%;
		width: 100%;
		margin-bottom: 1.5em;
		order: 6;
	}

	/* Any other hidden HS fields */
	.syntax-hubspot-form--footer .hs-form-field[style*="display: none"] {
		order: 0;
	}

	/* Row 4: bottom row takes full width, then lays out internally as flex row */
	.syntax-hubspot-form--footer .hs-footer-bottom-row {
		flex-wrap: nowrap;
		align-items: center;
		margin-bottom: 0;
		order: 7;
	}

	.syntax-hubspot-form--footer .hs-footer-privacy {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
	}

	.syntax-hubspot-form--footer .hs-footer-agree {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.syntax-hubspot-form--footer .hs-footer-bottom-row .hs_submit,
	.syntax-hubspot-form--footer .hs-footer-bottom-row .hs-submit {
		flex: 0 0 auto;
		width: auto;
		align-self: center;
		margin-bottom: 0;
	}

	.syntax-hubspot-form--footer .hs-button,
	.syntax-hubspot-form--footer input[type="submit"] {
		width: auto;
		min-width: 9em;
	}
}


/* --------------------------------------------------------
   Prefooter-alt (dark gradient area)
   Inherits gradient from prefooter-alt.css, adds form styles
   -------------------------------------------------------- */
.site-prefooter-alt .syntax-hubspot-form {
	text-align: left;
}

.site-prefooter-alt .syntax-hubspot-form .hs-input {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
}

.site-prefooter-alt .syntax-hubspot-form .hs-input::placeholder {
	color: #fff;
	opacity: 1;
}

.site-prefooter-alt .syntax-hubspot-form .hs-submit .hs-button {
	color: #fff;
	border-color: #fff;
}

.site-prefooter-alt .syntax-hubspot-form .hs-submit .hs-button:hover,
.site-prefooter-alt .syntax-hubspot-form .hs-submit .hs-button:focus {
	background-color: #fff;
	color: var(--color-text);
}

.site-prefooter-alt .syntax-hubspot-form .legal-consent-container {
	color: rgba(255, 255, 255, 0.85);
}

.site-prefooter-alt .syntax-hubspot-form .legal-consent-container a {
	color: #fff;
}

.site-prefooter-alt .syntax-hubspot-form .hs-form-booleancheckbox-display span {
	color: rgba(255, 255, 255, 0.85);
}
