/*
 * Refresh: Gravity Forms pages (inc/refresh-forms.php, body class pb-gf-page): the Pig Sponsorship Form, then every page
 * form (Aaron, Nov 18, 2026). Current and legacy GF markup; banner pages (pb-std) keep their own header and text column. Look only: fields, choices, conditional logic and payments are Gravity Forms' own. Loaded after
 * custom.css's old form rules, so a few of those !important rules are matched here.
 * 01 Page and header band   02 Fields and labels   03 Text boxes   04 Choices   05 Sponsorship levels
 * 06 Pig card and notes      07 Payment            08 Submit and messages   09 Phones
 */

/* 01 Page and header band */
body.pb-gf-page:not(.pb-std) #content { padding-top: 0 !important; }
body.pb-gf-page:not(.pb-std) .entry-content > .uagb-section__wrap,
body.pb-gf-page:not(.pb-std) .entry-content .uagb-section__wrap:has(.gform_wrapper) { padding: 0 !important; margin: 0 !important; background: none !important; }
body.pb-gf-page:not(.pb-std) .entry-content .uagb-section__wrap:has(.gform_wrapper) > .uagb-section__inner-wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
body.pb-gf-page:not(.pb-std) .entry-content > p:empty { display: none; }
body.pb-gf-page .pb-gf-hero { background: var(--pb-pale); padding: 48px 0 52px; font-family: var(--pb-font); }
body.pb-gf-page .pb-gf-hero__in { max-width: 800px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
body.pb-gf-page .pb-gf-hero p { margin: 0 0 14px; font-size: 18px; line-height: 1.7; color: var(--pb-ink); max-width: none; }
body.pb-gf-page .pb-gf-hero p:last-child { margin-bottom: 0; }
/* A coloured note in the header (Donate Online's tax note, saved green): the site blue with white text (Aaron, Nov 21, 2026) */
body.pb-gf-page .pb-gf-hero p.has-background { padding: 20px 24px !important; border-radius: 18px; background: var(--pb-blue) !important; color: var(--pb-white) !important; }
body.pb-gf-page .pb-gf-hero p.has-background :is(strong, em, b, i) { color: var(--pb-white) !important; }
body.pb-gf-page .pb-gf-hero p.has-background a { color: var(--pb-white) !important; text-decoration: underline; }
body.pb-gf-page .pb-gf-crumb { margin: 0 0 16px; font-size: 15px; font-weight: 600; color: var(--pb-ink); }
body.pb-gf-page .pb-gf-crumb a { color: var(--pb-ink) !important; }
body.pb-gf-page .pb-gf-crumb a:focus-visible { outline: 3px solid var(--pb-blue); outline-offset: 3px; }
body.pb-gf-page h1.pb-gf-title {
	margin: 0 0 22px !important;
	padding: 0 !important;
	font-family: var(--pb-font) !important;
	font-weight: 900 !important;
	font-size: 56px !important;
	line-height: 1 !important;
	text-transform: uppercase;
	text-align: left !important;
	color: var(--pb-blue) !important;
	background: none !important;
}
body.pb-gf-page h1.pb-gf-title::after { content: ""; display: block; width: 96px; height: 8px; margin-top: 18px; border-radius: 4px; background: var(--pb-sky); }

/* 02 Fields and labels: one 800px column. */
body.pb-gf-page #primary .gform_wrapper {
	max-width: 800px;
	margin: 48px auto 80px !important;
	padding: 0 20px;
	box-sizing: border-box;
	font-family: var(--pb-font);
	color: var(--pb-ink);
}
body.pb-gf-page.pb-std #primary .gform_wrapper { max-width: 760px; margin: 36px 0 48px !important; padding: 0; } /* the page's text column */
body.pb-gf-page #primary .gform_legacy_markup_wrapper ul.gform_fields { margin: 0; padding: 0; list-style: none; }
body.pb-gf-page #primary .gform_legacy_markup_wrapper ul.gform_fields > li.gfield { margin: 0 0 32px !important; padding: 0 !important; }
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gfield_radio,
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gfield_checkbox { margin: 0 !important; padding: 0 !important; list-style: none; width: 100% !important; } /* GF's legacy CSS makes them 16px wider than the field */
body.pb-gf-page #primary .gform_legacy_markup_wrapper :is(input, textarea, select).medium,
body.pb-gf-page #primary .gform_legacy_markup_wrapper :is(input, textarea, select).large { width: 100% !important; }
/* Legacy markup: GF's legacy stylesheet sets choice rows with !important; match it so they look like the others. */
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) :is(.gfield_radio, .gfield_checkbox) > li.gchoice,
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) :is(.gfield_radio, .gfield_checkbox) > li {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	margin: 0 !important;
	padding: 12px 16px !important;
	border: 2px solid #c8e3ef;
	border-radius: 14px;
	line-height: 1.4 !important;
	overflow: visible !important;
}
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) :is(.gfield_radio, .gfield_checkbox) > li > input:is([type=radio], [type=checkbox]) {
	flex: none;
	width: 22px !important;
	height: 22px !important;
	margin: 0 !important;
	accent-color: var(--pb-blue);
}
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) :is(.gfield_radio, .gfield_checkbox) > li > label {
	max-width: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}
