/* =============================================================== */
/* Forms and the Request a Consultation layout  (Figma 1:1170)     */
/* Loaded only on pages with a Gravity Forms block (functions.php).*/
/* Gravity Forms' "Orbital" theme is restyled through its own CSS  */
/* variables first, then direct rules where a variable does not    */
/* exist. Field spec (Figma 1:195): label Inter Medium 16/24, 12 px */
/* gap, 64 px control, 8 px radius, 1 px Line border, 16 px side   */
/* padding, 18/28 value text, placeholder in Steel.                */
/* =============================================================== */

/* ------------------------- Page layout ------------------------- */
/* 120 px above and below, 40 px under the heading; form card 800 and a 400 px column, 80 px apart. */
.mba-section.mba-inquiry .mba-section__inner { display: flex; flex-direction: column; gap: 40px; }
.mba-inquiry h2 { margin: 0; }
.mba-inquiry__layout { align-items: start; display: grid; gap: 80px; grid-template-columns: minmax(0, 800fr) minmax(0, 400fr); }
.mba-inquiry__layout > * { margin: 0; }
.mba-form-card {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--md);
	padding: 32px;
}
.mba-form-card > * { margin: 0; }

.mba-inquiry__aside { display: flex; flex-direction: column; gap: 32px; }
.mba-inquiry__aside > * { margin: 0; }
.mba-aside-card.has-background { border-radius: var(--wp--custom--radius--md); display: flex; flex-direction: column; gap: 24px; padding: 32px; }
.mba-aside-card > * { margin: 0; }
.mba-aside-talk { display: flex; flex-direction: column; gap: 16px; }
.mba-aside-talk > * { margin: 0; }
/* Figma shows the phone numbers bold in Slate. Slate against Ink body text is under 3:1, so they also get an underline. */
.mba-aside-talk a { color: var(--wp--preset--color--slate); text-decoration: underline; text-underline-offset: 3px; }
.mba-aside-talk a:is(:hover, :focus-visible) { color: var(--wp--preset--color--ink); }

/* ---------------------- Gravity Forms: variables ---------------------- */
.mba-consultation-form_wrapper.gform_wrapper {
	--gf-form-gap-x: 32px;
	--gf-form-gap-y: 32px;
	--gf-ctrl-size: 64px;
	--gf-ctrl-radius: 8px;
	--gf-ctrl-border-color: var(--wp--preset--color--line);
	--gf-ctrl-bg-color: var(--wp--preset--color--white);
	--gf-ctrl-color: var(--wp--preset--color--ink);
	--gf-ctrl-padding-x: 16px;
	--gf-ctrl-font-size: 18px;
	--gf-ctrl-placeholder-color: var(--wp--preset--color--steel);
	--gf-ctrl-label-color-primary: var(--wp--preset--color--ink);
	--gf-ctrl-label-font-size-primary: 16px;
	--gf-ctrl-label-font-weight-primary: 500;
	--gf-ctrl-desc-color: var(--wp--preset--color--steel);
	--gf-ctrl-desc-font-size: 14px;
	--gf-color-danger: #b42318; /* error red (not drawn in Figma; 6.5:1 on white) */
	/* Submit button: the framework reads its colors, size and radius from these variables. */
	--gf-ctrl-btn-bg-color-primary: var(--wp--custom--button--primary--bg);
	--gf-ctrl-btn-bg-color-hover-primary: var(--wp--custom--button--primary--bg-hover);
	--gf-ctrl-btn-bg-color-focus-primary: var(--wp--custom--button--primary--bg);
	--gf-ctrl-btn-color-primary: var(--wp--custom--button--primary--label);
	--gf-ctrl-btn-color-hover-primary: var(--wp--custom--button--primary--label);
	--gf-ctrl-btn-color-focus-primary: var(--wp--custom--button--primary--label);
	--gf-ctrl-btn-font-size: 16px;
	--gf-ctrl-btn-font-weight: 500;
	--gf-ctrl-btn-radius: 10px;
	--gf-ctrl-btn-size: 52px;
	font-family: var(--wp--preset--font-family--inter);
	margin: 0;
}
.mba-consultation-form_wrapper .gform_heading { margin: 0; }
.mba-consultation-form_wrapper .gform_required_legend {
	color: var(--wp--preset--color--steel);
	font-size: 14px;
	line-height: 22px;
	margin: 0 0 32px;
}
.mba-consultation-form_wrapper .gform_required_legend .gfield_required { color: inherit; }
/* minmax(0, 1fr): the framework's plain 1fr tracks cannot shrink below an input's natural width, which overflowed the card on phones. */
.mba-consultation-form_wrapper .gform_fields { column-gap: 32px; grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 32px; }
.mba-consultation-form_wrapper .gform_fields > .gfield { min-inline-size: 0; }

