/*
 * Gravity Forms: styles for the current (non-legacy) markup.
 *
 * Every rule is scoped to `.gform_wrapper.gravity-theme`, which GF only adds to
 * forms with legacy markup turned off. Legacy forms (`.gform_legacy_markup_wrapper`)
 * are untouched, so forms can be migrated one at a time.
 *
 * Hand-written plain CSS; there is no build step. The `body` prefix keeps these
 * rules ahead of GF's own theme CSS regardless of load order.
 *
 * Targets were measured against the same form rendered with legacy markup.
 */

/* Defaults that GF's legacy stylesheet (legacy/css/formsmain.css) provided and the
   theme relies on. That stylesheet isn't loaded for non-legacy forms. Where the theme
   sets these itself (ID selectors such as `#page-header .gform_wrapper ...` on the
   contact pages), the theme still wins. */
body .gform_wrapper.gravity-theme {
	margin: 16px 0 0;
}
body .gform_wrapper.gravity-theme .top_label div.ginput_container {
	margin-top: 8px;
}
body .gform_wrapper.gravity-theme .gform_footer {
	margin: 0;
	padding: 0;
}
/* Title/description block (rendered, empty, by `gravity_form( $id, false )` in
   templates/pap-2-0-procedure-sem.php). */
body .gform_wrapper.gravity-theme .gform_heading {
	margin-bottom: 18px;
}

/* Field layout. The new markup lays fields out on a CSS grid (with a 16px row gap).
   Legacy stacked them as plain blocks (list items), and the theme's spacing depends
   on block behaviour: adjacent vertical margins collapse (e.g. a section heading's
   bottom margin merges with the next input's 8px top margin; the first heading's top
   margin merges with the wrapper's). Grid items never collapse margins.
   So: forms whose fields are all full width go back to block layout, which matches
   legacy exactly. Forms using column widths (gfield--width-half etc., set in the
   form editor) keep GF's grid. Block is the default, so browsers without :has() get
   legacy spacing; only browsers that support :has() switch column forms back to grid.
   :where() keeps the :has() test at zero specificity, so form-specific layout rules
   (e.g. the patient application forms' display: block below) still win. GF adds
   width classes for ready classes like gf_left_half, so those forms do match here. */
body .gform_wrapper.gravity-theme .gform_fields {
	display: block;
}
@supports selector(:has(*)) {
	body .gform_wrapper.gravity-theme .gform_fields:where(:has(> .gfield[class*="gfield--width-"]:not(.gfield--width-full))) {
		display: grid;
	}
}

/* Multi-input and choice fields (checkbox, radio, name, address, date, time) are now
   <fieldset> elements. Reset browser/Bootstrap fieldset styles, and the theme's
   blue-box rule `[data-pagename=form] #page-header form fieldset { padding: 60px 30px;
   border: 5px solid ... }` (inlined in header.php), which was meant for the box
   around the form, not for fields inside it. The #page-header selector is needed to
   outrank that rule. */
body .gform_wrapper.gravity-theme fieldset.gfield,
#page-header .gform_wrapper.gravity-theme fieldset.gfield {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	min-width: 0;
}

/* Contact pages: the theme's `[data-pagename=form] #page-header form ul
   { margin-top: 15px; font-size: 14px }` (inlined in header.php) matched the legacy
   field list and choice lists, which were <ul>. Same values for the new markup. */
[data-pagename=form] #page-header .gform_wrapper.gravity-theme .gform_fields {
	font-size: 14px;
}
[data-pagename=form] #page-header .gform_wrapper.gravity-theme .gfield_checkbox,
[data-pagename=form] #page-header .gform_wrapper.gravity-theme .gfield_radio {
	margin-top: 15px;
}

/* Checkbox / radio choices: legacy `ul.gfield_checkbox > li` is now
   `div.gfield_checkbox > div.gchoice`. Values copied from the legacy computed styles.
   Legacy GF default list margin was 6px 0; the bottom 6px collapsed into the choice's
   8px, so it's dropped here (no collapsing inside the fieldset). */
