/**
 * MW Gravity Forms Style — new Serve the City design for Gravity Forms (from the index.html mock-up).
 * Only applies when the "Appearance" toggle is on in Forms → Settings (classes mw-gf-style / mw-gf-style--card).
 * Forms with "Dark style" on (Form → Settings → Appearance) get mw-gf-style--dark (white text, outlined fields).
 * Gravity Forms' legacy CSS uses very specific selectors on inputs, hence the !important on fields and buttons.
 * ":not(#mw-gf-none)" adds the weight of an ID, so the design also wins over theme rules such as
 * "#mk-footer .gform_widget .ginput_container input" (forms in the footer).
 */

.gform_wrapper.mw-gf-style_wrapper,
.gform_confirmation_wrapper.mw-gf-style {
	--mw-gf-primary: #0098db;
	--mw-gf-primary-dark: color-mix(in srgb, var(--mw-gf-primary) 78%, #000);
	--mw-gf-ring: color-mix(in srgb, var(--mw-gf-primary) 27%, transparent);
	--mw-gf-navy: #102c42;
	--mw-gf-muted: #385569;
	--mw-gf-line: #dce8e9;
	--mw-gf-field: #a9bcc5;
	--mw-gf-error: #c0392b;
	color: var(--mw-gf-navy);
	font-family: "DM Sans", sans-serif;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) *,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) *::before,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) *::after { box-sizing: border-box; }

/* Card */
.gform_wrapper.mw-gf-style--card_wrapper form.mw-gf-style,
.gform_confirmation_wrapper.mw-gf-style.mw-gf-style--card {
	background: #fff;
	border: 1px solid var(--mw-gf-line);
	border-radius: 24px;
	padding: clamp(22px, 4vw, 40px);
}

/* "Dark style" form (Form → Settings → Appearance): the title comes from the theme */
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .gform_heading { display: none; }

/* Title and description */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_title {
	font-family: "Fraunces", serif;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -.045em;
	line-height: 1.08;
	color: inherit;
	margin: 0 0 24px;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_description { color: var(--mw-gf-muted); }

/* Spacing between fields */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) ul.gform_fields li.gfield { margin-top: 0; padding-top: 0; margin-bottom: 20px; }

/* Labels */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_label,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) legend.gfield_label {
	display: block;
	font-weight: 700 !important;
	font-size: 1rem;
	color: inherit;
	margin-bottom: 8px;
}
/* Required "*" in the colour of the label, as in the mock-up */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_required { color: inherit !important; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .ginput_complex label,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_description { color: var(--mw-gf-muted); font-size: .85rem; }

/* Fields */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not([type=hidden]),
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) select,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) textarea {
	width: 100%;
	min-height: 48px !important;
	padding: 11px 13px !important;
	border: 1px solid var(--mw-gf-field) !important;
	border-radius: 10px !important;
	background-color: #fff !important;
	color: var(--mw-gf-navy) !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	transition: border-color .15s, outline-color .15s;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) textarea { min-height: 120px !important; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not([type=hidden]):focus,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) select:focus,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) textarea:focus {
	border-color: var(--mw-gf-primary-dark) !important;
	outline: 3px solid var(--mw-gf-ring) !important;
	outline-offset: 0;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) ::placeholder { color: #7a8d97; opacity: 1; }

/* Checkboxes and radios */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) input[type=checkbox],
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) input[type=radio] { accent-color: var(--mw-gf-primary); width: 18px; height: 18px; vertical-align: middle; }
/* Choices and consent: box and text side by side, small muted text */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gchoice,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .ginput_container_consent { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .ginput_container_consent { align-items: flex-start; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gchoice input,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .ginput_container_consent input { flex: none; margin: 0 !important; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_checkbox label,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_radio label,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_consent_label {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--mw-gf-muted);
	font-size: .875rem !important;
	line-height: 1.5 !important;
}

/* Buttons: blue "pill" */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_footer input[type=submit],
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_footer button,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_page_footer input[type=button],
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_page_footer input[type=submit],
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px !important;
	padding: 12px 26px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--mw-gf-primary) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.2 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: transform .2s, box-shadow .2s, background-color .2s;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_footer input[type=submit]:hover,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_footer button:hover,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_page_footer input[type=button]:hover,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_page_footer input[type=submit]:hover,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_button:hover {
	background: var(--mw-gf-primary-dark) !important;
	transform: translateY(-2px);
	box-shadow: 0 9px 22px #102c4221 !important;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_footer input[type=submit]:focus-visible,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_button:focus-visible { outline: 3px solid #006d9e !important; outline-offset: 4px; }
/* "Previous" button of multi-page forms: outlined */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_page_footer .gform_previous_button {
	background: transparent !important;
	color: inherit !important;
	border: 1.5px solid currentColor !important;
}

/* Errors */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gform_validation_errors,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) div.validation_error {
	border: 1px solid var(--mw-gf-error) !important;
	border-radius: 12px !important;
	background: #fdf1ef !important;
	color: var(--mw-gf-error) !important;
	padding: 13px 16px !important;
	box-shadow: none !important;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) li.gfield.gfield_error,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) li.gfield.gfield_error.gfield_contains_required.gfield_creditcard_warning {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	max-width: 100% !important;
}
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) li.gfield_error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) li.gfield_error select,
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) li.gfield_error textarea { border-color: var(--mw-gf-error) !important; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .gfield_error .gfield_label { color: inherit !important; }
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) .validation_message { color: var(--mw-gf-error) !important; padding-top: 6px !important; font-size: .85rem; }

