/*
 * Base styles of the embedded forms (.hubspot-form).
 *
 * Takes away the site-wide rules that the form markup matches (the reset of
 * `*`) and gives every input the same plain start. The layout and the colours
 * are set by the CSS of each page.
 */

.hubspot-form {
  /* Height kept free while the form loads, so the content below does not
     move. */
  --hubspot-form-min-height: 0;

  /* Space between the fields of a row, such as 姓 and 名. */
  --hubspot-form-column-gap: 20px;

  min-height: var(--hubspot-form-min-height);
}

/* A fieldset is a row of fields. The browser gives it a border. */
.hubspot-form .hs-form fieldset {
  display: flex;
  gap: var(--hubspot-form-column-gap);
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.hubspot-form .hs-form .hs-form-field {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.hubspot-form .hs-form label {
  display: block;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

/* Every input starts from the same plain box. The site-wide reset sets no
   border or font, so an email or tel input would get those of the browser. */
.hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 0;
  background-color: #fff;
  box-shadow: none;
  color: #000;
  font-family: inherit;
  font-size: inherit;
  appearance: none;
}

.hubspot-form .hs-form textarea.hs-input {
  resize: vertical;
}

/* Checkbox and radio lists, and the consent checkbox. */
.hubspot-form .hs-form .inputs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hubspot-form .hs-form .inputs-list label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hubspot-form .hs-form .inputs-list input {
  flex-shrink: 0;
  margin: 0;
}

/* No required mark (*) after the consent text. */
.hubspot-form .hs-form .hs-form-booleancheckbox-display .hs-form-required {
  display: none;
}

/* The list of messages under a field. */
.hubspot-form .hs-form .hs-error-msgs {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The summary of the errors under the form. Each field shows its own
   message instead. */
.hubspot-form .hs-form .hs_error_rollup {
  display: none;
}

/* The reCAPTCHA badge. The notice under the form says the same as text. */
.hubspot-form .hs-form .hs_recaptcha {
  position: absolute;
  margin: 0;
  padding: 0;
  visibility: hidden;
}

/* The button is an <input>, which does not inherit the font of the page by
   default. */
.hubspot-form .hs-form .hs-button {
  font-family: inherit;
  line-height: inherit;
  white-space: normal;
  cursor: pointer;
  appearance: none;
}
