/* =====================================================================
 * AAFE Form Styler — universal form styling
 * Works with CF7, WPForms, Fluent Forms, Gravity Forms, Ninja Forms,
 * Forminator and any HTML form.
 * ===================================================================== */

/* aafe:isolated */
/* =====================================================================
 * Isolation from the theme & Elementor Site Settings (Theme Style).
 * The widget shows only its own design by default; global colors and
 * fonts apply when picked from a control's Globals picker.
 * Rules below are scoped with ".elementor" so they outrank Theme Style
 * selectors (0,1,1 / 0,2,1 on :hover) while Elementor control CSS
 * ({{WRAPPER}} = 0,4,0) still wins.
 * ===================================================================== */
.elementor .elementor-widget-aafe_form_styler {
	font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #334155;
}

html body .elementor-widget-aafe_form_styler :where(h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea, label, legend, th, td, caption, li, blockquote, small):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	font-family: inherit;
	font-style: inherit;
	letter-spacing: inherit;
	word-spacing: inherit;
	text-transform: inherit;
}

html body .elementor-widget-aafe_form_styler :where(h1, h2, h3, h4, h5, h6):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	color: inherit;
	font-weight: 500;
	line-height: 1.2;
}
html body .elementor-widget-aafe_form_styler :where(h1):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) { font-size: 2.5rem; }
html body .elementor-widget-aafe_form_styler :where(h2):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) { font-size: 2rem; }
html body .elementor-widget-aafe_form_styler :where(h3):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) { font-size: 1.75rem; }
html body .elementor-widget-aafe_form_styler :where(h4):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) { font-size: 1.5rem; }
html body .elementor-widget-aafe_form_styler :where(h5):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) { font-size: 1.25rem; }
html body .elementor-widget-aafe_form_styler :where(h6):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) { font-size: 1rem; }

html body .elementor-widget-aafe_form_styler :where(label, legend):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

html body .elementor-widget-aafe_form_styler :where(a):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	color: inherit;
	text-decoration: none;
}

html body .elementor-widget-aafe_form_styler :where(button, [type="button"], [type="submit"], [type="reset"]):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	background-color: transparent;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	border-radius: 0;
	box-shadow: none;
	text-shadow: none;
}

html body .elementor-widget-aafe_form_styler :where(img):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	border-style: none;
	border-radius: 0;
	box-shadow: none;
	opacity: 1;
	filter: none;
}

/* Theme Style :hover / :focus states (0,2,1). Kept above the widget rules
 * so the widget's own state rules still win. */
html body .elementor-widget-aafe_form_styler :where(button, [type="button"], [type="submit"], [type="reset"]):is(:hover, :focus, :focus-visible, :active):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	background-color: transparent;
	color: inherit;
	box-shadow: none;
	text-shadow: none;
}

html body .elementor-widget-aafe_form_styler :where(a):is(:hover, :focus, :focus-visible, :active):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	color: inherit;
}

html body .elementor-widget-aafe_form_styler :where(img):is(:hover, :focus):where(:not(.elementor-widget-aafe_form_styler .elementor-element *)) {
	box-shadow: none;
	opacity: 1;
	filter: none;
}
/* aafe:isolated:end */

.elementor .aafe-fs {
	--aafe-fs-accent: #6366f1;
	--aafe-fs-ring: rgba(99, 102, 241, 0.22);
	--aafe-fs-ring: color-mix(in srgb, var(--aafe-fs-accent) 22%, transparent);
	--aafe-fs-arrow: #64748b;
	--aafe-fs-choice: 18px;
	--aafe-fs-choice-bg: #fff;
	--aafe-fs-choice-border: #cbd5e1;
	--aafe-fs-choice-on: var(--aafe-fs-accent);
	--aafe-fs-choice-radius: 5px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.elementor .aafe-fs *,
.elementor .aafe-fs *::before,
.elementor .aafe-fs *::after {
	box-sizing: border-box;
}

.elementor .aafe-fs-notice {
	margin-bottom: 14px;
	padding: 10px 14px;
	font-size: 13px;
	color: #92400e;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
}

.elementor .aafe-fs__head {
	margin-bottom: 20px;
}

.elementor .aafe-fs__title {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
}

.elementor .aafe-fs__desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: #64748b;
}

