/* ==========================================================================
   Theme form widget (inc/elementor/class-widget-form.php): one look for every form.
   Field borders keep at least 3:1 contrast against white (WCAG 1.4.11), so they use a
   darker grey than the decorative border token.
   Every rule starts with "html body .e29-form[data-e29-form]": the Elementor kit styles all
   inputs and buttons with ".elementor-kit-N input:not(…):not(…)", which a shorter selector
   would lose to.
   ========================================================================== */

html body .e29-form[data-e29-form] {
	--e29-field-border: color-mix(in srgb, var(--e-global-color-muted, #5b6470) 75%, #fff);
	--e29-field-radius: 8px;
	--e29-field-h: 48px;
	--e29-focus-ring: 0 0 0 4px color-mix(in srgb, var(--e-global-color-primary, #2b5083) 22%, transparent);
	--e29-error: #b42318;
	--e29-tint: color-mix(in srgb, var(--e-global-color-primary, #2b5083) 7%, #fff);
	position: relative;
	scroll-margin-top: calc(var(--e29-header-h, 76px) + var(--e29-admin-bar, 0px) + 16px);
}
/* Focus moved to a field (error summary, first error) stops below the sticky header. */
html body .e29-form[data-e29-form] :is(input, select, textarea, .e29-form__summary) { scroll-margin-top: calc(var(--e29-header-h, 76px) + var(--e29-admin-bar, 0px) + 56px); }
html body .e29-form[data-e29-form] .e29-form__note { margin: 0 0 1.5rem; color: var(--e-global-color-muted); font-size: 0.875rem; }

/* Layout: two columns for short fields on desktop, one column below 1025px. */
html body .e29-form[data-e29-form] .e29-form__fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.375rem 1.25rem; align-items: start; }
html body .e29-form[data-e29-form] .e29-form__field { grid-column: span 6; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
html body .e29-form[data-e29-form] .e29-form__field--w50 { grid-column: span 3; }
html body .e29-form[data-e29-form] .e29-form__field--w33 { grid-column: span 2; }
@media (max-width: 1024px) {
	html body .e29-form[data-e29-form] .e29-form__field--w50, html body .e29-form[data-e29-form] .e29-form__field--w33 { grid-column: span 6; }
}

/* Labels and hints. */
html body .e29-form[data-e29-form] label,
html body .e29-form[data-e29-form] .e29-form__field--group legend {
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-accent-font-family, inherit);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}
html body .e29-form[data-e29-form] .e29-form__req { color: var(--e-global-color-accenttext, #8A6000); } /* 5.6:1 on white */
html body .e29-form[data-e29-form] .e29-form__help { margin: 0; color: var(--e-global-color-muted); font-size: 0.875rem; line-height: 1.45; }

/* Text fields, dropdowns, long text. */
/* :where() keeps this at two classes, so the phone, tile and upload rules below can refine it. */
html body .e29-form[data-e29-form] .e29-form__field :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
	width: 100%;
	min-height: var(--e29-field-h);
	margin: 0;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--e29-field-border);
	border-radius: var(--e29-field-radius);
	background-color: var(--e-global-color-white, #fff);
	color: var(--e-global-color-text);
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color 0.2s, box-shadow 0.2s;
}
html body .e29-form[data-e29-form] .e29-form__field :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { height: var(--e29-field-h); }
html body .e29-form[data-e29-form] .e29-form__field textarea { min-height: 136px; resize: vertical; }
html body .e29-form[data-e29-form] .e29-form__field select {
	appearance: none;
	padding-right: 2.75rem;
	background: var(--e-global-color-white, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b5083' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.875rem center / 1.125rem;
	cursor: pointer;
}
html body .e29-form[data-e29-form] select:has(option[value=""]:checked) { color: var(--e-global-color-muted); }
html body .e29-form[data-e29-form] select option { color: var(--e-global-color-text); }
html body .e29-form[data-e29-form] ::placeholder { color: var(--e-global-color-muted); opacity: 1; }
html body .e29-form[data-e29-form] :is(input, select, textarea):hover:not(:focus) { border-color: var(--e-global-color-muted); }
html body .e29-form[data-e29-form] :is(input, select, textarea):focus { outline: none; border-color: var(--e-global-color-primary); box-shadow: var(--e29-focus-ring); }
html body .e29-form[data-e29-form] [aria-invalid="true"],
html body .e29-form[data-e29-form] [aria-invalid="true"]:hover { border-color: var(--e29-error); }
html body .e29-form[data-e29-form] [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--e29-error) 18%, transparent); }

/* Phone: calling code and number read as one field. */
html body .e29-form[data-e29-form] .e29-form__tel {
	display: flex;
	border: 1px solid var(--e29-field-border);
	border-radius: var(--e29-field-radius);
	background: var(--e-global-color-white, #fff);
	transition: border-color 0.2s, box-shadow 0.2s;
}
html body .e29-form[data-e29-form] .e29-form__tel :is(select, input) { border: 0; border-radius: 0; box-shadow: none; background-color: transparent; }
html body .e29-form[data-e29-form] .e29-form__tel select {
	flex: 0 0 auto;
	width: auto;
	padding-right: 2.25rem;
	border-right: 1px solid var(--e29-border, #e3e6ea);
	border-radius: var(--e29-field-radius) 0 0 var(--e29-field-radius);
	background-position: right 0.625rem center;
	color: var(--e-global-color-text);
}
html body .e29-form[data-e29-form] .e29-form__tel input { flex: 1 1 auto; min-width: 0; border-radius: 0 var(--e29-field-radius) var(--e29-field-radius) 0; }
html body .e29-form[data-e29-form] .e29-form__tel:hover { border-color: var(--e-global-color-muted); }
html body .e29-form[data-e29-form] .e29-form__tel:focus-within { border-color: var(--e-global-color-primary); box-shadow: var(--e29-focus-ring); }
html body .e29-form[data-e29-form] .e29-form__tel:has([aria-invalid="true"]) { border-color: var(--e29-error); }

/* Checkboxes and radios: custom boxes, aligned to the first line of the label. */
html body .e29-form[data-e29-form] .e29-form__check { position: relative; display: flex; align-items: flex-start; gap: 0.75rem; }
html body .e29-form[data-e29-form] .e29-form__check label { font-family: inherit; font-size: 0.9375rem; font-weight: 400; color: var(--e-global-color-text); cursor: pointer; }
html body .e29-form[data-e29-form] :is(input[type="checkbox"], input[type="radio"]) {
	flex-shrink: 0;
	appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	min-height: 0;
	margin: 0.0625rem 0 0;
	padding: 0;
	border: 1.5px solid var(--e29-field-border);
	border-radius: 5px;
	background: var(--e-global-color-white, #fff) no-repeat center / 0.875rem;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
html body .e29-form[data-e29-form] input[type="radio"] { border-radius: 50%; }
html body .e29-form[data-e29-form] input[type="checkbox"]:checked {
	border-color: var(--e-global-color-primary);
	background-color: var(--e-global-color-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
html body .e29-form[data-e29-form] input[type="radio"]:checked { border-color: var(--e-global-color-primary); box-shadow: inset 0 0 0 4px var(--e-global-color-white, #fff); background-color: var(--e-global-color-primary); }
html body .e29-form[data-e29-form] :is(input[type="checkbox"], input[type="radio"]):focus-visible { outline: none; border-color: var(--e-global-color-primary); box-shadow: var(--e29-focus-ring); }
html body .e29-form[data-e29-form] input[type="radio"]:checked:focus-visible { box-shadow: inset 0 0 0 4px #fff, var(--e29-focus-ring); }
html body .e29-form[data-e29-form] .e29-form__check a { color: var(--e-global-color-secondary); text-decoration: underline; text-underline-offset: 2px; }

/* Consents at the end: smaller text. */
html body .e29-form[data-e29-form] .e29-form__field--checkbox .e29-form__check label,
html body .e29-form[data-e29-form] .e29-form__field--consent .e29-form__check label { font-size: 0.875rem; line-height: 1.5; }
html body .e29-form[data-e29-form] .e29-form__field--checkbox, html body .e29-form[data-e29-form] .e29-form__field--consent { gap: 0.25rem; }
html body .e29-form[data-e29-form] .e29-form__field--checkbox:not(.e29-form__field--checkbox ~ .e29-form__field--checkbox) { padding-top: 1.375rem; border-top: 1px solid var(--e29-border, #e3e6ea); }

/* Option groups. */
html body .e29-form[data-e29-form] .e29-form__field--group { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
html body .e29-form[data-e29-form] .e29-form__field--group legend { float: left; width: 100%; margin: 0 0 0.5rem; padding: 0; }
html body .e29-form[data-e29-form] .e29-form__field--group legend + * { clear: both; }
html body .e29-form[data-e29-form] .e29-form__field--group .e29-form__help { margin-top: -0.25rem; }
html body .e29-form[data-e29-form] .e29-form__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.75rem 1.25rem; margin-top: 0.25rem; }
html body .e29-form[data-e29-form] .e29-form__field--radio .e29-form__options { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); }
html body .e29-form[data-e29-form] .e29-form__field--group.is-invalid:not(.e29-form__field--tiles) .e29-form__options { padding: 0.625rem; border: 1px solid var(--e29-error); border-radius: var(--e29-field-radius); }

/* Tiles: options with icons, two per row; the whole tile is the label. */
html body .e29-form[data-e29-form] .e29-form__field--tiles .e29-form__options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 479px) {
	html body .e29-form[data-e29-form] .e29-form__field--tiles .e29-form__options { grid-template-columns: minmax(0, 1fr); }
}
html body .e29-form[data-e29-form] .e29-form__tile { height: 100%; }
html body .e29-form[data-e29-form] .e29-form__tile input { position: absolute; top: 0.875rem; right: 0.875rem; margin: 0; }
html body .e29-form[data-e29-form] .e29-form__tile label {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.625rem;
	width: 100%;
	min-height: 100%;
	padding: 1rem 2.75rem 1rem 1rem;
	border: 1px solid var(--e29-field-border);
	border-radius: 10px;
	background: var(--e-global-color-white, #fff);
	font-weight: 600;
	line-height: 1.35;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
html body .e29-form[data-e29-form] .e29-form__tile-icon { display: inline-flex; color: var(--e-global-color-primary); }
html body .e29-form[data-e29-form] .e29-form__tile:hover label { border-color: var(--e-global-color-primary); }
html body .e29-form[data-e29-form] .e29-form__tile:has(input:checked) label { border-color: var(--e-global-color-primary); background: var(--e29-tint); box-shadow: inset 0 0 0 1px var(--e-global-color-primary); }
html body .e29-form[data-e29-form] .e29-form__tile:has(input:focus-visible) label { box-shadow: var(--e29-focus-ring); border-color: var(--e-global-color-primary); }
html body .e29-form[data-e29-form] .e29-form__tile input:focus-visible { box-shadow: none; }
html body .e29-form[data-e29-form] .e29-form__field--tiles.is-invalid .e29-form__tile label { border-color: var(--e29-error); }

/* Upload: a dashed drop zone; the invisible file input covers it. */
html body .e29-form[data-e29-form] .e29-form__drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.375rem;
	padding: 1.5rem 1.25rem;
	border: 1.5px dashed var(--e29-field-border);
	border-radius: 10px;
	background: var(--e-global-color-surface, #f3f5f7);
	text-align: center;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
html body .e29-form[data-e29-form] .e29-form__drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
html body .e29-form[data-e29-form] .e29-form__drop-icon { display: inline-flex; color: var(--e-global-color-primary); }
html body .e29-form[data-e29-form] .e29-form__drop-text { color: var(--e-global-color-primary); font-weight: 600; }
html body .e29-form[data-e29-form] .e29-form__drop .e29-form__help { max-width: 34rem; }
html body .e29-form[data-e29-form] .e29-form__drop:hover, html body .e29-form[data-e29-form] .e29-form__drop.is-over { border-color: var(--e-global-color-primary); background: var(--e29-tint); }
html body .e29-form[data-e29-form] .e29-form__drop:has(input:focus-visible) { border-color: var(--e-global-color-primary); box-shadow: var(--e29-focus-ring); }
html body .e29-form[data-e29-form] .e29-form__field--file.is-invalid .e29-form__drop { border-color: var(--e29-error); }
html body .e29-form[data-e29-form] .e29-form__files { display: flex; flex-direction: column; gap: 0.5rem; }
html body .e29-form[data-e29-form] .e29-form__file {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.5rem 0.5rem 0.875rem;
	border: 1px solid var(--e29-border, #e3e6ea);
	border-radius: var(--e29-field-radius);
	background: var(--e-global-color-white, #fff);
	font-size: 0.9375rem;
}
html body .e29-form[data-e29-form] .e29-form__file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
html body .e29-form[data-e29-form] .e29-form__file-size { flex: 0 0 auto; color: var(--e-global-color-muted); font-size: 0.875rem; }
html body .e29-form[data-e29-form] .e29-form__file-remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--e-global-color-text);
	font-size: 1.375rem;
	line-height: 1;
	cursor: pointer;
}
html body .e29-form[data-e29-form] .e29-form__file-remove:hover { background: var(--e-global-color-surface, #f3f5f7); color: var(--e29-error); }
html body .e29-form[data-e29-form] .e29-form__file-remove:focus { background: transparent; color: var(--e-global-color-text); }
html body .e29-form[data-e29-form] .e29-form__file-remove:focus-visible { outline: 2px solid var(--e-global-color-primary); outline-offset: 2px; }

/* Errors. */
html body .e29-form[data-e29-form] .e29-form__error { margin: 0; color: var(--e29-error); font-size: 0.875rem; line-height: 1.4; }
html body .e29-form[data-e29-form] .e29-form__error::before { content: "! " / ""; font-weight: 700; }
html body .e29-form[data-e29-form] .e29-form__summary {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--e29-error);
	border-left-width: 4px;
	border-radius: var(--e29-field-radius);
	background: #fdf3f2;
	color: var(--e-global-color-text);
	font-size: 0.9375rem;
}
html body .e29-form[data-e29-form] .e29-form__summary-title { margin: 0 0 0.5rem; color: var(--e29-error); font-weight: 700; }
html body .e29-form[data-e29-form] .e29-form__summary ul { margin: 0; padding-left: 1.25rem; }
html body .e29-form[data-e29-form] .e29-form__summary li + li { margin-top: 0.25rem; }
html body .e29-form[data-e29-form] .e29-form__summary a { color: var(--e29-error); text-decoration: underline; text-underline-offset: 2px; }

/* Submit: auto width on desktop, full width on phones; spinner while sending. */
html body .e29-form[data-e29-form] .e29-form__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.75rem; }
html body .e29-form[data-e29-form] .e29-form__submit { gap: 0.625rem; min-height: var(--e29-field-h); justify-content: center; }
html body .e29-form--btn-full .e29-form__submit { width: 100%; }
@media (max-width: 767px) {
	html body .e29-form[data-e29-form] .e29-form__actions > .e29-form__submit { flex: 1 1 100%; width: 100%; }
}
html body .e29-form[data-e29-form] .e29-form__spinner { display: none; width: 1.125rem; height: 1.125rem; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: e29-spin 0.8s linear infinite; }
html body .e29-form[data-e29-form][aria-busy="true"] .e29-form__spinner { display: inline-block; }
html body .e29-form[data-e29-form] .e29-form__submit[disabled] { cursor: progress; opacity: 0.85; transform: none !important; }
@keyframes e29-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	html body .e29-form[data-e29-form] .e29-form__spinner { animation-duration: 2.4s; }
}

html body .e29-form[data-e29-form] .e29-form__status:empty { display: none; }
html body .e29-form[data-e29-form] .e29-form__status { margin-top: 1rem; color: var(--e-global-color-text); }
html body .e29-form[data-e29-form] .e29-form__status.is-error { color: var(--e29-error); font-weight: 600; }
html body .e29-form[data-e29-form] .e29-form__status.is-quiet { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Thank-you panel, in place of the form. */
html body .e29-form[data-e29-form] .e29-form__success { padding: 0.5rem 0; color: var(--e-global-color-text); text-align: left; }
html body .e29-form[data-e29-form] .e29-form__success:focus { outline: none; }
html body .e29-form[data-e29-form] .e29-form__success:focus-visible { outline: 3px solid var(--e-global-color-primary); outline-offset: 4px; border-radius: 4px; }
html body .e29-form[data-e29-form] .e29-form__success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: #e7f4ec;
	color: #1a7f45;
}
html body .e29-form[data-e29-form] .e29-form__success-msg { margin: 0; font-family: var(--e-global-typography-accent-font-family, inherit); font-size: 1.25rem; font-weight: 700; line-height: 1.4; color: var(--e-global-color-primary); }
html body .e29-form[data-e29-form] .e29-form__success-sub { margin: 1.5rem 0 0.5rem; font-weight: 700; }
html body .e29-form[data-e29-form] .e29-form__steps { margin: 0; padding-left: 1.25rem; }
html body .e29-form[data-e29-form] .e29-form__steps li + li { margin-top: 0.375rem; }
html body .e29-form[data-e29-form] .e29-form__success-wa { margin: 1.5rem 0 0; }
html body .e29-form[data-e29-form] .e29-form__success-wa a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	border: 1px solid #1a7f45;
	border-radius: var(--e29-field-radius);
	color: #146c3a;
	font-weight: 600;
	text-decoration: none;
}
html body .e29-form[data-e29-form] .e29-form__success-wa a:hover { background: #e7f4ec; }
html body .e29-form[data-e29-form] .e29-form__success-wa a:focus-visible { outline: 2px solid var(--e-global-color-primary); outline-offset: 2px; }
html body .e29-form[data-e29-form] .e29-form__notice { margin: 1.25rem 0 0; font-size: 0.875rem; color: var(--e-global-color-muted); }
html body .e29-form[data-e29-form] .e29-form__notice a { color: var(--e-global-color-secondary); text-decoration: underline; }

/* Honeypot: off screen, never shown. */
html body .e29-form[data-e29-form] .e29-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The card a form sits in (Elementor container with .e29-form-card): heading and intro inside. */
html body .e29-form-card { max-width: 760px; margin-inline: auto; }
html body .e29-form-card > .elementor-widget-heading .elementor-heading-title { font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem); }
html body .e29-form-card > .elementor-widget-text-editor p { margin: 0; }
