/*
General
 */


/*
Page Header

The challenge thumbnail card sits above the h1, as on the Sketch "Challenges - Accept" frame:
the card's top is 169px down the frame, which is the header (85px) and main's padding-top
(24px) plus this margin.
 */
.PageHeader {
	margin-top:                    60px;
	overflow-x:                    clip;
	position:                      relative;
}

.PageHeaderInner {
	margin-inline:                 auto;
	max-width:                     calc(var(--ReadableContent-MaxWidth) + 2 * var(--Viewport-InlinePadding));
	padding-inline:                var(--Viewport-InlinePadding);
	position:                      relative;
}

.PageHeaderInner h1 {
	--Typeface-FontWght:           800;
	font-family:                   var(--Typeface02-FontFamily);
	font-size:                     54px;
	font-variation-settings:       var(--Typeface02-FontVariationSettings);
	font-weight:                   var(--Typeface-FontWght);
	line-height:                   42px;
	margin:                        16px 0;
	text-align:                    center;
	text-transform:                uppercase;
}

/*
Thumbnail

The same card as the detail page's ChallengeThumbnail: a square-cornered WebP with the radius
owned here.
 */
.ChallengeThumbnail {
	aspect-ratio:                  327 / 180;
	border-radius:                 24px;
	display:                       block;
	height:                        auto;
	object-fit:                    cover;
	width:                         100%;
}

/*
Clouds

Two cloud outlines from the Sketch frame, absolutely positioned and centred on the frame's
centre line (the design's x offsets are -45px and -5px at 375px wide), with the overflow clipped
on the section so neither causes a horizontal scroll. The top one sits from y 84.5 down the frame,
above the header's bottom edge; the bottom one sits 24.6px under the submit button.
 */
.ChallengeAcceptClouds {
	display:                       block;
	height:                        auto;
	left:                          50%;
	max-width:                     none;
	pointer-events:                none;
	position:                      absolute;
}

.ChallengeAcceptCloudsTop {
	margin-left:                   -232.5px;
	top:                           -84.5px;
	width:                         460px;
}

.PageForm {
	overflow-x:                    clip;
	padding-bottom:                70.6px;
	position:                      relative;
}

.ChallengeAcceptCloudsBottom {
	bottom:                        0;
	margin-left:                   -192.5px;
	width:                         380px;
}

/*
Page Content
 */
.PageContentInner,
.PageFormInner {
	margin-inline:                 auto;
	max-width:                     calc(var(--ReadableContent-MaxWidth) + 2 * var(--Viewport-InlinePadding));
	padding-inline:                var(--Viewport-InlinePadding);
}

.ChallengeHeadingArea {
	margin-bottom:                 24px;
	text-align:                    center;
}

.ChallengeTitle {
	font-family:                   var(--Typeface02-FontFamily);
	font-size:                     32px;
	font-variation-settings:       var(--Typeface02-FontVariationSettings);
	line-height:                   32px;
	margin-bottom:                 4px;
}

.ChallengeCreatedBy {
	color:                         #CCD5E2;
	font-size:                     14px;
	font-weight:                   500;
	line-height:                   18px;
	margin:                        0;
}

/*
Notice

Shown instead of the form when the challenge isn't Active (JS/ChallengeAccept.js follows its
data-redirect-url to the detail page), and when the URL has no challenge at all.
 */
.ChallengeNotice {
	text-align:                    center;
}

.ChallengeNoticeText {
	font-size:                     16px;
	line-height:                   24px;
	margin-bottom:                 24px;
}

.ChallengeNoticeButton {
	width:                         100%;
}

.ChallengeNoticeButtons {
	display:                       flex;
	flex-direction:                column;
	gap:                           16px;
}

/*
Form
 */
.FormRow {
	margin-bottom:                 24px;
}

.FormFieldGroupLabel {
	--Typeface-FontWght:           700;
	align-items:                   center;
	display:                       flex;
	font-family:                   var(--Typeface01-FontFamily);
	font-size:                     24px;
	font-variation-settings:       var(--Typeface01-FontVariationSettings);
	font-weight:                   var(--Typeface-FontWght);
	gap:                           8px;
	line-height:                   22px;
	margin-bottom:                 16px;
	text-transform:                uppercase;
}

.FormFieldGroupLabel > .StepCounter {
	background-color:              var(--Colors-Brand-Primary);
	border-radius:                 13px;
	color:                         var(--Colors-Brand-Secondary);
	display:                       inline-block;
	font-size:                     22.58px;
	height:                        25px;
	line-height:                   1;
	min-width:                     25px;
	text-align:                    center;
}