/* Confirmation */
.gform_confirmation_wrapper.mw-gf-style .gform_confirmation_message {
	border-radius: 12px;
	background: #eef8f1;
	border: 1px solid #b7e1c3;
	color: #1e5b33;
	padding: 13px 16px;
}

/* Links */
.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) a { color: var(--mw-gf-primary-dark); font-weight: 700; }

/* "Dark style" form (class mw-gf-style--dark): white text, outlined fields with a transparent background */
.gform_wrapper.mw-gf-style--dark_wrapper,
.gform_confirmation_wrapper.mw-gf-style.mw-gf-style--dark { color: #fff; --mw-gf-muted: #d6e9ee; --mw-gf-line: rgba(255, 255, 255, .3); }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not([type=hidden]),
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) select,
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) textarea {
	background-color: transparent !important;
	border-color: var(--mw-gf-line) !important;
	color: #fff !important;
	font-size: .875rem !important; /* text-sm, as in the mock-up newsletter */
}
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not([type=hidden]):focus,
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) select:focus,
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) textarea:focus { border-color: #fff !important; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) ::placeholder { color: var(--mw-gf-muted); }
/* Footer newsletter layout: fields 12px apart, Firstname and Lastname side by side */
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) ul.gform_fields li.gfield { margin-bottom: 12px; padding-right: 0; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .ginput_container { margin-top: 0; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .ginput_container input:not([type=checkbox]):not([type=radio]) { width: 100% !important; margin: 0 !important; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .ginput_container--name { display: flex; gap: 12px; width: 100% !important; margin: 0 !important; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .ginput_container--name > span { flex: 1 1 0; min-width: 0; width: auto !important; margin: 0 !important; padding: 0 !important; }
/* Labels replaced by placeholders: kept for screen readers only */
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .hidden_label .gfield_label,
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .field_sublabel_hidden_label .ginput_complex label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
/* The options list of a dropdown is drawn by the browser on a white background */
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) select option { color: var(--mw-gf-navy); }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=checkbox],
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=radio] {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	flex: none;
	margin-top: 0;
	border: 1.5px solid rgba(255, 255, 255, .8) !important;
	border-radius: 5px !important;
	background: transparent center / 12px no-repeat !important;
	box-shadow: none !important;
	cursor: pointer;
}
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=radio] { border-radius: 50% !important; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=checkbox]:checked {
	border-color: var(--mw-gf-primary) !important;
	background-color: var(--mw-gf-primary) !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=radio]:checked {
	border-color: #fff !important;
	background: radial-gradient(circle, #fff 0 32%, transparent 38%) !important;
}
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=checkbox]:focus-visible,
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) input[type=radio]:focus-visible { outline: 3px solid var(--mw-gf-ring); outline-offset: 1px; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) .validation_message { color: #ff9a8d !important; }
.gform_wrapper.mw-gf-style--dark_wrapper:not(#mw-gf-none) a { color: color-mix(in srgb, var(--mw-gf-primary) 55%, #fff); }

@media (prefers-reduced-motion: reduce) {
	.gform_wrapper.mw-gf-style_wrapper:not(#mw-gf-none) * { transition: none !important; }
}