body .gform_wrapper.gravity-theme .gfield_checkbox,
body .gform_wrapper.gravity-theme .gfield_radio {
	margin: 6px 0 0;
}
body .gform_wrapper.gravity-theme .gfield_checkbox .gchoice,
body .gform_wrapper.gravity-theme .gfield_radio .gchoice {
	margin: 0 0 8px;
	/* Set here, not on the label: the theme's `#site label { font: inherit }` reset
	   outranks any label rule, so the label inherits this (legacy li was 14px/18.2px). */
	font-size: 14px;
	line-height: 1.3;
}
@media only screen and (max-width: 641px) {
	body .gform_wrapper.gravity-theme .gfield_checkbox .gchoice,
	body .gform_wrapper.gravity-theme .gfield_radio .gchoice {
		margin-bottom: 16px;
		line-height: 1.2;
	}
}
/* Legacy choice labels were capped at 85% of the row, which sets where the
   agreement text wraps. (The theme's `#site label` reset doesn't touch width.) */
body .gform_wrapper.gravity-theme .gchoice label {
	max-width: 85%;
}
body .gform_wrapper.gravity-theme .gchoice input[type="checkbox"],
body .gform_wrapper.gravity-theme .gchoice input[type="radio"] {
	margin: 6px 0 0 1px;
}

/* GF's newer theme adds 8px under the submit button. Legacy had none on desktop and
   16px at <= 641px (formsmain.css mobile breakpoint). */
body .gform_wrapper.gravity-theme .gform_footer .gform_button {
	margin-bottom: 0;
}
@media only screen and (max-width: 641px) {
	body .gform_wrapper.gravity-theme .gform_footer .gform_button {
		margin-bottom: 16px;
	}
}

/* Legacy GF CSS nudged selects 1px right and used a 1.5 line height. */
body .gform_wrapper.gravity-theme .gfield select {
	margin-left: 1px;
	line-height: 1.5;
}

/* Links inside fields (e.g. "terms of use" / "privacy policy" in the agreement checkbox
   on the contact pages). Theme rule `[data-pagename=form] #page-header form ul li a`
   (inlined in header.php) only matched the legacy ul/li markup. */
[data-pagename=form] #page-header .gform_wrapper.gravity-theme .gfield a {
	color: #a7c13f;
	font-weight: 700;
}

/* Legacy text-input padding (formsmain.css). The contact pages override this with
   their own `#page-header` rule (0 8px), as before. */
body .gform_wrapper.gravity-theme input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) {
	padding: 5px 4px;
}

/* Legacy checkbox/radio lists were 16px wider than the field above 641px
   (100% wide below, per formsmain.css's mobile breakpoint). */
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme .gfield_checkbox,
	body .gform_wrapper.gravity-theme .gfield_radio {
		width: calc(100% + 16px);
	}
}

/* Legacy textarea: 160px tall (GF's newer theme uses 192px), 14px/21px text,
   6px 8px padding, no resize handle. */
body .gform_wrapper.gravity-theme .gfield textarea.medium {
	height: 160px;
}
@media only screen and (max-width: 641px) {
	body .gform_wrapper.gravity-theme .gfield textarea.medium {
		height: 120px;
	}
}
body .gform_wrapper.gravity-theme .gfield textarea {
	font-size: 14px;
	line-height: 1.5;
	padding: 6px 8px;
	resize: none;
}

/* ---------------------------------------------------------------------------
 * Validation state. Base rules reproduce GF's legacy defaults (formsmain.css), which
 * is what the blog sidebar form (20) shows. The contact pages (#page-header) had
 * theme rules on top; the #page-header block below restores those where the base
 * rules here would otherwise win. Values checked against legacy computed styles.
 * ------------------------------------------------------------------------- */