/* ---------------------------- Labels ---------------------------- */
.mba-consultation-form_wrapper .gfield_label,
.mba-consultation-form_wrapper .gform-field-label:not(.gform-field-label--type-inline) {
	color: var(--wp--preset--color--ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	margin: 0 0 12px;
	padding: 0;
}
.mba-consultation-form_wrapper .gfield_required { color: inherit; font-size: inherit; font-style: normal; margin-inline-start: 0.2em; }
.mba-consultation-form_wrapper .ginput_container { margin: 0; }

/* ------------------------ Text controls ------------------------ */
.mba-consultation-form_wrapper :is(input[type="text"], input[type="email"], input[type="tel"], textarea).large {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	box-shadow: none;
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--inter);
	font-size: 18px;
	font-weight: 400;
	inline-size: 100%;
	line-height: 28px;
	padding: 0 16px;
}
.mba-consultation-form_wrapper :is(input[type="text"], input[type="email"], input[type="tel"]).large { block-size: 64px; min-block-size: 64px; }
/* Gravity's Orbital rules for textarea and the submit button are more specific than a class selector, so these use the wrapper plus
   the theme classes (and !important on the two sizes it sets with variables). */
.gform_wrapper.gform-theme.mba-consultation-form_wrapper textarea.large { block-size: 160px !important; min-block-size: 160px !important; padding: 16px; resize: vertical; }
.mba-consultation-form_wrapper ::placeholder { color: var(--wp--preset--color--steel); opacity: 1; }
.mba-consultation-form_wrapper :is(input[type="text"], input[type="email"], input[type="tel"], textarea).large:focus {
	border-color: var(--wp--preset--color--slate);
	box-shadow: 0 0 0 1px var(--wp--preset--color--slate);
	outline: 0;
}

