/* Layout: the parent's 12-column `.grid`; text beside the panel (`panel`,
   text at 5/12, panel at 6/12 in columns 7–12) or above it (`full`). */
.form__layout {
  row-gap: var(--spacer--lg);
}

.form__layout--panel {
  align-items: center;
}

@media (min-width: 768px) {
  .section-form .form__layout--panel > .form__panel-column {
    grid-column: 7 / span 6 !important;
  }

  /* No headline and no content: no text column is printed, so the panel
     column spans the container and the panel is centred in it. */
  .section-form .form__layout--panel.form__layout--no-intro > .form__panel-column {
    grid-column: 1 / -1 !important;
  }

  /* `panel` layout: the panel is 34rem wide, centred in its column. */
  .section-form .form__layout--panel .form__panel {
    max-width: 34rem;
    margin-inline: auto;
  }
}

.form__layout--full .form__text {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.form__headline {
  margin-bottom: var(--spacer--lg);
}

.form__content :last-child {
  margin-bottom: 0;
}

/* Panel: the picked Color Scheme (sand by default) on a rounded card. */
.form__panel {
  display: flex;
  flex-direction: column;
  gap: var(--spacer--lg);
  padding: var(--spacer--lg);
  border-radius: var(--border-radius--md);
  overflow: hidden;
  background-color: var(--background);
  color: var(--text);
}

.form__panel-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius--md);
}

.form__panel-title {
  margin-bottom: 0;
}

/* Input skin: white pills with no border on the Gravity Forms markup. */
.section-form .gform_wrapper {
  --input--background: var(--white);
  --input--border: 0;
  --input--border-radius: 3.75rem;
  --input--min-height: 2.25rem;
  --input--font-size: 0.75rem;
}

.section-form .gform_wrapper input[type="text"],
.section-form .gform_wrapper input[type="email"],
.section-form .gform_wrapper input[type="tel"],
.section-form .gform_wrapper input[type="number"],
.section-form .gform_wrapper input[type="url"],
.section-form .gform_wrapper select,
.section-form .gform_wrapper textarea {
  width: 100%;
  background: var(--input--background, var(--white));
  border: var(--input--border, 0);
  border-radius: var(--input--border-radius, 3.75rem);
  min-height: var(--input--min-height, 2.25rem);
  font-family: inherit;
  font-size: var(--input--font-size, 0.75rem);
  color: var(--black);
  padding-inline: var(--spacer--sm);
}

/* Single-line inputs: the text and placeholder start clear of the pill's
   corner curve (1.25rem each side). Matched through `.gfield` to outrank
   Gravity Forms' own fixed padding on the same inputs, which loads after
   this sheet. Reaches the Square cardholder input (`.sq-input`) too. */
.section-form .gform_wrapper .gfield input[type="text"],
.section-form .gform_wrapper .gfield input[type="email"],
.section-form .gform_wrapper .gfield input[type="tel"],
.section-form .gform_wrapper .gfield input[type="number"],
.section-form .gform_wrapper .gfield input[type="url"] {
  padding-inline: calc(var(--spacer--base) * 1.25);
}

.section-form .gform_wrapper textarea {
  border-radius: var(--border-radius--md);
  padding-block: var(--spacer--xs);
}

/* Square card field: two rows of card details in one framed iframe, so it
   takes the textarea's rounded corners instead of the pill's; with the
   pill radius the card icon and MM/YY sat inside the corner curve and the
   iframe's own rounding clipped them. The Square SDK copies the cardholder
   input's radius onto the frame and the iframe at runtime through an id
   selector (`#input_…_1.sq-card-wrapper …`); the never-matching id inside
   `:is()` lifts these rules above it with no important flag. */