/* ---------- Shared base (all presets except none) ---------- */
.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select) {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 11px 15px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: #0f172a;
	outline: none;
	box-shadow: none;
	transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.elementor .aafe-fs:not(.aafe-fs--preset-none) textarea {
	min-height: 120px;
	resize: vertical;
}

.elementor .aafe-fs:not(.aafe-fs--preset-none) select[multiple] {
	min-height: 110px;
}

.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select):focus {
	box-shadow: 0 0 0 var(--aafe-fs-ring-w, 4px) var(--aafe-fs-ring);
}

/* Preset: Flat */
.elementor .aafe-fs--preset-flat :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select) {
	background-color: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
}

.elementor .aafe-fs--preset-flat :is(input, textarea, select):focus {
	background-color: #fff;
	border-color: var(--aafe-fs-accent);
}

/* Preset: Outline */
.elementor .aafe-fs--preset-outline :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select) {
	background-color: #fff;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
}

.elementor .aafe-fs--preset-outline :is(input, textarea, select):focus {
	border-color: var(--aafe-fs-accent);
}

/* Preset: Underline */
.elementor .aafe-fs--preset-underline :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select) {
	padding-left: 0;
	padding-right: 0;
	background-color: transparent;
	border: 0;
	border-bottom: 2px solid #cbd5e1;
	border-radius: 0;
}

.elementor .aafe-fs--preset-underline :is(input, textarea, select):focus {
	border-bottom-color: var(--aafe-fs-accent);
	box-shadow: 0 2px 0 0 var(--aafe-fs-accent) !important;
}

/* Preset: Material (filled) */
.elementor .aafe-fs--preset-material :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select) {
	background-color: #f1f5f9;
	border: 0;
	border-bottom: 2px solid #94a3b8;
	border-radius: 8px 8px 0 0;
}

.elementor .aafe-fs--preset-material :is(input, textarea, select):focus {
	background-color: #eef2ff;
	border-bottom-color: var(--aafe-fs-accent);
	box-shadow: none !important;
}

/* Preset: Glass */
.elementor .aafe-fs--preset-glass :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="image"]):not([type="reset"]):not([type="color"]), textarea, select) {
	background-color: rgba(255, 255, 255, .65);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(31, 38, 135, .07);
}

.elementor .aafe-fs--preset-glass :is(input, textarea, select):focus {
	background-color: #fff;
	border-color: var(--aafe-fs-accent);
}

/* ---------- Labels ---------- */
.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(label, .gfield_label, .wpforms-field-label, .forminator-label, legend):not(.aafe-fs-choice):not(.wpforms-field-label-inline):not(.gfield-choice-label):not(.ff-el-form-check-label):not(.wpforms-error) {
	display: block;
	margin: 0 0 7px;
	padding: 0;
	line-height: 1.4;
	transition: color .2s ease;
}

/* Default label text style. Kept at (0,3,0) so the Labels style controls always win. */
.elementor .aafe-fs:not(.aafe-fs--preset-none) :where(label, .gfield_label, .wpforms-field-label, .forminator-label, legend):where(:not(.aafe-fs-choice, .wpforms-field-label-inline, .gfield-choice-label, .ff-el-form-check-label, .wpforms-error)) {
	font-size: 14px;
	font-weight: 600;
	color: #334155;
}

.elementor .aafe-fs-focus-label-yes .aafe-fs .is-focused :is(label, .gfield_label, .wpforms-field-label, .forminator-label):not(.aafe-fs-choice) {
	color: var(--aafe-fs-accent);
}

.elementor .aafe-fs .required,
.elementor .aafe-fs .wpforms-required-label,
.elementor .aafe-fs .gfield_required {
	color: #ef4444;
}

