/**
 * #.# Styles
 *
 * CSS for both Frontend+Backend.
 */
.wp-block-uagb-cf7-styler {
	// We need this particular block to maintain consistent input field height across WP Editor and Frontend.
	// And also because the min-height and line-height in the WP Editor were inherited from core WordPress directory: wp-admin/forms.css.
	// All the selectors here are also copied from wp-admin/forms.css.
	input[type="text"],
	input[type="password"],
	input[type="date"],
	input[type="datetime"],
	input[type="datetime-local"],
	input[type="email"],
	input[type="month"],
	input[type="number"],
	input[type="search"],
	input[type="tel"],
	input[type="time"],
	input[type="url"],
	input[type="week"] {
		min-height: 30px;
		line-height: 30px;
	}

	textarea {
		resize: vertical;
	}

	.wpcf7 *,
	.wpcf7 ::after,
	.wpcf7 ::before {
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}

	span.wpcf7-list-item-label::before,
	span.wpcf7-list-item-label::after {
		content: " ";
	}

	.wpcf7-acceptance input[type="checkbox"] + span::before,
	.wpcf7-checkbox input[type="checkbox"] + span::before,
	.wpcf7-radio input[type="radio"] + span::before {
		display: inline-block;
		vertical-align: middle;
		width: 15px;
		height: 15px;
		margin-right: 10px;
		border-color: #eaeaea;
		border-style: solid;
		border-width: 1px 1px 1px 1px;
		text-align: center;
		content: "";
	}

	span.wpcf7-list-item {
		display: inline-block;
		margin: 0 1em 0 0;
	}

	.wpcf7-acceptance input[type="checkbox"]:checked + span::before,
	.wpcf7-checkbox input[type="checkbox"]:checked + span::before {
		line-height: 1.2;
		content: "\2714";
	}

	.wpcf7-acceptance input[type="checkbox"] + span::before,
	.wpcf7-acceptance input[type="checkbox"]:checked + span::before,
	.wpcf7-checkbox input[type="checkbox"] + span::before,
	.wpcf7-checkbox input[type="checkbox"]:checked + span::before,
	.wpcf7-radio input[type="radio"] + span::before {
		-webkit-box-sizing: content-box;
		-moz-box-sizing: content-box;
		box-sizing: content-box;
	}

	input[type="checkbox"]:checked + span::before {
		font-size: -webkit-calc(12px / 1.2);
		font-size: calc(12px / 1.2);
	}

	.wpcf7-radio input[type="radio"] + span::before {
		-webkit-border-radius: 100%;
		border-radius: 100%;
	}

	.uagb-cf7-styler__field-style-box .wpcf7-radio input[type="radio"]:checked + span::before,
	.uagb-cf7-styler__field-style-underline .wpcf7-radio input[type="radio"]:checked + span::before {
		box-shadow: inset 0 0 0 4px #fafafa;
		background-color: #545454;
	}

	/* Submit button */
	.uagb-cf7-styler__btn-align-justify input.wpcf7-form-control.wpcf7-submit,
	.uagb-cf7-styler__btn-align-left input.wpcf7-form-control.wpcf7-submit,
	.uagb-cf7-styler__btn-align-right input.wpcf7-form-control.wpcf7-submit,
	.uagb-cf7-styler__btn-align-center input.wpcf7-form-control.wpcf7-submit {
		display: -webkit-box;
		display: -ms-flexbox;
		display: -webkit-flex;
		display: -moz-box;
		display: flex;
		width: auto;
		padding: 10px 25px;
		background: transparent;
		border-color: #333;
		border-width: 1px;
		line-height: 16px;
		-js-display: flex;
	}

	.wpcf7 input[type="checkbox"],
	.wpcf7 input[type="radio"] {
		display: none;
	}

	.wpcf7 select {
		height: auto;
		padding: 10px;
		-webkit-appearance: menulist-button;
		-moz-appearance: menulist-button;
	}

	select.wpcf7-form-control.wpcf7-select[multiple="multiple"] {
		padding: 0;
	}

	.wpcf7 select option {
		padding: 10px;
	}

	/* Form validation */
	.uagb-cf7-styler__highlight-style-bottom_right span.wpcf7-not-valid-tip {
		display: block;
		padding: 0.1em 0.5em;
		margin-top: 5px;
		border-radius: 2px;
		font-size: 0.9em;
		-webkit-border-radius: 2px;
		width: fit-content;
		margin-left: auto;
		margin-right: 0;
	}

	.wpcf7 input[type="number"] {
		height: auto;
	}

	.wpcf7 input.wpcf7-date {
		-webkit-appearance: none;
	}

	.wpcf7-spinner {
		margin-top: 25px;
	}
}