/* ---------------------- Services checkboxes ---------------------- */
/* Title 18/30 bold, "Select all that apply." 14/22, then two columns (32 px apart) of 48 px rows 12 px apart. */
.mba-consultation-form_wrapper .mba-services-field { border: 0; margin: 0; min-inline-size: 0; padding: 0; }
.mba-consultation-form_wrapper .mba-services-field > legend.gfield_label { font-size: 18px; font-weight: 700; line-height: 30px; margin: 0 0 12px; padding: 0; }
.mba-consultation-form_wrapper .mba-services-field .gfield_description { color: var(--wp--preset--color--steel); font-size: 14px; line-height: 22px; margin: 0 0 12px; padding: 0; }
.mba-consultation-form_wrapper .mba-services-field .gfield_checkbox { column-gap: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
.mba-consultation-form_wrapper .mba-services-field .gchoice { align-items: center; display: flex; gap: 12px; margin: 0; min-block-size: 48px; }
.mba-consultation-form_wrapper .mba-services-field .gchoice label {
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	font-size: 18px;
	font-weight: 400;
	line-height: 28px;
	margin: 0;
	max-inline-size: none;
}
.mba-consultation-form_wrapper .mba-services-field input[type="checkbox"] {
	appearance: none;
	background-color: var(--wp--preset--color--white);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 16px 16px;
	block-size: 24px;
	border: 1px solid var(--wp--preset--color--steel);
	border-radius: 4px;
	box-shadow: none;
	flex: none;
	inline-size: 24px;
	margin: 0;
	min-block-size: 24px;
	min-inline-size: 24px;
	padding: 0;
}
/* Checked state is not drawn in Figma ("unchecked, checked, and focus states" are listed); Ink fill with a white tick is inferred. */
.mba-consultation-form_wrapper .mba-services-field input[type="checkbox"]:checked {
	background-color: var(--wp--preset--color--ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E");
	border-color: var(--wp--preset--color--ink);
}
.mba-consultation-form_wrapper .mba-services-field input[type="checkbox"]:focus-visible {
	box-shadow: 0 0 0 2px var(--wp--preset--color--white), 0 0 0 4px var(--wp--preset--color--slate);
	outline: 0;
}

/* ------------------------------ Notes ------------------------------ */
.mba-consultation-form_wrapper .mba-form-note { color: var(--wp--preset--color--steel); font-size: 14px; line-height: 22px; margin: 0; }
.mba-consultation-form_wrapper .mba-form-note + .mba-form-note { margin-top: 8px; }
.mba-consultation-form_wrapper .mba-form-note a { color: var(--wp--preset--color--slate); text-decoration: underline; text-underline-offset: 3px; }
.mba-consultation-form_wrapper .mba-form-note a:is(:hover, :focus-visible) { color: var(--wp--preset--color--ink); }

/* ------------------------------ Button ------------------------------ */
/* Primary button: 260 x 52, Ink, white Inter Medium 16 (same as the theme's primary button). */
.mba-consultation-form_wrapper .gform_footer { margin: 32px 0 0; padding: 0; }
.gform_wrapper.gform-theme.mba-consultation-form_wrapper .gform_footer .gform_button {
	/* The framework sizes the button with its own local variables at a higher priority, so the size and type are forced here. */
	align-items: center;
	block-size: 52px !important;
	border: 0;
	box-shadow: none;
	cursor: pointer;
	display: inline-flex;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 16px !important;
	font-weight: 500;
	inline-size: 260px !important;
	justify-content: center;
	line-height: 24px !important;
	margin: 0;
	padding: 14px 16px !important;
	transition: background-color var(--wp--custom--motion--fast);
}
.gform_wrapper.gform-theme.mba-consultation-form_wrapper .gform_footer .gform_button:active { background-color: var(--wp--custom--button--primary--bg-pressed); }

/* ------------------------------ Errors ------------------------------ */
/* Inferred (Figma lists an error state but does not draw it): red border, message under the field, never color alone. */
.mba-consultation-form_wrapper .gfield_error :is(input, textarea).large { border-color: #b42318; box-shadow: 0 0 0 1px #b42318; }
.mba-consultation-form_wrapper .gfield_validation_message,
.mba-consultation-form_wrapper .validation_message {
	background: none;
	border: 0;
	color: #b42318;
	font-size: 14px;
	font-weight: 500;
	line-height: 22px;
	margin: 8px 0 0;
	padding: 0;
}
.mba-consultation-form_wrapper .gform_validation_errors { border-radius: 8px; margin: 0 0 32px; }

/* --------------------------- Tablet and mobile --------------------------- */
@media (max-width: 1023px) {
	.mba-inquiry__layout { gap: 48px; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.mba-form-card { padding: 24px; }
	.mba-aside-card.has-background { padding: 24px; }
	.mba-consultation-form_wrapper .mba-services-field .gfield_checkbox { grid-template-columns: minmax(0, 1fr); }
	.gform_wrapper.gform-theme.mba-consultation-form_wrapper .gform_footer .gform_button { inline-size: 100% !important; }
	.mba-consultation-form_wrapper .gform_fields { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
	.mba-consultation-form_wrapper .gform_fields > .gfield { grid-column: 1 / -1 !important; } /* one column on phones */
}