/* A label that CONTAINS its input (Contact Form 7) must never be hidden —
   only its text (wrapped in .aafe-fs-label-text by JS) is hidden. */
.elementor .aafe-fs-hide-labels-yes .aafe-fs :is(label, .gfield_label, .wpforms-field-label, .nf-field-label, .forminator-label, legend):not(.aafe-fs-choice):not(.wpforms-field-label-inline):not(.gfield-choice-label):not(.ff-el-form-check-label):not(.wpcf7-list-item-label):not(.forminator-checkbox):not(.forminator-radio):not(.aafe-fs-has-control):not(:has(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select)),
.elementor .aafe-fs-hide-labels-yes .aafe-fs .aafe-fs-label-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
}

.elementor .aafe-fs-hide-labels-yes .aafe-fs label.aafe-fs-has-control > br {
	display: none;
}

.elementor .aafe-fs .aafe-fs-label-text {
	display: block;
	margin-bottom: inherit;
}

.elementor .aafe-fs-hide-req-yes .aafe-fs :is(.required, .wpforms-required-label, .gfield_required, .ninja-forms-req-symbol, .forminator-required) {
	display: none !important;
}

.elementor .aafe-fs-hide-req-yes .aafe-fs .ff-el-is-required label::after,
.elementor .aafe-fs-hide-req-yes .aafe-fs .ff-el-is-required label::before {
	content: none !important;
}

.elementor .aafe-fs-hide-desc-yes .aafe-fs :is(.wpforms-field-description, .gfield_description:not(.validation_message), .ff-el-help-message, .nf-field-description, .forminator-description) {
	display: none !important;
}

.elementor .aafe-fs :is(.wpforms-field-sublabel, .wpforms-field-description, .ff-el-help-message, .nf-field-description, .forminator-description) {
	margin-top: 5px;
	font-size: 12.5px;
	color: #64748b;
}