/* Summary box above the fields. */
body .gform_wrapper.gravity-theme .gform_validation_errors {
	position: static;
	margin: .5rem 0 25px;
	padding: 16px 0;
	border: 1px solid #790000;
	border-top-width: 2px;
	border-bottom-width: 2px;
	border-radius: 5px;
	background: transparent;
	box-shadow: none;
	color: #790000;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}
body .gform_wrapper.gravity-theme .gform_validation_errors > h2 {
	margin: 0;
	padding: 0;
	color: #790000;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
}
/* Icon: legacy drew it as an SVG in h2::before (rule and image copied from
   gravityforms/legacy/css/formsmain.css); the new markup uses an icon-font span. */
body .gform_wrapper.gravity-theme .gform_validation_errors > h2 .gform-icon {
	display: none;
}
body .gform_wrapper.gravity-theme .gform_validation_errors > h2::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 22px;
	margin: 0 .2rem 0 -.5rem;
	vertical-align: sub;
	background-color: transparent;
	background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIGZpbGw9IiM3OTAwMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDE5YTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMiA2aC0ydjZoMlY2Wk0xMiAxNGgtMnYyaDJ2LTJaIiBmaWxsPSIjRkZGIi8+PC9zdmc+);
	background-position: 50%;
	background-repeat: no-repeat;
}

/* A field with an error: tinted band with rules above and below. Legacy made it
   2px narrower than the form, and 16px narrower above 641px. */
body .gform_wrapper.gravity-theme .gfield.gfield_error {
	width: calc(100% - 2px);
	margin: 0 0 6px;
	padding: 8px 0 6px;
	border-top: 1px solid #c89797;
	border-bottom: 1px solid #c89797;
	background-color: rgba(255, 223, 224, 0.25);
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme .gfield.gfield_error {
		max-width: calc(100% - 16px);
	}
}
/* Legacy: 12px above the input in a *required* field with an error (the contact
   pages' own `#page-header ... div.ginput_container { margin-top: 8px }` still wins
   there). Needs to outrank the 8px `.top_label div.ginput_container` default above. */
body .gform_wrapper.gravity-theme .top_label .gfield.gfield_error.gfield_contains_required div.ginput_container {
	margin-top: 12px;
}
body .gform_wrapper.gravity-theme .gfield_error input,
body .gform_wrapper.gravity-theme .gfield_error select,
body .gform_wrapper.gravity-theme .gfield_error textarea {
	margin-bottom: 2px;
}
/* Legacy error borders: dark red on text inputs/textareas, selects unchanged.
   (GF's newer theme uses orange-red on all. The contact pages' theme input rule
   still wins there, as before.) */
body .gform_wrapper.gravity-theme .gfield_error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
body .gform_wrapper.gravity-theme .gfield_error textarea {
	border: 1px solid #790000;
}
/* Outranks GF's `.gform_wrapper.gravity-theme .gfield_error [aria-invalid=true]`. */
body .gform_wrapper.gravity-theme .gfield.gfield_error select[aria-invalid] {
	border-color: #767676;
}

/* Error messages and the field instruction shown with them ("Phone format: ..."). */
body .gform_wrapper.gravity-theme .gfield .validation_message {
	max-width: 100%;
	margin: 0;
	padding: 16px 16px 0 0;
	border: 0;
	background: transparent;
	color: #790000;
	font-size: .813em; /* relative to the field: 11.38px on 14px fields, 13px on 16px */
	font-weight: 700;
	line-height: 1.4286;
	text-align: left;
}

/* Contact pages: values the theme's #page-header rules produced in legacy. */
#page-header .gform_wrapper.gravity-theme .gform_validation_errors {
	font-size: 16px;
	line-height: 16px;
}
#page-header .gform_wrapper.gravity-theme .gform_validation_errors > h2 {
	line-height: 1.4;
}
#page-header .gform_wrapper.gravity-theme .gfield .validation_message {
	line-height: 1;
}