body.pb-gf-page #primary .gform_legacy_markup_wrapper .gchoice_other_control,
body.pb-gf-page #primary .gform_legacy_markup_wrapper :is(.gfield_radio, .gfield_checkbox) li input[type=text] { margin: 0 !important; max-width: 320px; }
body.pb-gf-page #primary .gform_wrapper .gf-pb-fund-description-html { margin-top: -20px !important; border: 0 !important; border-radius: 16px !important; background: var(--pb-pale) !important; } /* custom.css pulled it 50px up, under the fund menu */
body.pb-gf-page #primary .gform_wrapper .gform_required_legend { margin: 0 0 8px; font-size: 15px; color: #3d4650; }
body.pb-gf-page #primary .gform_wrapper .gform_fields { row-gap: 36px; }
body.pb-gf-page #primary .gform_wrapper .top_label .ginput_container { margin: 0 !important; }
body.pb-gf-page #primary .gform_wrapper .gfield_label,
body.pb-gf-page #primary .gform_wrapper legend.gfield_label,
body.pb-gf-page #primary .gform_wrapper .top_label .gfield_label {
	display: block;
	margin: 0 0 10px !important;
	padding: 0;
	font-family: var(--pb-font) !important;
	font-weight: 800 !important;
	font-size: 20px !important;
	line-height: 1.3 !important;
	text-transform: none !important;
	color: var(--pb-ink) !important;
}
body.pb-gf-page #primary .gform_wrapper .gfield_required { margin-left: 4px; color: #b42318 !important; font-size: 18px !important; }
body.pb-gf-page #primary .gform_wrapper .gfield_description,
body.pb-gf-page #primary .gform_wrapper .gform-field-label--type-sub,
body.pb-gf-page #primary .gform_wrapper .gfield_header_item {
	font-size: 15px !important;
	line-height: 1.5 !important;
	color: #3d4650 !important;
}
body.pb-gf-page #primary .gform_wrapper .gfield_description { padding: 0 0 12px !important; }
body.pb-gf-page #primary .gform_wrapper .gform-field-label--type-sub { padding-top: 6px; }

/* 03 Text boxes, lists, the pig list */
body.pb-gf-page #primary .gform_wrapper input:is([type=text], [type=email], [type=tel], [type=number], [type=url]):not(.ginput_total),
body.pb-gf-page #primary .gform_wrapper textarea,
body.pb-gf-page #primary .gform_wrapper select {
	box-sizing: border-box;
	min-height: 52px;
	padding: 12px 16px !important;
	border: 2px solid var(--pb-blue) !important;
	border-radius: 14px !important;
	background-color: var(--pb-white) !important;
	color: var(--pb-ink) !important;
	font-family: var(--pb-font) !important;
	font-size: 17px !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
}
body.pb-gf-page #primary .gform_wrapper select { padding-right: 44px !important; }
body.pb-gf-page #primary .gform_wrapper textarea { min-height: 120px; }
body.pb-gf-page #primary .gform_wrapper ::placeholder { color: #66707a; opacity: 1; }
body.pb-gf-page #primary .gform_wrapper :is(input, textarea, select):focus-visible {
	outline: 3px solid var(--pb-navy) !important;
	outline-offset: 2px !important;
}
body.pb-gf-page #primary .gform_wrapper .gfield_list_icons button { width: 28px; height: 28px; }

