/* Donation form polish for Gravity Forms + Authorize.net wallets — Squalus.
   Opt-in (GFAW_FORM_POLISH). Scoped to forms that carry the gfaw-polish class. */
.gfaw-polish_wrapper {
	--gfaw-navy: #27277c;
	--gfaw-blue: #1c88ed;
	--gfaw-line: #b5d4f4;
	--gfaw-muted: #5b6590;
	--gfaw-ok: #1a8f4c;
}

/* ---------- step indicator ---------- */
.gfaw-polish_wrapper .gf_page_steps {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 0;
	margin: 0 0 22px;
	padding: 0;
}
.gfaw-polish_wrapper .gf_step {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 1 auto;
	height: auto;
	margin: 0;
	opacity: 1;
	white-space: nowrap;
}
.gfaw-polish_wrapper .gf_step:not(:last-child)::after {
	content: "";
	display: block;
	width: 28px;
	height: 2px;
	margin-left: 4px;
	background: var(--gfaw-line);
}
.gfaw-polish_wrapper .gf_step .gf_step_number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 2px solid var(--gfaw-line);
	border-radius: 50%;
	background: #fff;
	color: var(--gfaw-muted);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}
.gfaw-polish_wrapper .gf_step .gf_step_label {
	padding: 0;
	color: var(--gfaw-muted);
	font-size: 15px;
	font-weight: 600;
}
.gfaw-polish_wrapper .gf_step.gf_step_active .gf_step_number {
	border-color: var(--gfaw-navy);
	background: var(--gfaw-navy);
	color: #fff;
}
.gfaw-polish_wrapper .gf_step.gf_step_active .gf_step_label { color: var(--gfaw-navy); }
.gfaw-polish_wrapper .gf_step.gf_step_completed .gf_step_number {
	border-color: var(--gfaw-ok) !important;
	background-color: var(--gfaw-ok) !important;
	color: transparent !important;
	position: relative;
}
.gfaw-polish_wrapper .gf_step.gf_step_completed .gf_step_number::before,
.gfaw-polish_wrapper .gf_step.gf_step_completed .gf_step_number::after { content: none; }
.gfaw-polish_wrapper .gf_step.gf_step_completed .gf_step_number {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px;
}

