/* Autogalini Form Fix - scoped to the Ninja Forms request-a-quote form */

/* ---- 1. Form takes 100% of the available space -------------------- */
.nf-form-cont,
.nf-form-wrap,
.nf-form-layout,
.nf-form-layout > form,
.nf-form-content,
.nf-form-cont nf-section,
.nf-form-cont .nf-row,
.nf-form-cont .nf-cell {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	float: none !important;
	box-sizing: border-box !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.nf-form-cont {
	display: block !important;
	clear: both;
}
.nf-form-cont nf-section,
.nf-form-cont nf-fields-wrap,
.nf-form-cont nf-field {
	display: block;
}
.nf-form-cont .nf-row {
	display: block !important;
}
.nf-form-cont .nf-cell {
	padding: 0 !important;
}

/* ---- 2. Every field/label/input is full width ---------------------- */
.nf-form-cont .nf-field-container {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	clear: both;
	margin: 0 0 16px 0 !important;
	box-sizing: border-box;
}
.nf-form-cont .nf-field-label,
.nf-form-cont .nf-field-element,
.nf-form-cont .nf-field-description {
	display: block !important;
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
}
.nf-form-cont .nf-field-label {
	margin: 0 0 6px 0 !important;
}
.nf-form-cont .nf-field-label label {
	display: block;
	margin: 0;
	line-height: 1.3;
}
.nf-form-cont .nf-field-element > div,
.nf-form-cont .nf-field-element .ninja-forms-field-wrap {
	width: 100% !important;
	max-width: 100% !important;
}

.nf-form-cont .nf-field-element input[type="text"],
.nf-form-cont .nf-field-element input[type="email"],
.nf-form-cont .nf-field-element input[type="tel"],
.nf-form-cont .nf-field-element input[type="number"],
.nf-form-cont .nf-field-element input[type="date"],
.nf-form-cont .nf-field-element input[type="time"],
.nf-form-cont .nf-field-element input.pikaday__display,
.nf-form-cont .nf-field-element input.flatpickr-input,
.nf-form-cont .nf-field-element select,
.nf-form-cont .nf-field-element textarea {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	margin: 0 !important;
}
.nf-form-cont .nf-field-element input[type="text"],
.nf-form-cont .nf-field-element input[type="email"],
.nf-form-cont .nf-field-element input[type="tel"],
.nf-form-cont .nf-field-element input[type="number"],
.nf-form-cont .nf-field-element input[type="date"],
.nf-form-cont .nf-field-element input[type="time"],
.nf-form-cont .nf-field-element input.pikaday__display,
.nf-form-cont .nf-field-element input.flatpickr-input,
.nf-form-cont .nf-field-element select {
	height: 44px !important;
	line-height: 1.2;
	padding: 6px 10px !important;
}
.nf-form-cont .nf-field-element textarea {
	min-height: 120px;
	height: auto !important;
	padding: 10px !important;
	resize: vertical;
}
.nf-form-cont .nf-field-element select {
	/* keeps the arrow inside the box on Safari/Chrome */
	text-overflow: ellipsis;
}

/* ---- 3. Date + Time on the same line ------------------------------- */
/* .ag-flex / .ag-date / .ag-time are added by form-fix.js */
.nf-form-cont .ag-flex {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	-webkit-box-align: start;
	-ms-flex-align: start;
	align-items: flex-start;
	margin-left: -6px;
	margin-right: -6px;
	width: auto;
}
.nf-form-cont .ag-flex > nf-field {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	padding: 0 6px;
	width: 100%;
	min-width: 0;
}
.nf-form-cont .ag-flex > nf-field.ag-date {
	width: 58%;
}
.nf-form-cont .ag-flex > nf-field.ag-time {
	width: 42%;
}
/* if the fields are not custom elements (other Ninja Forms builds) */
.nf-form-cont .ag-flex > .ag-date { width: 58%; }
.nf-form-cont .ag-flex > .ag-time { width: 42%; }

/* ---- 4. Submit button --------------------------------------------- */
.nf-form-cont .submit-container .nf-field-element,
.nf-form-cont .submit-container input[type="submit"],
.nf-form-cont .submit-container input[type="button"] {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
}

/* ---- 5. reCAPTCHA must never overflow ------------------------------ */
.nf-form-cont .g-recaptcha,
.nf-form-cont .nf-field-element .g-recaptcha {
	max-width: 100%;
	overflow: visible;
}
.nf-form-cont .recaptcha-container {
	max-width: 100%;
	overflow: hidden;
}

/* ---- 6. Messages ---------------------------------------------------- */
.nf-form-cont .nf-error-msg,
.nf-form-cont .nf-form-errors,
.nf-form-cont .nf-response-msg {
	width: 100%;
	box-sizing: border-box;
}
.nf-form-cont .nf-form-fields-required {
	margin-bottom: 14px;
}

/* ---- 7. Date picker popup sits above the theme --------------------- */
.pika-single,
.flatpickr-calendar {
	z-index: 99999 !important;
}

/* ---- 8. Generic rules (form detected by form-fix.js, any form plugin) ---- */
.ag-form,
.ag-form-wrap {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	box-sizing: border-box !important;
}
.ag-form label {
	display: block;
}
/* custom select replacements used by many themes */
.ag-form .nice-select,
.ag-form .select2-container,
.ag-form .chosen-container,
.ag-form .selectric-wrapper,
.ag-form .bootstrap-select {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
}
.ag-form input[type="submit"],
.ag-form button[type="submit"] {
	max-width: 100%;
	box-sizing: border-box;
}


/* ---- 13. The title block always keeps room below it (min 20px) ---- */
.nf-form-title {
	margin-bottom: 20px !important;
	overflow: visible !important;
	height: auto !important;
}