/* ===========================================================================
 * Patient application forms (form CSS class `pap-intake-form`: forms 6, 8, 9, 14,
 * 15, 16, 18, 21, 27, 30, 31, 32 on templates/pap-medical-form.php).
 *
 * These pages load bootstrap + style.css via headerForm.php (no #page-header), and
 * their legacy look came almost entirely from GF's legacy formsmain.css and
 * readyclass.css. The inner markup of name/address/date/choice fields is the same in
 * both modes, so the legacy rules are reproduced here with the new selectors
 * (li.gfield -> .gfield, ul.gfield_checkbox li -> .gchoice). Values were checked
 * against the legacy computed styles.
 *
 * Column layout: GF converts the gf_left_half / gf_*_third ready classes to
 * gfield--width-* for its grid. Legacy laid them out as inline-blocks with 16px
 * right padding; the grid's gaps and non-collapsing margins don't match that, so
 * these forms go back to legacy's inline-block layout (>= 641px; stacked below).
 * ======================================================================== */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper {
	margin-bottom: 16px;
}
/* The page template wraps the form in Bootstrap's .text-center. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper form {
	text-align: left;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_title {
	margin: 10px 0 6px;
	font-size: 1.25em;
	line-height: 1.4;
}
/* Shown by the new markup when the required indicator is "asterisk"; legacy had no
   such line. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_required_legend {
	display: none;
}

/* Step indicator (multi-page forms). Colours/sizes come from the theme's
   `.gform_wrapper.pap-intake-form_wrapper .gf_step*` rules in style.css; this undoes
   what GF's newer theme adds on top. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_page_steps {
	width: 100%; /* also when style.css pins it to the top on scroll (.affix) */
	margin: 0 0 8px;
	padding: 0 0 4px;
	border-bottom: 1px dotted #ccc;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_page_steps .gf_step {
	margin: 0 0 20px;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_step .gf_step_number {
	height: auto;
	border: 0;
	font-family: arial, sans-serif;
	font-weight: 400;
	line-height: 1.25;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_step_active .gf_step_number {
	background-color: #1480a4;
	color: #fff;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_step .gf_step_label {
	padding-left: 0;
	font-weight: 400;
	line-height: 1.25;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_step_active .gf_step_label {
	font-weight: 700;
}

/* Field layout. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_fields {
	display: block;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield {
	margin: 16px 0 0;
}
/* The first field on each page, when it's an HTML block. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_html.gfield_no_follows_desc:first-child {
	margin-top: 10px;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield {
		padding-right: 16px;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_left_half,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_half {
		display: inline-block;
		width: 50%;
		vertical-align: top;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_left_third,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_middle_third,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_third {
		display: inline-block;
		width: 33.3%;
		margin-bottom: 8px;
		vertical-align: top;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_third {
		width: 33.4%;
	}
	/* style.css has an unscoped `.gform_wrapper .top_label li.gfield.gf_middle_third
	   { padding-left: 7px }` (meant for #page-header) that applied here in legacy. */
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_middle_third {
		padding-left: 7px;
	}
}

/* Field labels and the required asterisk. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_label {
	display: inline-block;
	width: auto;
	margin: 0 0 5px;
	padding: 0;
	color: inherit;
	font-size: inherit;
	font-weight: 700;
	line-height: 1.3;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_required {
	display: inline;
	margin-left: 4px;
	padding: 0;
	color: #790000;
	font-size: inherit;
	font-style: normal;
	font-weight: inherit;
	line-height: inherit;
}

/* Inputs. Bootstrap's `input, select, textarea { font-size/line-height: inherit }`
   applied in legacy; GF's newer theme sets 15px. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper select,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper textarea {
	font-size: inherit;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) {
	line-height: inherit;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_left_half div:not(.ginput_container_date) input.medium,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_left_half div:not(.ginput_container_date) input.large,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_left_half div:not(.ginput_container_date) select,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_half div:not(.ginput_container_date) input.medium,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_half div:not(.ginput_container_date) input.large,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_half div:not(.ginput_container_date) select,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield--width-third div:not(.ginput_container_date) input:not([type=radio]):not([type=checkbox]),
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield--width-third div:not(.ginput_container_date) select {
		width: 100%;
	}
}

/* Name and address: sub-labels above each input. Side by side from 641px (spans as
   inline-blocks, as in legacy; the markup inside these fields is unchanged), stacked
   below. The span selectors are long because GF's own padding/margin rules for them
   use 6-7 class selectors. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper div.ginput_complex.ginput_container_name,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper div.ginput_complex.ginput_container_address {
	display: block;
	margin: 0;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex label {
	display: block;
	margin: 9px 0 1px 1px;
	padding: 0;
	font-size: .813em;
	letter-spacing: .5pt;
	line-height: 1;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_container_name input[type=text],
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_container_address input[type=text] {
	width: 100%;
	margin-bottom: 1px;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_name.gform-grid-row > span.gform-grid-col:not(.ginput_full),
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col {
	display: block;
	margin: 0 0 8px;
	padding: 0;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_name.gform-grid-row > span.gform-grid-col:not(.ginput_full) {
	padding-top: 2px;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_container_name.gf_name_has_2 {
		width: calc(100% + 15px);
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_name.gform-grid-row > span.gform-grid-col:not(.ginput_full) {
		display: inline-block;
		width: 50%;
		margin: 0 -4px 0 0;
		padding: 2px 16px 0 0;
		vertical-align: top;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col {
		margin-bottom: 0;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col.ginput_full {
		display: inline;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col.ginput_left,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col.ginput_right {
		display: inline-block;
		width: 50%;
		padding-right: 8px;
		vertical-align: top;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col.ginput_left {
		margin-right: 8px;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col.ginput_right {
		margin-right: -8px;
	}
}

/* Checkboxes and radios. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_checkbox .gchoice,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_radio .gchoice {
	font-size: inherit;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gchoice label {
	display: inline-block;
	margin: 0;
	padding: 0;
	font-size: .875em;
	line-height: 1.5;
	vertical-align: middle;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_radio .gchoice label {
	margin: 2px 0 0 4px;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gchoice input[type=checkbox],
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gchoice input[type=radio] {
	vertical-align: top;
}
/* gf_list_2col: GF has no replacement for this ready class. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_list_2col .gfield_checkbox,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_list_2col .gfield_radio {
	display: block;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_list_2col .gfield_checkbox .gchoice,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_list_2col .gfield_radio .gchoice {
		display: inline-block;
		width: 50%;
		min-height: 28px;
		margin: 0;
		padding-right: 0;
		font-size: 14.4px; /* legacy: .9rem */
		vertical-align: top;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_list_2col .gfield_checkbox,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_list_2col .gfield_radio {
		margin-bottom: 6px;
	}
}

