/*
Pledge Amount field: the big "$ 0" amount input and its preset buttons. Shared by every form
that takes an amount (Templates/ChallengeAcceptForm.tpl and Templates/DonationAmountForm.tpl) so
the field looks and behaves the same everywhere. JS/PledgeAmount.js wires it. Pages opt in with
<CSS:PledgeAmount.css /> and <JS:PledgeAmount.js />.

Base.css's .FormRowPledgeAmount .FormFieldTextInput reset removes the global text field box from
this input.
 */
.FormRowPledgeAmount {
	margin-bottom:                 48px;
}

.FormRowPledgeAmount .FormFieldInputArea {
	align-items:                   center;
	appearance:                    none;
	border-bottom:                 1px solid #33588A;
	display:                       flex;
	font-size:                     48px;
	font-weight:                   300;
	line-height:                   1;
	transition:                    var(--InteractiveTransitionDuration);
}

.FormRowPledgeAmount .FormFieldInputArea:has(:focus-visible) {
	border-color:                  #ffffff;
}

/* A typed or preset amount turns the rule white, as on the filled Sketch frames. */
.FormRowPledgeAmount .FormFieldInputArea:has(.FormFieldTextInput:not(:placeholder-shown)) {
	border-color:                  #ffffff;
}

.FormRowPledgeAmount .FormFieldInputArea:has(:user-invalid) {
	border-color:                  var(--Colors-Error);
}

.FormRowPledgeAmount .FormFieldInputPrefix {
	flex:                          0 0 30px;
	text-align:                    right;
}

/* Matches the "0" placeholder's colour while the field is empty. */
.FormRowPledgeAmount .FormFieldInputArea:has(.FormFieldTextInput:placeholder-shown) .FormFieldInputPrefix {
	color:                         var(--Colors-Muted);
}

.FormRowPledgeAmount .FormFieldTextInput {
	appearance:                    none;
	background:                    none;
	border:                        none;
	color:                         inherit;
	flex:                          1 1 auto;
	font-size:                     45px;
	height:                        50px;
	padding:                       0 30px 0 0;
	text-align:                    center;
}

.FormRowPledgeAmount .FormFieldInput {
	outline:                       none;
}

.FormRowPledgeAmount .FormFieldInput::placeholder {
	color:                         var(--Colors-Muted);
}

.FormRowPledgeAmount .FormFieldModifierButtons {
	display:                       flex;
	flex-wrap:                     wrap;
	gap:                           10px;
	margin-top:                    18px;
}

.FormRowPledgeAmount .FormFieldModifierButton {
	--Typeface-FontWght:           600;

	--ThisButton-BackgroundColor:  #1A437C;
	--ThisButton-Color:            #ffffff;

	--ThisButtonHover-BackgroundColor: var(--Colors-Brand-Primary);
	--ThisButtonHover-Color:       var(--Colors-Brand-Secondary);

	--ThisButtonFocusVisible-BackgroundColor: var(--Colors-Brand-Primary);
	--ThisButtonFocusVisible-Color: var(--Colors-Brand-Secondary);

	border-radius:                 19px;
	flex:                          1 1 calc(25% - 10px);
	font-family:                   var(--Typeface03-FontFamily);
	font-size:                     16px;
	min-height:                    38px;
	padding:                       8px 12px 2px;
}