.section-form .gform_wrapper .ginput_container_square_card :is(.sq-card-iframe-container, #_specificity-over-square-sdk),
.section-form .gform_wrapper .ginput_container_square_card :is(.sq-card-iframe-container, #_specificity-over-square-sdk)::before,
.section-form .gform_wrapper .ginput_container_square_card :is(.sq-card-component, #_specificity-over-square-sdk) {
  border-radius: var(--border-radius--md);
}

/* Select: the browser's chevron gives way to the kit's, a black chevron
   drawn on the container's ::after by a CSS mask (coloured by its
   background-color, the D115 pattern of the CTA band leaf). The select is
   exactly the input height, so the chevron centres on it whatever sits
   below it (an address sub-label); with sub-labels above, the chevron sits
   at the container's foot instead. The end padding keeps the text clear of
   it; the chevron lets clicks through to the select. */
.section-form .gform_wrapper .gfield .ginput_container_select select,
.section-form .gform_wrapper .gfield .ginput_address_state select,
.section-form .gform_wrapper .gfield .ginput_address_country select {
  -webkit-appearance: none;
  appearance: none;
  block-size: var(--input--min-height, 2.25rem);
  padding-block: 0;
  padding-inline: var(--spacer--sm) var(--spacer--xl);
  cursor: pointer;
}

.section-form .gform_wrapper .gfield .ginput_container_select,
.section-form .gform_wrapper .gfield .ginput_address_state,
.section-form .gform_wrapper .gfield .ginput_address_country {
  position: relative;
}

.section-form .gform_wrapper .gfield .ginput_container_select::after,
.section-form .gform_wrapper .gfield .ginput_address_state::after,
.section-form .gform_wrapper .gfield .ginput_address_country::after {
  --form-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0H1.4L5 4.2L8.6 0H10L5 6Z'/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: var(--spacer--sm);
  inline-size: 0.625rem;
  block-size: var(--input--min-height, 2.25rem);
  background-color: var(--black);
  -webkit-mask-image: var(--form-chevron);
  mask-image: var(--form-chevron);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 0.625rem 0.375rem;
  mask-size: 0.625rem 0.375rem;
  pointer-events: none;
}

.section-form .gform_wrapper .field_sublabel_above .ginput_address_state::after,
.section-form .gform_wrapper .field_sublabel_above .ginput_address_country::after {
  inset-block: auto 0;
}

.section-form .gform_wrapper ::placeholder {
  color: var(--masala);
  opacity: 1;
}

.section-form .gform_wrapper .gfield_label,
.section-form .gform_wrapper .gfield label.gform-field-label--type-sub,
.section-form .gform_wrapper .gfield_radio label,
.section-form .gform_wrapper .gfield_checkbox label {
  font-size: var(--input--font-size, 0.75rem);
  font-weight: var(--font-weight--normal);
  color: var(--black);
}

/* File upload: one pill input; the browse button is the kit's orange pill
   head inside it. The rules line is in the input text size. */
.section-form .gform_wrapper .gfield input[type="file"] {
  width: 100%;
  background: var(--input--background, var(--white));
  border: var(--input--border, 0);
  border-radius: var(--input--border-radius, 3.75rem);
  min-height: var(--input--min-height, 2.25rem);
  padding: 0;
  padding-inline-end: var(--spacer--sm);
  font-family: inherit;
  font-size: var(--input--font-size, 0.75rem);
  color: var(--black);
  cursor: pointer;
}

.section-form .gform_wrapper .gfield input[type="file"]::file-selector-button {
  min-height: var(--input--min-height, 2.25rem);
  margin: 0;
  margin-inline-end: var(--spacer--sm);
  padding-block: 0;
  padding-inline: var(--spacer--md);
  border: 0;
  border-radius: var(--input--border-radius, 3.75rem);
  background-color: var(--orange);
  color: var(--white);
  font-family: inherit;
  font-size: var(--input--font-size, 0.75rem);
  font-weight: var(--font-weight--bold);
  text-transform: uppercase;
  cursor: pointer;
}

.section-form .gform_wrapper .gfield input[type="file"]:hover::file-selector-button,
.section-form .gform_wrapper .gfield input[type="file"]:focus::file-selector-button {
  background-color: var(--secondary);
  color: var(--cream);
}

.section-form .gform_wrapper .gfield .gform_fileupload_rules {
  font-size: var(--input--font-size, 0.75rem);
}

/* Phone: the country selector and the number input read as one joined
   pill (paper, no border, the input height and text size); the selector
   holds the start corners, the input the end corners, and grows to the
   input's height where Gravity Forms makes inputs taller. The country list
   (Gravity Forms' dropdown) is left as Gravity Forms paints it. */
.section-form .gform_wrapper .gfield--type-phone .ginput_country-selector_container .gform-phone__country-selector,
.section-form .gform_wrapper .gfield--type-phone .ginput_country-selector_container .gform-phone__country-selector:hover,
.section-form .gform_wrapper .gfield--type-phone .ginput_country-selector_container .gform-phone__country-selector:focus {
  flex-grow: 1;
  min-height: var(--input--min-height, 2.25rem);
  margin: 0;
  padding-block: 0;
  padding-inline: var(--spacer--sm) var(--spacer--xs);
  border: 0;
  border-radius: 0;
  border-start-start-radius: var(--input--border-radius, 3.75rem);
  border-end-start-radius: var(--input--border-radius, 3.75rem);
  background: var(--input--background, var(--white));
  font-family: inherit;
  font-size: var(--input--font-size, 0.75rem);
  color: var(--black);
}

.section-form .gform_wrapper .gfield--type-phone .ginput_phone_container .gform-phone__input {
  min-height: var(--input--min-height, 2.25rem);
  border: 0;
  border-radius: 0;
  border-start-end-radius: var(--input--border-radius, 3.75rem);
  border-end-end-radius: var(--input--border-radius, 3.75rem);
  background: var(--input--background, var(--white));
  font-size: var(--input--font-size, 0.75rem);
}

/* Number range instruction ("Please enter a number greater than or equal
   to 2."): hidden for a quiet form before interaction. It stays in the DOM,
   so the input's aria-describedby still resolves; Gravity Forms prints it
   only while the field has not failed validation, and prints the field's
   own message after a failed submit. */
.section-form .gform_wrapper .gfield--type-number .gfield_description.instruction {
  display: none;
}

.section-form .gform_wrapper .gfield_required {
  color: var(--error);
}

/* Required marker: a red asterisk whatever the form's own Required Indicator
   setting is; the "(Required)" or custom text stays for screen readers only.
   The "indicates required fields" legend, when Gravity Forms prints it,
   shows the same asterisk. */
.section-form .gform_wrapper .gfield_required .gfield_required_text,
.section-form .gform_wrapper .gfield_required .gfield_required_custom,
.section-form .gform_wrapper .gform_required_legend .gfield_required_text,
.section-form .gform_wrapper .gform_required_legend .gfield_required_custom {
  font-size: 0;
}

.section-form .gform_wrapper .gfield_required .gfield_required_text::after,
.section-form .gform_wrapper .gfield_required .gfield_required_custom::after,
.section-form .gform_wrapper .gform_required_legend .gfield_required_text::after,
.section-form .gform_wrapper .gform_required_legend .gfield_required_custom::after {
  content: "*";
  content: "*" / "";
  font-size: var(--input--font-size, 0.75rem);
  font-style: normal;
  color: var(--error);
}

/* Checkboxes and radios (Figma "Form Section"): the browser's control gives
   way to a thin black ring, a 0.25rem-rounded square or a circle, empty
   until checked; checked, it holds a solid orange mark (a square, a dot)
   centred with the panel showing around it. */
.section-form .gform_wrapper .gfield input[type="checkbox"],
.section-form .gform_wrapper .gfield input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  inline-size: 0.8125rem;
  block-size: 0.8125rem;
  padding: 0;
  border: 0.0625rem solid var(--black);
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  vertical-align: middle;
  cursor: pointer;
}

.section-form .gform_wrapper .gfield input[type="checkbox"] {
  border-radius: calc(var(--border-radius--sm) / 2);
}

.section-form .gform_wrapper .gfield input[type="radio"] {
  border-radius: var(--border-radius--circle);
}

.section-form .gform_wrapper .gfield input[type="checkbox"]:checked {
  background-image: linear-gradient(var(--orange), var(--orange));
  background-size: 0.4375rem 0.4375rem;
}

.section-form .gform_wrapper .gfield input[type="radio"]:checked {
  background-image: radial-gradient(circle, var(--orange) 0 0.21875rem, transparent 0.25rem);
}

.section-form .gform_wrapper .gfield input[type="checkbox"]:focus-visible,
.section-form .gform_wrapper .gfield input[type="radio"]:focus-visible {
  outline: 0.125rem solid var(--orange);
  outline-offset: 0.125rem;
}

/* Multi-step progress bar: orange fill on a white (--white) track. */
.section-form .gform_wrapper .gf_progressbar_title {
  color: var(--black);
  font-size: var(--input--font-size, 0.75rem);
}

.section-form .gform_wrapper .gf_progressbar.gf_progressbar {
  background: var(--white);
}

.section-form .gform_wrapper .gf_progressbar .gf_progressbar_percentage[class*="percentbar_"] {
  background: var(--orange);
  color: var(--white);
}

/* Submit, Next and Previous: the kit's small orange pill. Previous is
   matched with `.button` to outrank Gravity Forms' white secondary button. */
.section-form .gform_wrapper .gform_footer,
.section-form .gform_wrapper .gform_page_footer {
  justify-content: center;
  text-align: center;
}

.section-form .gform_wrapper .gform_button,
.section-form .gform_wrapper .gform_next_button,
.section-form .gform_wrapper .gform_page_footer .gform_previous_button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacer--xs) var(--spacer--lg);
  border: 0;
  border-radius: 1rem;
  background-color: var(--orange);
  color: var(--white);
  font-family: inherit;
  font-size: var(--input--font-size, 0.75rem);
  font-weight: var(--font-weight--bold);
  text-transform: uppercase;
  cursor: pointer;
}

