/* Sizes of the form */
.content-form .hubspot-form {
  /* In rem, as the form: the root font size changes with the width. */
  --hubspot-form-min-height: 43.1rem;
  --hubspot-form-column-gap: 1rem;
}

/* The old LP form had no WebサイトURL. The field is optional, and /contact/
   shows it. */
.content-form .hubspot-form .hs-form fieldset:has(.hs_improvementsite__c) {
  display: none;
}

.content-form .hubspot-form .hs-form .hs-form-field {
  padding-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
}

/* The error message takes the space under the input, so a message of one
   line does not move the fields below. */
.content-form .hubspot-form .hs-form .hs-form-field:has(> .hs-error-msgs) {
  padding-bottom: 0.2rem;
}

.p-top-mv .content-form .hubspot-form .hs-form .hs-form-field > label {
  margin-bottom: 0.2rem;
  font-size: 1.4rem;
  line-height: 1.4286;
}

/* The 必須 badge in place of the required mark (*). */
.content-form .hubspot-form .hs-form .hs-form-field > label .hs-form-required {
  display: inline-block;
  position: relative;
  top: 0.3rem;
  margin-left: 0.6rem;
  padding-inline: 0.3rem;
  border: 1px solid #d42626;
  border-radius: 0.4rem;
  background-color: #fff;
  color: #d42626;
  font-size: 0;
  line-height: 1;
  vertical-align: top;
}

.content-form .hubspot-form .hs-form .hs-form-field > label .hs-form-required::before {
  content: '必須';
  font-size: 9px;
  font-weight: 700;
  line-height: 1.6667;
}

.p-top-mv .content-form .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  height: 2.8rem;
  padding: 0.4rem 0.8rem;
  border: 0;
  border-radius: 0;
  background-color: #fff;
  color: #000;
  font-size: 1.6rem;
  font-weight: 400;
}

.p-top-mv .content-form .hubspot-form .hs-form .hs-fieldtype-textarea textarea.hs-input {
  height: 6rem;
  resize: none;
}

.p-top-mv .content-form .hubspot-form .hs-form .hs-input.error:not([type='checkbox'], [type='radio']) {
  border: 1px solid #d42626 !important;
}

.content-form .hubspot-form .hs-form .hs-error-msgs {
  margin-top: 0.2rem;
  color: #d42626;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

/* The reCAPTCHA notice */
.content-form .branding {
  margin: 1rem auto 0;
  padding-inline: 1rem;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.content-form .branding a {
  color: inherit;
  text-decoration: underline;
}

/* Consent. The checkbox has no label beside it, so the text is the label of
   the list. */
.p-top-mv .content-form .hubspot-form .hs-form .hs-form-booleancheckbox-display {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.5;
}

.p-top-mv .content-form .hubspot-form .hs-form .hs-form-booleancheckbox-display input {
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  margin-top: 0.1rem;
}

.content-form .hubspot-form .hs-form .hs-form-booleancheckbox-display a {
  font-weight: 700;
  text-decoration: underline;
}

/* Submit button. It is an <input>, so it takes the look of the old button
   itself. */
.content-form .hubspot-form .hs-form .hs_submit {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

.content-form .hubspot-form .hs-form .hs_submit .actions {
  flex: 1;
  max-width: 31.5rem;
}

.p-top-mv .content-form .hubspot-form .hs-form .hs-button {
  width: 100%;
  padding: 1.2rem 0;
  border: 0;
  border-radius: 5rem;
  background: linear-gradient(to right, #e5eb39 0%, #e9ee6f 100%);
  color: #000;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  transition: all 0.3s;
}

.content-form .hubspot-form .hs-form .hs-button:hover,
.content-form .hubspot-form .hs-form .hs-button:focus {
  opacity: 0.7;
}

@media (width <= 767px) {
  .content-form .hubspot-form {
    --hubspot-form-min-height: 42.3rem;
  }

  .content-form .hubspot-form .hs-form .hs_submit .actions {
    max-width: 24.5rem;
  }

  .p-top-mv .content-form .hubspot-form .hs-form .hs-button {
    padding-block: 1.1rem;
    font-size: 1.6rem;
    line-height: 1.5;
  }
}
