/* Level Leads: minimal layout; colours and type come from the theme (theme.json presets). */
.lvl-lead__switch {
	margin-bottom: var(--wp--preset--spacing--30, 1rem);
	font-size: var(--wp--preset--font-size--body-small, 0.875rem);
}

.lvl-lead__switch a {
	font-weight: 600;
}

.lvl-lead .gfield_consent_label,
.lvl-lead .gchoice label {
	font-size: var(--wp--preset--font-size--body-small, 0.875rem);
	line-height: 1.4;
}

.lvl-lead .gform_validation_container,
.lvl-lead .gfield--type-hidden {
	display: none !important;
}

/* A form on a white card inside a dark section (program hero, Figma R4): the dark section's white text
   colour was inherited, so labels were invisible. Text and links follow the light card instead. */
.has-white-background-color .lvl-lead,
.has-white-background-color .lvl-lead .gfield_label,
.has-white-background-color .lvl-lead legend,
.has-white-background-color .lvl-lead .gfield_consent_label,
.has-white-background-color .lvl-lead .gfield_description,
.has-white-background-color .lvl-lead .gchoice label {
	color: var(--wp--preset--color--charcoal);
}

.has-white-background-color .lvl-lead a {
	color: var(--wp--preset--color--secondary-navy);
}

/* Form look: the official Figma form (Eastern-TriOS Website Redesign, node 1295:21983).
   Open Sans labels (SemiBold 16/26, 4px above the field) with a rust asterisk; 51px fields with a 1px gray border and
   4px radius; selects with a dark caret and, for Area of Interest / Method of Learning / Campus, a leading icon; a
   12/18 consent row with a 20px square box; a full-width pale-green button. Fonts, the button's colours and its hover
   come from the theme. Gray, charcoal and blue are theme presets; the asterisk rust has no preset, so it is a literal.
   `body` in the selectors outranks the parent theme's GF rules (lvl-framework _forms-gravityforms.scss) and Bootstrap's
   .form-select / .form-check. Icons are the Figma exports in assets/form/ (relative to this file). */