/* 04 Choices: each answer a rounded row; the chosen one light blue with a blue edge. */
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gfield_radio,
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gfield_checkbox { display: grid; gap: 10px; }
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gchoice {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 !important;
	padding: 12px 16px;
	border: 2px solid #c8e3ef;
	border-radius: 14px;
	background: var(--pb-white);
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gchoice:has(input:checked) { border-color: var(--pb-blue); background: var(--pb-pale); }
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gchoice:hover { border-color: var(--pb-blue); }
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gfield-choice-input {
	flex: none;
	width: 22px !important;
	height: 22px !important;
	margin: 0 !important;
	accent-color: var(--pb-blue);
	cursor: pointer;
}
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gchoice label {
	flex: 1;
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--pb-font) !important;
	font-size: 17px !important;
	line-height: 1.4 !important;
	font-weight: 400 !important;
	color: var(--pb-ink) !important;
	cursor: pointer;
}
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gchoice input:checked + label { font-weight: 700 !important; }
body.pb-gf-page #primary .gform_wrapper .gfield:not(.buttonized):not(.buttonized-pbsponsor) .gfield-choice-input:focus-visible { outline: 3px solid var(--pb-navy) !important; outline-offset: 2px !important; }

/* 05 Sponsorship levels: three buttons; the chosen one solid blue. */
body.pb-gf-page #primary .gform_wrapper .gfield.buttonized-pbsponsor .gfield_radio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.pb-gf-page #primary .gform_wrapper .gfield:is(.buttonized, .buttonized-pbsponsor) .gchoice { margin: 0 !important; }
body.pb-gf-page #primary .gform_wrapper .gfield:is(.buttonized, .buttonized-pbsponsor) .gfield_radio label {
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 100%;
	min-height: 64px;
	margin: 0 !important;
	padding: 14px 16px !important;
	border: 3px solid #a7ddef !important;
	border-radius: 18px !important;
	background-color: var(--pb-white) !important;
	color: var(--pb-ink) !important;
	font-family: var(--pb-font) !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	line-height: 1.35 !important;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
body.pb-gf-page #primary .gform_wrapper .gfield:is(.buttonized, .buttonized-pbsponsor) .gfield_radio label:hover { border-color: var(--pb-blue) !important; }
body.pb-gf-page #primary .gform_wrapper .gfield:is(.buttonized, .buttonized-pbsponsor) input[type=radio]:checked + label {
	border-color: var(--pb-blue) !important;
	background-color: var(--pb-blue) !important;
	color: var(--pb-white) !important;
	box-shadow: 0 4px 0 var(--pb-navy);
}
body.pb-gf-page #primary .gform_wrapper .gfield:is(.buttonized, .buttonized-pbsponsor) input[type=radio]:focus-visible + label { outline: 3px solid var(--pb-navy); outline-offset: 3px; }

/* 06 The chosen pig, and notes */
body.pb-gf-page #primary .gform_wrapper .gf-pig-sponsor-image {
	padding: 26px 24px 22px;
	border-radius: 24px;
	background: var(--pb-pale);
	text-align: center;
}
body.pb-gf-page #primary .gform_wrapper .gf-pig-sponsor-image h6 {
	margin: 0 0 16px !important;
	font-family: var(--pb-font) !important;
	font-weight: 900 !important;
	font-size: 22px !important;
	line-height: 1.25 !important;
	color: var(--pb-blue) !important;
	text-transform: none !important;
}
body.pb-gf-page #primary .gform_wrapper .gf-pig-sponsor-image img {
	display: block;
	width: 200px;
	height: 200px;
	margin: 0 auto 16px;
	object-fit: cover;
	border: 0 !important;
	border-radius: 50%;
	box-shadow: 0 0 0 6px var(--pb-white), 0 0 0 12px var(--pb-sky);
}
body.pb-gf-page #primary .gform_wrapper .gf-pig-sponsor-image p { margin: 0 auto; max-width: 600px; font-size: 16px; line-height: 1.6; }
body.pb-gf-page #primary .gform_wrapper .sponsor-packet-option .gfield_description {
	margin: 0 0 14px !important;
	padding: 16px 20px !important;
	border: 0 !important;
	border-left: 6px solid var(--pb-sky) !important;
	border-radius: 0 16px 16px 0 !important;
	background: var(--pb-pale) !important;
	color: var(--pb-ink) !important;
}

/* 07 Payment: section heading, total, card box */
body.pb-gf-page #primary .gform_wrapper .gsection {
	margin: 12px 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}