.section-form .gform_wrapper .gform_button:hover,
.section-form .gform_wrapper .gform_button:focus,
.section-form .gform_wrapper .gform_next_button:hover,
.section-form .gform_wrapper .gform_next_button:focus,
.section-form .gform_wrapper .gform_page_footer .gform_previous_button.button:hover,
.section-form .gform_wrapper .gform_page_footer .gform_previous_button.button:focus {
  background-color: var(--secondary);
  color: var(--cream);
}

/* Submitting: Gravity Forms adds `gform-has-spinner` and a `.gform-loader`
   ring to the submit button and makes its label transparent. The label
   stays in the pill's colours (outranking Gravity Forms' theme rule) and
   the ring becomes a small arc of the label colour in the button's end
   padding, so the button keeps its label and size while it spins. */
.section-form .gform_wrapper.gravity-theme button.gform_button.gform-has-spinner {
  position: relative;
  color: var(--white);
}

.section-form .gform_wrapper.gravity-theme button.gform_button.gform-has-spinner:hover,
.section-form .gform_wrapper.gravity-theme button.gform_button.gform-has-spinner:focus {
  color: var(--cream);
}

.section-form .gform_wrapper .gform_button .gform-loader {
  box-sizing: border-box;
  inset-block: 0;
  inset-inline: auto var(--spacer--xs);
  inline-size: 0.75rem;
  block-size: 0.75rem;
  margin-block: auto;
  margin-inline: 0;
  border-block-start: 0.125rem solid var(--white);
  border-inline-end: 0.125rem solid var(--white);
  border-block-end: 0;
  border-inline-start: 0;
}

.section-form .gform_wrapper .gform_button:hover .gform-loader,
.section-form .gform_wrapper .gform_button:focus .gform-loader {
  border-block-start-color: var(--cream);
  border-inline-end-color: var(--cream);
}