/* Textareas and descriptions. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_description:not(.validation_message) {
	margin-top: 0;
	padding-right: 16px;
	font-size: .813em;
	line-height: 1;
}

/* Page footer: Previous / Next / Save and Continue Later. Legacy: full-width
   stacked buttons and a centred save link below 641px, inline from 641px. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer {
	margin: 14px 0;
	padding: 16px 0 0;
	border-top: 1px dotted #ccc;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_next_button,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_button,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_footer .button.gform_button {
	width: 100%;
	margin: 0 0 16px;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_previous_button {
	width: 100%;
	margin: 0 0 8px;
	background-color: #1480a4;
	color: #fff;
}
/* Single-page forms: legacy .gform_footer box (formsmain.css). */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_footer {
	display: block;
	margin: 16px 0 0;
	padding: 16px 0 10px;
}
/* Legacy rendered this as a plain link; it's now a <button> with an icon, and it has
   the `button` class, so the theme's blue button style hits it. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .gform_save_link,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_footer .gform_save_link {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font-size: 1em;
	line-height: inherit;
	text-align: center;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_next_button,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_button {
		width: auto;
		margin: 0 10px 0 0;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_footer .button.gform_button {
		width: auto;
		margin: 0 16px 0 0;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_previous_button {
		width: auto;
		margin: 0 16px 0 0;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .gform_save_link,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_footer .gform_save_link {
		display: inline-block;
		width: auto;
		margin-left: 16px;
	}
}
/* style.css sets 227px at >= 64em, which the width rules above would override. */
@media (min-width: 64em) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_next_button,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_previous_button,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_page_footer .button.gform_button {
		width: 227px;
	}
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_save_link svg {
	display: none;
}