body.pb-gf-page #primary .gform_wrapper .gsection .gsection_title {
	margin: 0 !important;
	font-family: var(--pb-font) !important;
	font-weight: 900 !important;
	font-size: 32px !important;
	line-height: 1.1 !important;
	text-transform: uppercase;
	color: var(--pb-blue) !important;
}
body.pb-gf-page #primary .gform_wrapper .gsection .gsection_title::after { content: ""; display: block; width: 96px; height: 8px; margin-top: 14px; border-radius: 4px; background: var(--pb-sky); }
body.pb-gf-page #primary .gform_wrapper .ginput_total {
	display: block;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	font-family: var(--pb-font) !important;
	font-weight: 900 !important;
	font-size: 44px !important;
	line-height: 1.1 !important;
	color: var(--pb-blue) !important;
}
/* The card fields are Stripe's own (its Payment Element, styled in the Stripe add-on): left as they are. */
body.pb-gf-page #primary .gform_wrapper .gf-pb-button-wait-html {
	margin: 0 !important;
	padding: 18px 22px !important;
	border: 0 !important;
	border-radius: 18px !important;
	background: var(--pb-pale) !important;
	color: var(--pb-ink) !important;
	font-size: 16px !important;
	line-height: 1.6 !important;
}

/* 08 Submit and messages */
body.pb-gf-page #primary .gform_wrapper .gform_footer { flex-wrap: wrap !important; margin: 28px 0 0 !important; padding: 0 !important; }
body.pb-gf-page #primary .gform_wrapper .gform_footer > * { flex: 0 0 100%; } /* Submit and PayPal's button area each on their own full-width line */
body.pb-gf-page #primary .gform_wrapper .gform_footer .gform_button {
	width: 100% !important;
	min-height: 60px;
	margin: 0 0 8px !important;
	padding: 16px 28px !important;
	border: 0 !important;
	border-radius: 14px !important;
	background: var(--pb-blue) !important;
	color: var(--pb-white) !important;
	box-shadow: 0 4px 0 var(--pb-navy);
	font-family: var(--pb-font) !important;
	font-weight: 900 !important;
	font-size: 20px !important;
	line-height: 1.2 !important;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
body.pb-gf-page #primary .gform_wrapper .gform_footer .gform_button:hover { background: var(--pb-navy) !important; }
body.pb-gf-page #primary .gform_wrapper .gform_footer .gform_button:active { background: var(--pb-navy) !important; box-shadow: none; transform: translateY(4px); }
body.pb-gf-page #primary .gform_wrapper .gform_footer .gform_button:focus-visible { outline: 3px solid var(--pb-navy) !important; outline-offset: 3px; }
body.pb-gf-page #primary .gform_wrapper .gform_validation_errors { margin: 0 0 28px; border-radius: 16px; }
body.pb-gf-page #primary .gform_wrapper .gfield_error :is(input, textarea, select) { border-color: #b42318 !important; }
body.pb-gf-page #primary .gform_wrapper .validation_message { margin-top: 8px; font-size: 15px; }

/* 09 Phones */
@media (max-width: 639px) {
	body.pb-gf-page .pb-gf-hero { padding: 28px 0 32px; }
	body.pb-gf-page h1.pb-gf-title { font-size: 38px !important; }
	body.pb-gf-page .pb-gf-hero p { font-size: 17px; }
	body.pb-gf-page #primary .gform_wrapper { margin: 32px auto 56px !important; }
	body.pb-gf-page #primary .gform_wrapper .gfield_label,
	body.pb-gf-page #primary .gform_wrapper legend.gfield_label,
	body.pb-gf-page #primary .gform_wrapper .top_label .gfield_label { font-size: 18px !important; }
	body.pb-gf-page #primary .gform_wrapper .gfield.buttonized-pbsponsor .gfield_radio { grid-template-columns: minmax(0, 1fr); }
	body.pb-gf-page #primary .gform_wrapper .gsection .gsection_title { font-size: 26px !important; }
	body.pb-gf-page #primary .gform_wrapper .ginput_total { font-size: 36px !important; }
}
@media (prefers-reduced-motion: reduce) {
	body.pb-gf-page #primary .gform_wrapper * { transition: none !important; }
	body.pb-gf-page #primary .gform_wrapper .gform_footer .gform_button:active { transform: none; }
}
