/*
 * Gravity Forms — global theme matching the site's design system. Scoped to
 * .gform_wrapper so it applies to every Gravity Form on the site (Orbital
 * theme markup), not just the homepage contact form.
 */

.gform_wrapper .gform_fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 18px;
	row-gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * Gravity Forms' own CSS (Orbital theme) sets conflicting display/alignment
 * on .gfield with equal-or-higher specificity, which was leaving the field
 * content bottom-aligned inside our taller box. !important is used here
 * (and below) deliberately to win against a third-party plugin's own
 * styling, which we don't control and can't reliably out-specificity.
 */
.gform_wrapper .gfield {
	margin: 0 !important;
	min-height: 70px;
	padding: 10px 20px !important;
	background: var(--wp--preset--color--tertiary-light);
	border-radius: 22px;
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
	gap: 2px;
}

/* Neutralize Gravity Forms' own spacing on the label/input wrapper so our
   justify-content: center on .gfield actually centers the group. */
.gform_wrapper .gfield_label,
.gform_wrapper .ginput_container {
	margin: 0 !important;
	flex: 0 0 auto !important;
}

.gform_wrapper .gfield--width-full,
.gform_wrapper .gfield--type-textarea {
	grid-column: 1 / -1;
	min-height: 130px;
}

/* Our .gfield rule above (flex + background, !important) overrides Gravity
   Forms' own display:none on hidden fields — keep them actually hidden. */
.gform_wrapper .gform_hidden,
.gform_wrapper .gfield--type-hidden {
	display: none !important;
}

.gform_wrapper .gfield--type-consent,
.gform_wrapper .gfield--type-checkbox {
	min-height: 0;
	padding: 4px 0 0;
	background: transparent;
	border-radius: 0;
	grid-column: 1 / -1;
}

.gform_wrapper .gfield_required {
	color: rgba(22, 22, 74, 0.45);
}

.gform_wrapper input[type="text"].large,
.gform_wrapper input[type="email"].large,
.gform_wrapper input[type="tel"].large,
.gform_wrapper input[type="number"].large,
.gform_wrapper textarea.textarea,
.gform_wrapper select.large {
	width: 100%;
	padding: 0;
	margin: 0;
	background: transparent;
	border: none;
	box-shadow: none;
	font-family: var(--wp--preset--font-family--inter);
	color: var(--wp--preset--color--primary-dark);
	outline: none;
}

.gform_wrapper input[type="text"]::placeholder,
.gform_wrapper input[type="email"]::placeholder,
.gform_wrapper input[type="tel"]::placeholder,
.gform_wrapper textarea::placeholder {
	color: rgba(22, 22, 74, 0.35);
}

.gform_wrapper textarea {
	resize: none;
	min-height: 60px;
}

.gform_wrapper .ginput_container_consent,
.gform_wrapper .gchoice {
	display: flex !important;
	align-items: flex-start !important;
	gap: 10px !important;
}

.gform_wrapper .ginput_container_consent label,
.gform_wrapper .gchoice label {
	margin: 0;
	color: var(--wp--preset--color--primary-dark);
}

.gform_wrapper .ginput_container_consent label a,
.gform_wrapper .gchoice label a {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-decoration: none;
}

.gform_wrapper input[type="checkbox"] {
	appearance: none;
	width: 22px;
	height: 22px;
	min-width: 22px;
	margin: 2px 10px 0 0 !important;
	border-radius: 999px;
	border: 1px solid rgba(22, 22, 74, 0.3);
	background: transparent;
	cursor: pointer;
	position: relative;
}

.gform_wrapper input[type="checkbox"]:checked {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.gform_wrapper input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 5px;
	height: 10px;
	border: solid var(--wp--preset--color--white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.gform_wrapper .gform_footer,
.gform_wrapper .gform-footer {
	margin: 8px 0 0;
	padding: 0;
}

/* Gravity Forms uses two different button classes depending on the field
   type: .gform_button (footer submit) and .gform-button (inline submit
   field, e.g. a single-row email + submit form). Cover both. */
.gform_wrapper .gform_button,
.gform_wrapper .gform-button {
	width: 100%;
	padding: 18px 40px;
	border: none !important;
	border-radius: 1000px !important;
	background: var(--wp--preset--color--secondary) !important;
	color: var(--wp--preset--color--primary-dark) !important;
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.gform_wrapper .gform_button:hover,
.gform_wrapper .gform-button:hover {
	background: #FFC933 !important;
	transform: translateY(-1px);
}

/* The inline submit field is just a wrapper for the button, not a real
   input field — it shouldn't get the gray field-box treatment. */
.gform_wrapper .gfield--type-submit {
	background: transparent !important;
	padding: 0 !important;
	min-height: 0 !important;
	justify-content: center !important;
}

.gform_wrapper .validation_message,
.gform_wrapper .gform_validation_errors {
	margin-top: 8px;
}

@media (max-width: 600px) {
	.gform_wrapper .gform_fields {
		grid-template-columns: 1fr;
	}
}
