/*
 * Gravity Forms 3 renders the submit, next and previous controls as <button> instead of <input>.
 * The theme (astra/namb/dist/css/style.css) and Gravity Forms' legacy stylesheet only style the old
 * <input type="submit">, so these are the same rules applied to the new button. Each selector has the
 * same strength as the rule it copies (:where() adds none), so the rules still win and lose against
 * each other and against page-builder styles exactly as they did on the old input.
 */

/* astra/namb/dist/css/style.css: input[type=submit], input[type=button] */
:where(.gform_wrapper) button.gform_button,
:where(.gform_wrapper) button.gform_next_button,
:where(.gform_wrapper) button.gform_previous_button {
	width: auto;
	font-size: 1rem;
	border-radius: 0;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	text-transform: uppercase;
	padding: 11px 20px 13px;
	background-color: #579cd0;
	border: 3px solid #579cd0;
	color: #fff;
	transition: all .2s ease-out;
}

:where(.gform_wrapper) button.gform_button:hover,
:where(.gform_wrapper) button.gform_next_button:hover,
:where(.gform_wrapper) button.gform_previous_button:hover {
	background-color: #fff;
	box-shadow: none;
	color: #579cd0;
	border-color: #579cd0;
}

.inline-form div.gform_wrapper button.gform_button {
	width: auto;
}

.single-events .resource-newsletter form button.gform_button,
.single-news .resource-newsletter form button.gform_button,
.single-podcasts .resource-newsletter form button.gform_button,
.single-resource .resource-newsletter form button.gform_button,
.single-story .resource-newsletter form button.gform_button {
	width: 100%;
	max-width: 175px;
	float: left;
	height: 3rem;
	line-height: 1;
}

/* gravityforms/legacy/css/formsmain.css: .gform_footer input[type=submit] and .gform_page_footer inputs */
.gform_legacy_markup_wrapper .gform_footer button.gform_button,
.gform_legacy_markup_wrapper .gform_page_footer button.gform_button,
.gform_legacy_markup_wrapper .gform_page_footer button.gform_next_button,
.gform_legacy_markup_wrapper .gform_page_footer button.gform_previous_button {
	font-size: 1em;
	width: 100%;
	margin: 0 0 16px 0;
}

@media only screen and (min-width: 641px) {
	.gform_legacy_markup_wrapper .gform_footer button.gform_button,
	.gform_legacy_markup_wrapper .gform_page_footer button.gform_button,
	.gform_legacy_markup_wrapper .gform_page_footer button.gform_next_button,
	.gform_legacy_markup_wrapper .gform_page_footer button.gform_previous_button {
		display: inline-block;
		font-size: 1em;
		width: auto;
		margin: 0 16px 0 0;
	}
}

/* Phone-width inputs get line-height 2: gravityforms/legacy/css/formsmain.css (legacy markup) and
   gravityforms/assets/css/dist/basic.css (newer markup). Same selector strength as those rules. */
@media only screen and (max-width: 641px) {
	.gform_legacy_markup_wrapper button:is(.gform_button, .gform_next_button, .gform_previous_button):not([type=radio]):not([type=checkbox]):not([type=image]) {
		line-height: 2;
		min-height: 2rem;
	}

	.gform_wrapper.gravity-theme button:is(.gform_button, .gform_next_button, .gform_previous_button):not([type=radio]):not([type=checkbox]):not([type=image]) {
		line-height: 2;
		min-height: 32px;
	}
}