/* ---------- Custom select arrow ---------- */
.elementor .aafe-fs-select-yes .aafe-fs:not(.aafe-fs--preset-none) select:not([multiple]) {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 40px;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--aafe-fs-arrow) 50%),
		linear-gradient(135deg, var(--aafe-fs-arrow) 50%, transparent 50%);
	background-position:
		calc(100% - 20px) calc(50% + 1px),
		calc(100% - 15px) calc(50% + 1px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

/* ---------- Custom checkboxes / radios ---------- */
.elementor .aafe-fs-choices-yes .aafe-fs :is(input[type="checkbox"], input[type="radio"]) {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	position: relative;
	display: inline-grid;
	flex: 0 0 auto;
	place-content: center;
	width: var(--aafe-fs-choice);
	height: var(--aafe-fs-choice);
	min-height: 0;
	margin: 0 var(--aafe-fs-choice-gap, 8px) 0 0;
	padding: 0;
	vertical-align: -0.2em;
	background-color: var(--aafe-fs-choice-bg);
	border: 1.5px solid var(--aafe-fs-choice-border);
	border-radius: var(--aafe-fs-choice-radius);
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.elementor .aafe-fs-choices-yes .aafe-fs input[type="radio"] {
	border-radius: 50%;
}

.elementor .aafe-fs-choices-yes .aafe-fs input[type="checkbox"]::before {
	content: "";
	width: calc(var(--aafe-fs-choice) * .55);
	height: calc(var(--aafe-fs-choice) * .55);
	background-color: #fff;
	clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
	transform: scale(0);
	transition: transform .15s ease;
}

.elementor .aafe-fs-choices-yes .aafe-fs input[type="radio"]::before {
	content: "";
	width: calc(var(--aafe-fs-choice) * .45);
	height: calc(var(--aafe-fs-choice) * .45);
	background-color: #fff;
	border-radius: 50%;
	transform: scale(0);
	transition: transform .15s ease;
}

.elementor .aafe-fs-choices-yes .aafe-fs :is(input[type="checkbox"], input[type="radio"]):checked {
	background-color: var(--aafe-fs-choice-on);
	border-color: var(--aafe-fs-choice-on);
}

.elementor .aafe-fs-choices-yes .aafe-fs :is(input[type="checkbox"], input[type="radio"]):checked::before {
	transform: scale(1);
}

.elementor .aafe-fs-choices-yes .aafe-fs :is(input[type="checkbox"], input[type="radio"]):focus-visible {
	box-shadow: 0 0 0 4px var(--aafe-fs-ring);
	outline: none;
}

.elementor .aafe-fs .aafe-fs-choice,
.elementor .aafe-fs .wpcf7-list-item label,
.elementor .aafe-fs .ff-el-form-check-label {
	display: inline-flex;
	align-items: center;
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: #334155;
	cursor: pointer;
}

.elementor .aafe-fs .aafe-fs-options {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.elementor .aafe-fs-choices-inline-yes .aafe-fs :is(.aafe-fs-options, .wpforms-field-checkbox ul, .wpforms-field-radio ul, .gfield_checkbox, .gfield_radio, .wpcf7-checkbox, .wpcf7-radio) {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px 18px;
}

.elementor .aafe-fs-choices-inline-yes .aafe-fs .wpcf7-list-item {
	margin: 0;
}

/* ---------- File upload ---------- */
.elementor .aafe-fs:not(.aafe-fs--preset-none) input[type="file"] {
	display: block;
	width: 100%;
	padding: 10px;
	font-size: 13px;
	color: #64748b;
	background-color: #f8fafc;
	border: 1.5px dashed #cbd5e1;
	border-radius: 10px;
	cursor: pointer;
}

.elementor .aafe-fs input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 8px 14px;
	font: inherit;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

/* ---------- Submit ---------- */
.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(input[type="submit"], button[type="submit"], .wpcf7-submit, .wpforms-submit, .gform_button, .ff-btn-submit, .forminator-button-submit) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	min-height: 48px;
	padding: 13px 30px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: var(--aafe-fs-accent);
	border: 0 solid transparent;
	border-radius: 8px;
	box-shadow: 0 6px 16px -6px var(--aafe-fs-accent);
	cursor: pointer;
	transition: background .25s ease, transform .25s ease, box-shadow .25s ease, color .25s ease;
}

.elementor .aafe-fs-btn-lift-yes .aafe-fs :is(input[type="submit"], button[type="submit"], .wpcf7-submit, .wpforms-submit, .gform_button, .ff-btn-submit, .forminator-button-submit):hover {
	transform: translateY(-2px);
}

.elementor .aafe-fs--btn-full :is(input[type="submit"], button[type="submit"], .wpcf7-submit, .wpforms-submit, .gform_button, .ff-btn-submit, .nf-element[type="button"], .forminator-button-submit) {
	width: 100% !important;
}

.elementor .aafe-fs :is(input[type="submit"], button[type="submit"]):disabled,
.elementor .aafe-fs .wpcf7-form.submitting .wpcf7-submit {
	opacity: .7;
	cursor: progress;
}

/* Multi-step buttons */
.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(.wpforms-page-button, .gform_next_button, .gform_previous_button, .ff-btn-next, .ff-btn-prev, .forminator-button-next, .forminator-button-back) {
	padding: 10px 22px;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

/* ---------- Validation / messages ---------- */
.elementor .aafe-fs :is(.wpcf7-not-valid-tip, em.wpforms-error, label.wpforms-error, .gfield_validation_message, .validation_message, .nf-error-msg, .forminator-error-message) {
	display: block;
	margin-top: 5px;
	font-size: 12.5px;
	font-weight: 500;
	color: #dc2626;
}

.elementor .aafe-fs [aria-invalid="true"],
.elementor .aafe-fs .wpcf7-not-valid {
	border-color: #f87171 !important;
}

.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(.wpcf7-response-output, .wpforms-confirmation-container-full, .gform_confirmation_message, .ff-message-success, .nf-response-msg, .gform_validation_errors, .wpforms-error-container, .nf-form-errors) {
	margin: 18px 0 0;
	padding: 14px 18px;
	font-size: 14px;
	border: 1px solid transparent;
	border-radius: 10px;
}

.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(.wpcf7 form.sent .wpcf7-response-output, .wpforms-confirmation-container-full, .gform_confirmation_message, .ff-message-success, .nf-response-msg) {
	color: #065f46;
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .gform_validation_errors, .wpforms-error-container, .nf-form-errors) {
	color: #991b1b;
	background: #fef2f2;
	border-color: #fecaca;
}

/* ---------- Section headings ---------- */
.elementor .aafe-fs .aafe-fs-section {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
	padding-bottom: 8px;
	border-bottom: 1px solid #e2e8f0;
}

/* ---------- Field spacing defaults ---------- */
.elementor .aafe-fs:not(.aafe-fs--preset-none) :is(.wpcf7-form > p, .aafe-fs-field, .aafe-fs-row) {
	margin: 0 0 18px;
}

.elementor .aafe-fs fieldset.aafe-fs-field {
	min-width: 0;
	padding: 0;
	border: 0;
}

.elementor .aafe-fs .aafe-fs-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.elementor .aafe-fs .aafe-fs-row > .aafe-fs-field {
	margin: 0;
}

.elementor .aafe-fs .wpcf7-form-control-wrap {
	display: block;
}

@media (max-width: 767px) {
	.elementor .aafe-fs .aafe-fs-row {
		grid-template-columns: 1fr;
	}
}

/* =====================================================================
 * Multi-column field grid (any form plugin)
 * JS marks the field list as .aafe-fs-grid and each field as .aafe-fs-cell.
 * Specificity ladder (so each layer beats the one before and the form
 * plugins' own column CSS): cell auto (1,3,0) → full-width helpers (1,3,0,
 * later) → per-field rules from the repeater (2,x,x).
 * ===================================================================== */
.elementor .aafe-fs-grid-yes .aafe-fs .aafe-fs-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--aafe-fs-cols, 2), minmax(0, 1fr));
	column-gap: var(--aafe-fs-col-gap, 18px);
	row-gap: var(--aafe-fs-row-gap, 18px);
	align-items: var(--aafe-fs-grid-align, start);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Demo / custom rows flatten into the grid. */
.elementor .aafe-fs-grid-yes .aafe-fs .aafe-fs-grid > .aafe-fs-row {
	display: contents;
}

.elementor .aafe-fs-grid-yes .aafe-fs .aafe-fs-grid :is(.aafe-fs-cell, #aafe-fs-none) {
	grid-column: auto;
	float: none;
	width: auto;
	min-width: 0;
	max-width: none;
	margin: 0;
	clear: none;
}

/* WPForms column classes / Gravity width classes are replaced by the grid. */
.elementor .aafe-fs-grid-yes .aafe-fs .aafe-fs-grid :is(.wpforms-field.aafe-fs-cell, .gfield.aafe-fs-cell, #aafe-fs-none) {
	padding-left: 0;
	padding-right: 0;
}

/* CF7 hidden inputs: no empty grid row (hidden inputs are still submitted). */
.elementor .aafe-fs-grid-yes .aafe-fs .aafe-fs-grid > .hidden-fields-container {
	display: none;
}

/* Things that always take a whole row. */
.elementor .aafe-fs-grid-yes .aafe-fs .aafe-fs-grid > :is(.wpcf7-response-output, .hidden-fields-container, .aafe-fs-section, .wpforms-field-divider, .wpforms-field-html, .wpforms-field-pagebreak, .gsection, .gfield--type-section, .gfield--type-page, .ff-el-section-break, .ff-step-header, .ff-el-progress, .forminator-response-message, .forminator-pagination, .wpforms-confirmation-container-full, .ff-message-success, .nf-form-errors, .gform_validation_errors, #aafe-fs-none) {
	grid-column: 1 / -1;
}

.elementor .aafe-fs-grid-yes.aafe-fs-full-textarea-yes .aafe-fs .aafe-fs-grid > :is(.aafe-fs-cell:has(textarea), #aafe-fs-none),
.elementor .aafe-fs-grid-yes.aafe-fs-full-choices-yes .aafe-fs .aafe-fs-grid > :is(.aafe-fs-cell:has(input[type="checkbox"], input[type="radio"]), #aafe-fs-none),
.elementor .aafe-fs-grid-yes.aafe-fs-full-file-yes .aafe-fs .aafe-fs-grid > :is(.aafe-fs-cell:has(input[type="file"], .wpforms-uploader, .gform_drop_area), #aafe-fs-none),
.elementor .aafe-fs-grid-yes.aafe-fs-full-submit-yes .aafe-fs .aafe-fs-grid > :is(.aafe-fs-cell:has(input[type="submit"], button[type="submit"], .wpcf7-submit, .ff-btn-submit, .forminator-button-submit), .ff_submit_btn_wrapper, #aafe-fs-none) {
	grid-column: 1 / -1;
}

/* =====================================================================
 * Label beside the field
 * ===================================================================== */
.elementor .aafe-fs-label-left .aafe-fs :is(.wpforms-field, .gfield, .ff-el-group, .forminator-field, .aafe-fs-field):not(fieldset):has(> :is(label, .gfield_label, .wpforms-field-label, .ff-el-input--label, .forminator-label):not(.aafe-fs-choice)) {
	display: grid;
	grid-template-columns: var(--aafe-fs-label-w, 30%) minmax(0, 1fr);
	column-gap: 16px;
	align-items: center;
}

.elementor .aafe-fs-label-left .aafe-fs :is(.wpforms-field, .gfield, .ff-el-group, .forminator-field, .aafe-fs-field):not(fieldset) > * {
	grid-column: 2;
}

.elementor .aafe-fs-label-left .aafe-fs :is(.wpforms-field, .gfield, .ff-el-group, .forminator-field, .aafe-fs-field):not(fieldset) > :is(label, .gfield_label, .wpforms-field-label, .ff-el-input--label, .forminator-label):not(.aafe-fs-choice) {
	grid-column: 1;
	margin: 0 !important;
}

/* Contact Form 7: the input lives inside the label. */
.elementor .aafe-fs-label-left .aafe-fs label.aafe-fs-has-control {
	display: grid !important;
	grid-template-columns: var(--aafe-fs-label-w, 30%) minmax(0, 1fr);
	column-gap: 16px;
	align-items: center;
}

.elementor .aafe-fs-label-left .aafe-fs label.aafe-fs-has-control > br {
	display: none;
}

.elementor .aafe-fs-label-left .aafe-fs label.aafe-fs-has-control > .aafe-fs-label-text {
	grid-column: 1;
	margin: 0;
}

.elementor .aafe-fs-label-left .aafe-fs label.aafe-fs-has-control > :not(.aafe-fs-label-text) {
	grid-column: 2;
}

@media (max-width: 767px) {
	.elementor .aafe-fs-label-left .aafe-fs :is(.wpforms-field, .gfield, .ff-el-group, .forminator-field, .aafe-fs-field, label.aafe-fs-has-control) {
		display: block !important;
	}

	.elementor .aafe-fs-label-left .aafe-fs :is(label, .gfield_label, .wpforms-field-label, .ff-el-input--label, .forminator-label, .aafe-fs-label-text):not(.aafe-fs-choice) {
		margin-bottom: 7px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elementor .aafe-fs * {
		transition-duration: 1ms !important;
	}
}

/* Form fields: keep Theme Style form-field typography out (kit selectors are 0,3,1 / 0,4,1). */
.elementor .elementor-widget-aafe_form_styler .aafe-fs:where(.aafe-fs--preset-none) :is(input, textarea, select):not([type="button"]):not([type="submit"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
}

.elementor .elementor-widget-aafe_form_styler .aafe-fs input:is([type="file"], [type="checkbox"], [type="radio"]) {
	font-family: inherit;
}