/* ---------- labels, required mark, inputs ---------- */
.gfaw-polish_wrapper .gfield { margin-bottom: 4px; }
.gfaw-polish_wrapper .gfield_label {
	margin-bottom: 8px;
	color: var(--gfaw-navy);
	font-size: 16px;
	font-weight: 700;
}
.gfaw-polish_wrapper .gfield_required .gfield_required_text { font-size: 0 !important; }
.gfaw-polish_wrapper .gfield_required .gfield_required_text::after {
	content: "*";
	margin-left: 3px;
	color: #c02b0a;
	font-size: 16px;
	font-style: normal;
}
.gfaw-polish_wrapper input[type="text"],
.gfaw-polish_wrapper input[type="email"],
.gfaw-polish_wrapper input[type="tel"],
.gfaw-polish_wrapper input[type="number"],
.gfaw-polish_wrapper select,
.gfaw-polish_wrapper textarea {
	min-height: 50px;
	border: 1.5px solid var(--gfaw-line);
	border-radius: 12px;
	background-color: #fff !important;
	color: #1c1c4d;
	font-size: 17px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.gfaw-polish_wrapper input:focus,
.gfaw-polish_wrapper select:focus,
.gfaw-polish_wrapper textarea:focus {
	border-color: var(--gfaw-blue);
	box-shadow: 0 0 0 3px rgba(28, 136, 237, 0.2);
	outline: 0;
}
/* sub-labels (First, Last, City…) above their inputs instead of below */
.gfaw-polish_wrapper .ginput_complex > span:not(.ginput_cardextras),
.gfaw-polish_wrapper .ginput_complex .ginput_cardinfo_right {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	position: relative;
}
.gfaw-polish_wrapper .ginput_complex > span:not(.ginput_cardextras) > label,
.gfaw-polish_wrapper .ginput_complex .ginput_cardinfo_right > label { order: -1; }
.gfaw-polish_wrapper .ginput_complex label,
.gfaw-polish_wrapper .ginput_complex legend.gform-field-label--type-sub,
.gfaw-polish_wrapper .ginput_complex .gform-field-label--type-sub {
	margin: 0 0 4px;
	padding: 0;
	color: var(--gfaw-muted);
	font-size: 13px;
	font-weight: 600;
}
.gfaw-polish_wrapper .gfield_description {
	color: var(--gfaw-muted);
	font-size: 13px;
}

/* ---------- step 1: amounts as buttons ---------- */
.gfaw-polish_wrapper .gfield--type-product .gfield_radio {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	width: 100%;
}
.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice {
	position: relative;
	display: block;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice input[type="radio"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	min-height: 58px;
	margin: 0;
	padding: 0 8px;
	border: 2px solid var(--gfaw-line);
	border-radius: 14px;
	background: #fff;
	color: var(--gfaw-navy);
	font-size: 20px;
	font-weight: 700;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice:hover label { border-color: var(--gfaw-blue); }
.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice input:checked + label {
	border-color: var(--gfaw-navy);
	background: var(--gfaw-navy);
	color: #fff;
}
.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice input:focus-visible + label {
	box-shadow: 0 0 0 3px rgba(28, 136, 237, 0.35);
}
/* the running total adds nothing on the amount step */
.gfaw-polish_wrapper .gform_page:first-child .gfield--type-total { display: none; }

/* ---------- total as a summary row ---------- */
.gfaw-polish_wrapper .gfield--type-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	padding: 14px 18px;
	border-radius: 14px;
	background: #fff;
}
.gfaw-polish_wrapper .gfield--type-total .gfield_label {
	position: relative;
	min-width: 130px;
	height: 24px;
	margin: 0;
	visibility: hidden; /* replace the generic "Total" wording */
}
.gfaw-polish_wrapper .gfield--type-total .gfield_label::before {
	content: "Your donation";
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	visibility: visible;
	white-space: nowrap;
	font-size: 16px;
}
.gfaw-polish_wrapper .gfield--type-total .ginput_container { margin: 0; }
.gfaw-polish_wrapper .gfield--type-total .ginput_total,
.gfaw-polish_wrapper .gfield--type-total input.ginput_total {
	min-height: 0;
	width: auto;
	max-width: 180px;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--gfaw-navy);
	font-size: 24px;
	font-weight: 800;
	text-align: right;
}

/* ---------- step 3: payment ---------- */
.gfaw-polish_wrapper .gfield--type-creditcard > .gfield_label,
.gfaw-polish_wrapper .gfield--type-creditcard > legend.gfield_label { display: none !important; }
.gfaw-polish_wrapper .gfaw-wallets { margin: 0 0 6px; }
.gfaw-polish_wrapper .gfaw-wallets::before {
	content: "Express checkout";
	display: block;
	margin-bottom: 8px;
	color: var(--gfaw-navy);
	font-size: 16px;
	font-weight: 700;
}
.gfaw-polish_wrapper .gfaw-buttons > * { min-height: 52px; }
.gfaw-polish_wrapper .gfaw-apple-pay-button { height: 52px; border-radius: 12px; }
.gfaw-polish_wrapper .gfaw-divider {
	margin: 20px 0 14px;
	color: var(--gfaw-muted);
	font-size: 13px;
	font-weight: 700;
}
.gfaw-polish_wrapper .gfaw-divider::before,
.gfaw-polish_wrapper .gfaw-divider::after { border-top-color: var(--gfaw-line); }
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_card_security_code_icon { display: none !important; }
/* accepted-card icons sit on the label line, right aligned */
.gfaw-polish_wrapper .ginput_container_creditcard .gform_card_icon_container {
	position: absolute;
	top: -6px;
	right: 0;
	margin: 0;
	height: auto;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardextras {
	display: grid !important;
	grid-template-columns: 2fr 1fr;
	gap: 12px;
	align-items: start;
	margin-top: 4px;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_left,
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_right {
	display: block;
	float: none;
	width: auto !important;
	max-width: none;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_left > legend,
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_right > label {
	display: block;
	float: none;
	position: static;
	width: auto;
	margin: 0 0 4px;
	padding: 0;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_right { display: flex; flex-direction: column; }
/* "Expiration Date" above its selects: a floated legend stops being the special rendered legend */
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_left {
	display: flex !important;
	flex-direction: column !important;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardinfo_left > legend {
	float: left;
	width: 100%;
	order: -1;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_card_expiration_container {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	width: 100%;
	margin: 0;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_card_expiration_container > span {
	display: block;
	width: auto !important;
	max-width: none;
	margin: 0;
	padding: 0;
}
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_card_expiration_container select,
.gfaw-polish_wrapper .ginput_container_creditcard .ginput_card_security_code {
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
}

/* ---------- footer buttons ---------- */
.gfaw-polish_wrapper .gform_page_footer {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
	padding: 0;
}
.gfaw-polish_wrapper .gform_page_footer .gform_next_button,
.gfaw-polish_wrapper .gform_page_footer .gform_button {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	min-height: 56px;
	margin: 0 !important;
	border-radius: 14px;
	font-size: 19px;
	font-weight: 700;
}
.gfaw-polish_wrapper .gform_page_footer .gform_previous_button {
	flex: 0 0 auto;
	width: auto !important;
	min-height: 56px;
	margin: 0 !important;
	padding: 0 18px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	box-shadow: none;
	color: var(--gfaw-navy);
	font-size: 16px;
	font-weight: 700;
	text-decoration: underline;
}

/* ---------- small screens ---------- */
@media (max-width: 520px) {
	.gfaw-polish_wrapper .gf_step:not(.gf_step_active) .gf_step_label { display: none; }
	.gfaw-polish_wrapper .gf_step:not(:last-child)::after { width: 18px; }
	.gfaw-polish_wrapper .gfield--type-product .gfield_radio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gfaw-polish_wrapper .gfield--type-product .gfield_radio .gchoice label { min-height: 54px; font-size: 18px; }
	.gfaw-polish_wrapper .ginput_container_creditcard .ginput_cardextras { grid-template-columns: 1fr; }
}