/*
Step labels on this form are mixed case, as on the Sketch frames: "Pick Side:" and "Pledge Amount:"
are DegularDisplay-Bold (line-height 24px), "Contact Info:" is Degular-Bold (22px). The gap under
each label puts the control at its frame y: 26px under steps 1 and 3, 47px under step 2, which
puts the amount's rule 122px under the label's top edge as in the frame.
 */
.ChallengeAcceptForm .FormFieldGroupLabel {
	text-transform:                none;
}

.ChallengeAcceptForm .FormRowPickASide .FormFieldGroupLabel,
.ChallengeAcceptForm .FormRowPledgeAmount .FormFieldGroupLabel {
	font-family:                   var(--Typeface02-FontFamily);
	font-variation-settings:       var(--Typeface02-FontVariationSettings);
	line-height:                   24px;
}

.ChallengeAcceptForm .FormRowPickASide .FormFieldGroupLabel,
.ChallengeAcceptForm .FormRowContactInfo .FormFieldGroupLabel {
	margin-bottom:                 26px;
}

.ChallengeAcceptForm .FormRowPledgeAmount .FormFieldGroupLabel {
	margin-bottom:                 47px;
}

/*
Form:                          Pick A Side
 */
.FormRowPickASide {
	margin-bottom:                 40px;
}

.FormRowPickASide .FormFieldRadioGroup {
	display:                       flex;
	gap:                           16px;
}

.FormRowPickASide .FormFieldRadio {
	flex:                          1 1 50%;
	position:                      relative;
}

.FormRowPickASide .FormFieldRadioInput {
	appearance:                    none;
	background-color:              var(--Colors-Brand-Secondary);
	border-radius:                 16px;
	display:                       block;
	height:                        120px;
	margin:                        0;
	position:                      relative;
	transition:                    0.25s;
	width:                         100%;
	z-index:                       1;
}

/* Selected: a vertical gradient with a 4px-sigma glow in the same hue (Sketch "Accept Side 1/2"). */
.FormRowPickASide .ThemeAccent01 .FormFieldRadioInput:checked {
	background-color:              var(--Colors-Secondary-Accent01);
	background-image:              linear-gradient(180deg, #97D700 0%, #C8ED00 100%);
	box-shadow:                    0 0 8px #97D700;
}

.FormRowPickASide .ThemeAccent03 .FormFieldRadioInput:checked {
	background-color:              var(--Colors-Secondary-Accent03);
	background-image:              linear-gradient(180deg, #00C389 0%, #00E3BE 100%);
	box-shadow:                    0 0 8px #00C389;
}

.FormRowPickASide .FormFieldRadioInput:focus-visible {
	box-shadow:                    var(--InteractiveFocusVisible-BoxShadow);
	outline:                       none;
}

.FormRowPickASide .FormFieldLabel {
	--Typeface-FontWght:           700;
	font-family:                   var(--Typeface01-FontFamily);
	font-size:                     18px;
	font-variation-settings:       var(--Typeface01-FontVariationSettings);
	font-weight:                   var(--Typeface-FontWght);
	left:                          0;
	line-height:                   20px;
	pointer-events:                none;
	position:                      absolute;
	text-align:                    center;
	top:                           50%;
	transform:                     translateY(-50%);
	transition:                    0.25s;
	width:                         100%;
	z-index:                       10;
}

.FormRowPickASide .FormFieldRadio:has(.FormFieldRadioInput:checked) .FormFieldLabel {
	color:                         var(--Colors-Secondary-Accent02);
}

/*
Form:                          Organization Information
 */
.FormRowOrganizationInformation {
	margin-bottom:                 40px;
}

/*
Contact Info: the label rows sit 24px apart in the frame (18px label, 6px gap, 56px field), the
phone field is 40px above Create Account, and the Text Message Opt-In group is 24px below it.
 */
.FormRowContactInfo {
	margin-bottom:                 0;
}

.ChallengeAcceptForm .FormFieldLabel:has(+ input) {
	margin-bottom:                 6px;
}

.FormRowPhone {
	margin-bottom:                 40px;
}

/*
Form Error Messages
 */
.FormErrorMessages {
	margin-block:                  -8px -28px;
}

/*
Form Buttons
 */
.ChallengeAcceptForm .FormButtons {
	margin-top:                    44px;
}

.ChallengeAcceptForm .FormSubmitButton {
	width:                         100%;
}