@media ( min-width: 769px ) {
	.wp-block-uagb-cf7-styler {
		.uagb-cf7_styler-col {
			& > p {
				-js-display: flex;
				display: -webkit-box;
				display: -webkit-flex;
				display: -moz-box;
				display: -ms-flexbox;
				display: flex;
				flex-wrap: wrap;
				width: 100%;
			}
		}

		.uagb-cf7_styler-col label,
		.uagb-cf7_styler-col > p > span {
			-webkit-box-flex: 1;
			-webkit-flex-grow: 1;
			-moz-box-flex: 1;
			-ms-flex-positive: 1;
			flex: 1;
			flex-grow: 1;
		}

		.uagb-cf7_styler-col br {
			display: none;
		}

		.uagb-cf7_styler-col > p > span.uagb-cf7_styler-col-1 {
			padding-right: 15px;
			padding-left: 0;
		}

		.uagb-cf7_styler-col > p > span.uagb-cf7_styler-col-3 {
			padding-right: 0;
			padding-left: 15px;
		}

		.wpcf7 .uagb-cf7_styler-col span.wpcf7-form-control-wrap {
			height: 100%;
		}

		.wpcf7 .uagb-cf7_styler-col select {
			height: 100%;
		}
	}
}

@media ( min-width: 780px ) {
	.uagb-cf7-styler__btn-align-right input.wpcf7-form-control.wpcf7-submit {
		margin-right: 0;
		margin-left: auto;
	}

	.uagb-cf7-styler__btn-align-left input.wpcf7-form-control.wpcf7-submit {
		margin-right: auto;
		margin-left: 0;
	}

	.uagb-cf7-styler__btn-align-center input.wpcf7-form-control.wpcf7-submit {
		margin-right: auto;
		margin-left: auto;
	}

	.uagb-cf7-styler__btn-align-justify input.wpcf7-form-control.wpcf7-submit {
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		-webkit-justify-content: center;
		-moz-box-pack: center;
		justify-content: center;
		width: 100% !important;
	}
}

@media ( max-width: 780px ) {
	.uagb-cf7-styler__btn-align-tablet-right input.wpcf7-form-control.wpcf7-submit {
		margin-right: 0;
		margin-left: auto;
	}

	.uagb-cf7-styler__btn-align-tablet-left input.wpcf7-form-control.wpcf7-submit {
		margin-right: auto;
		margin-left: 0;
	}

	.uagb-cf7-styler__btn-align-tablet-center input.wpcf7-form-control.wpcf7-submit {
		margin-right: auto;
		margin-left: auto;
	}
}

@media ( min-width: 641px ) and ( max-width: 780px ) {
	.uagb-cf7-styler__btn-align-tablet-justify input.wpcf7-form-control.wpcf7-submit {
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		-webkit-justify-content: center;
		-moz-box-pack: center;
		justify-content: center;
		width: 100% !important;
	}
}

@media ( max-width: 641px ) {
	.uagb-cf7-styler__btn-align-mobile-right input.wpcf7-form-control.wpcf7-submit {
		margin-right: 0;
		margin-left: auto;
	}

	.uagb-cf7-styler__btn-align-mobile-left input.wpcf7-form-control.wpcf7-submit {
		margin-right: auto;
		margin-left: 0;
	}

	.uagb-cf7-styler__btn-align-mobile-center input.wpcf7-form-control.wpcf7-submit {
		margin-right: auto;
		margin-left: auto;
	}

	.uagb-cf7-styler__btn-align-mobile-justify input.wpcf7-form-control.wpcf7-submit {
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		-webkit-justify-content: center;
		-moz-box-pack: center;
		justify-content: center;
		width: 100% !important;
	}
}