/* Selects: legacy padding. In the address field also legacy's 2px/5px margins. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield select {
	padding: 2px 0 2px 3px;
	line-height: normal;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_container_address select {
	margin-top: 2px;
	margin-bottom: 5px;
}

/* Date (MM / DD / YYYY boxes). Legacy: fixed-width boxes 8px apart; GF's newer theme
   uses percentage gaps and an 84px minimum. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex div.ginput_container.ginput_container_date {
	flex: none;
	width: 64px;
	max-width: none;
	margin: 0 8px 0 0;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex div.ginput_container.ginput_container_date.gfield_date_year {
	width: 72px;
	margin-right: 0;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex .ginput_container_date input {
	min-width: 0;
	width: 100%;
}

/* Space under choice lists. Checkbox/radio fields are now <fieldset>s, which (unlike
   legacy's <li>) contain their children's margins. Legacy's full-width fields let the
   list's 6px and the last choice's 8px bottom margins collapse out of the field
   (into the 16px gap above the next one), so drop them there. Half/third columns
   were inline-blocks, which kept them, so restore them there. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_checkbox,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_radio {
	margin-bottom: 0;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_checkbox .gchoice:last-child,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_radio .gchoice:last-child {
	margin-bottom: 0;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-half .gfield_checkbox,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-half .gfield_radio,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-third .gfield_checkbox,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-third .gfield_radio {
		margin-bottom: 6px;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-half .gfield_checkbox .gchoice:last-child,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-half .gfield_radio .gchoice:last-child,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-third .gfield_checkbox .gchoice:last-child,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-third .gfield_radio .gchoice:last-child {
		margin-bottom: 8px;
	}
}
/* Legacy formsmain.css: 16px above checkbox/radio lists (8px in half/third columns
   from 641px). */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield div.ginput_container_checkbox,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield div.ginput_container_radio {
	margin-top: 16px;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-half div.ginput_container_checkbox,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-half div.ginput_container_radio,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-third div.ginput_container_checkbox,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield--width-third div.ginput_container_radio {
		margin-top: 8px;
	}
}

/* Textareas in half columns were 98% wide (readyclass.css). */
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_left_half textarea,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gf_right_half textarea {
		width: 98%;
	}
}