body .lvl-lead .gform_wrapper {
	--lvl-lead-border: var(--wp--preset--color--dark-gray, #5E6468);
	--lvl-lead-ink: var(--wp--preset--color--charcoal, #272A2D);
	--lvl-lead-focus: var(--wp--preset--color--secondary, #142F83);
	--lvl-lead-required: #B64B2C;
	padding: 0;
	font-family: var(--wp--preset--font-family--body);
	color: var(--lvl-lead-ink);
}

body .lvl-lead .gform_wrapper .gform_fields {
	row-gap: 12px;
	column-gap: 21px;
}

/* Labels */
body .lvl-lead .gform_wrapper .gfield_label,
body .lvl-lead .gform_wrapper .gfield > label,
body .lvl-lead .gform_wrapper legend.gfield_label {
	margin: 0 0 4px;
	padding: 0;
	color: var(--lvl-lead-ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 26px;
}

/* GF prints "(Required)"; the design shows a rust "*". The text stays in the DOM (font-size 0) for screen readers. */
body .lvl-lead .gform_wrapper .gfield_required {
	margin: 0;
	padding: 0;
	color: var(--lvl-lead-required);
	font-style: normal;
	font-weight: 400;
}

body .lvl-lead .gform_wrapper .gfield_required .gfield_required_text {
	font-size: 0;
}

body .lvl-lead .gform_wrapper .gfield_required .gfield_required_text::after {
	content: "*";
	font-size: 1rem;
	line-height: 26px;
}

/* Fields */
body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container select,
body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container textarea {
	box-sizing: border-box;
	width: 100%;
	height: 51px;
	padding: 0 12px;
	border: 1px solid var(--lvl-lead-border);
	border-radius: 4px !important;
	background-color: var(--wp--preset--color--white, #fff);
	box-shadow: none;
	color: var(--lvl-lead-ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	line-height: 26px;
}

body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container textarea {
	height: auto;
	min-height: 120px;
	padding: 12px;
}

body .lvl-lead .gform_wrapper .ginput_container ::placeholder {
	color: var(--lvl-lead-border);
	opacity: 1;
}

body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container input:focus,
body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container select:focus,
body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container textarea:focus {
	border-color: var(--lvl-lead-focus);
	box-shadow: 0 0 0 1px var(--lvl-lead-focus);
	outline: none;
}

/* Selects: dark caret on the right; gray text while the placeholder option is showing. */
body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container select {
	padding-right: 36px;
	background-image: url("form/caret-down.svg");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	text-overflow: ellipsis;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container select:has(option[value=""]:checked) {
	color: var(--lvl-lead-border);
}

body .lvl-lead .gform_wrapper .gform_body .gfield > .ginput_container select option {
	color: var(--lvl-lead-ink);
}

/* Leading icons (Figma): Area of Interest / program = pencil, Preferred Method of Learning = book, Campus = pin.
   The classes come from the field definitions (Forms.php); the eligibility select has no icon in the design. */
body .lvl-lead .gform_wrapper .gform_body .gfield.lvl-lead-field--icon-pencil > .ginput_container select {
	padding-left: 40px;
	background-image: url("form/icon-pencil.svg"), url("form/caret-down.svg");
	background-position: left 12px center, right 12px center;
	background-size: 20px 20px, 12px 8px;
}

body .lvl-lead .gform_wrapper .gform_body .gfield.lvl-lead-field--icon-book > .ginput_container select {
	padding-left: 40px;
	background-image: url("form/icon-book.svg"), url("form/caret-down.svg");
	background-position: left 12px center, right 12px center;
	background-size: 20px 20px, 12px 8px;
}

body .lvl-lead .gform_wrapper .gform_body .gfield.lvl-lead-field--icon-pin > .ginput_container select {
	padding-left: 40px;
	background-image: url("form/icon-location.svg"), url("form/caret-down.svg");
	background-position: left 12px center, right 12px center;
	background-size: 20px 20px, 12px 8px;
}

/* Validation */
body .lvl-lead .gform_wrapper .gfield_error .ginput_container input:not([type="checkbox"]),
body .lvl-lead .gform_wrapper .gfield_error .ginput_container select,
body .lvl-lead .gform_wrapper .gfield_error .ginput_container textarea {
	border-color: var(--lvl-lead-required);
}

body .lvl-lead .gform_wrapper .gfield_validation_message,
body .lvl-lead .gform_wrapper .validation_message {
	margin-top: 4px;
	color: var(--lvl-lead-required);
	font-size: .875rem;
	line-height: 1.4;
}

/* Consent: 20px square box, 12/18 text beside it, rust "*" after the text. 24px above (12px row gap + 12px). */
body .lvl-lead .gform_wrapper .gfield--type-checkbox {
	margin-top: 12px;
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox .form-check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 0;
	min-height: 0;
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox .form-check .form-check-input[type="checkbox"] {
	flex: 0 0 20px;
	float: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1px solid var(--lvl-lead-ink);
	border-radius: 0 !important;
	background-color: var(--wp--preset--color--white, #fff);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
	box-shadow: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox .form-check .form-check-input[type="checkbox"]:checked {
	border-color: var(--lvl-lead-ink);
	background-color: var(--wp--preset--color--white, #fff);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' stroke='%23272A2D' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E");
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox .form-check .form-check-input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--lvl-lead-focus);
	outline-offset: 2px;
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox .form-check label {
	margin: 0;
	color: var(--lvl-lead-ink);
	font-size: .75rem;
	font-weight: 400;
	line-height: 18px;
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox .form-check label a {
	text-decoration: underline;
}

body .lvl-lead .gform_wrapper .gfield--type-checkbox.gfield_contains_required .form-check label::after {
	content: " *";
	color: var(--lvl-lead-required);
}

/* Submit: full width. Colours and hover are the theme's .btn-primary (pale green, charcoal text); size and type match
   the design (16px 24px padding, 12px radius, SemiBold 16/26). */
body .lvl-lead .gform_wrapper .gform_footer {
	margin: 24px 0 0;
	padding: 0;
}

body .lvl-lead .gform_wrapper .gform_footer .gform_button,
body .lvl-lead .gform_wrapper .gform_footer input[type="submit"] {
	width: 100%;
	padding: 16px 24px;
	border-radius: 12px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 26px;
}