/* Lists inside HTML blocks (e.g. the terms links on the last page). Legacy
   formsmain.css styled them; GF's newer theme resets them. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_html.gfield_html_formatted ul {
	margin: 16px 0 16px 28px;
	padding: 0;
	list-style-type: disc;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_html.gfield_html_formatted ul li {
	margin: 0 0 8px;
	list-style-type: inherit;
}

/* Phone width (legacy formsmain.css max-width: 641px rules). */
@media only screen and (max-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) {
		min-height: 2rem;
		line-height: 2;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gchoice label {
		width: 85%;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .field_sublabel_below .ginput_complex {
		margin-top: 12px;
	}
	/* Medium-size inputs/selects are full width on phones (legacy); GF's newer theme
	   keeps them at half. */
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper input.medium,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper select.medium {
		width: 100%;
	}
	/* Stacked name/address parts: the last one's 8px margin collapsed out of the
	   legacy <li>; the new <fieldset> would keep it. */
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_name.gform-grid-row > span.gform-grid-col:not(.ginput_full):last-of-type,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col:last-of-type {
		margin-bottom: 0;
	}
	/* ...except in the error band, whose bottom padding stopped the collapse. */
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .ginput_complex.ginput_container_name.gform-grid-row > span.gform-grid-col:not(.ginput_full):last-of-type,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col:last-of-type {
		margin-bottom: 8px;
	}
	/* Steps stack one per row. */
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gf_page_steps .gf_step {
		display: block;
		width: 100%;
	}
}

/* ---------------------------------------------------------------------------
 * Application forms: validation state (legacy formsmain.css / readyclass.css).
 * ------------------------------------------------------------------------- */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_validation_errors {
	font-size: 1em;
	line-height: 1;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_validation_errors > h2 {
	line-height: 1.4;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error {
	margin-bottom: 6px;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gfield_contains_required {
	padding-right: 0;
}
/* Legacy applied this below 762px and on 768-1023px-wide devices (tablets). */
@media only screen and (max-width: 761px), (min-device-width: 768px) and (max-device-width: 1023px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error + .gfield.gfield_error {
		margin-top: 32px;
	}
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gf_left_half,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gf_right_half {
		max-width: calc(50% - 16px);
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gf_left_half {
		margin-right: 16px;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gf_left_third,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gf_middle_third {
		width: calc(33.3% - 24px);
		margin-right: 16px;
	}
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error.gf_right_third {
		width: 33.4%;
	}	/* Full-width medium inputs widen from calc(50% - 8px) to 50% once the form has
	   errors (legacy quirk, kept so the layout doesn't shift differently). */
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper.gform_validation_error .gfield:not(.gfield--width-half):not(.gfield--width-third) input.medium,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper.gform_validation_error .gfield:not(.gfield--width-half):not(.gfield--width-third) select.medium {
		width: 50%;
	}
}
/* Labels turn dark red and drop 12px (required fields). GF's newer theme uses
   orange-red, and red text in the inputs. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .gfield_label,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .ginput_complex label,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .gfield_checkbox,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .gfield_radio {
	color: #790000;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error label + [aria-invalid="true"],
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error [aria-invalid="true"] + label {
	color: inherit;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error.gfield_contains_required .gfield_label {
	margin-top: 12px;
}
/* Fields that are now <fieldset>s (name, address, date, checkboxes, radios): the
   browser pins a fieldset's <legend> onto its top border, so in the error band the
   red rule would run through the label and the tint would start below it. Floating
   the legend opts it out of that; the next element clears it. Clearance swallows that
   element's top margin, so the same gap is given as padding instead. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label {
	float: left;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container {
	clear: both;
	margin-top: 0;
}
/* Keeps the first sub-label's 9px top margin from collapsing into the cleared box. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container_address {
	display: flow-root;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error.gfield_contains_required > legend.gfield_label + .ginput_container:not(.ginput_container_name):not(.ginput_container_address) {
	padding-top: 12px;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container .gfield_checkbox,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container .gfield_radio {
	margin-top: 0;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .top_label .gfield.gfield_error.gfield_contains_required.gf_left_half div.ginput_container,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .top_label .gfield.gfield_error.gfield_contains_required.gf_right_half div.ginput_container {
		margin-top: 8px;
	}
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .top_label .gfield.gfield_error div.ginput_complex.ginput_container_name,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .top_label .gfield.gfield_error div.ginput_complex.ginput_container_address {
	margin-top: 0;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .ginput_container_name input[type=text],
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .ginput_container_address input[type=text] {
	margin-bottom: 2px;
}
/* Selects keep the theme's light border. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield.gfield_error select[aria-invalid] {
	border-color: #eee;
}
/* Messages: the theme's `.pap-intake-form_wrapper .field_sublabel_above
   .gfield_description { padding-top: 0 }` applied to them in legacy. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield .validation_message {
	line-height: 1;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .field_sublabel_above .validation_message {
	padding-top: 0;
}

/* "Small" inputs: legacy 100% below 641px, 25% from 641px. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield input.small,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield select.small {
	width: 100%;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield input.small,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield select.small {
		width: 25%;
	}
}
/* Legacy browsers.css (Chrome): pull the country select up 2px. */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .ginput_complex.ginput_container_address.gform-grid-row > span.gform-grid-col.address_country {
	margin-top: -2px;
}
/* Error state, checkbox/radio fields: choice labels take the list's dark red, and the
   gap under the list that legacy kept (its last choice's 16px / 8px bottom margin,
   which the error band's padding stopped from collapsing). */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .gfield_checkbox .gchoice label,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield_error .gfield_radio .gchoice label {
	color: inherit;
}
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container .gfield_checkbox,
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container .gfield_radio {
	margin-bottom: 16px;
}
@media only screen and (min-width: 641px) {
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container .gfield_checkbox,
	body .gform_wrapper.gravity-theme.pap-intake-form_wrapper fieldset.gfield.gfield_error > legend.gfield_label + .ginput_container .gfield_radio {
		margin-bottom: 8px;
	}
}
/* "Small" textareas: legacy 80px tall at every width (GF's newer CSS: 96px). */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gfield textarea.small {
	height: 80px;
}
/* Single-page submit: legacy font-size 1em (GF's newer button CSS: 25px). */
body .gform_wrapper.gravity-theme.pap-intake-form_wrapper .gform_footer .button.gform_button {
	font-size: 1em;
}
