/* Sizes of the form */
.solution-form .hubspot-form {
  --hubspot-form-min-height: 755px;
  --hubspot-form-column-gap: 0;
}

/* The topics (お問合せ内容) come first. The label is a title between two
   lines, as wide as the section, and the options wrap under it. */
.solution-form .hubspot-form .hs-form fieldset:has(.hs-fieldtype-checkbox) {
  margin-bottom: 0;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox > label {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  color: #2d4e96;
  font-size: 18px;
  font-weight: bold;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox > label::before,
.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox > label::after {
  content: '';
  flex-grow: 1;
  height: 2px;
  background: #2d4e96;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox > label::before {
  margin-right: 10px;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox > label::after {
  margin-left: 10px;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox .inputs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 575px;
  margin: 0 auto;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox .inputs-list li {
  margin-bottom: 30px;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox .inputs-list label {
  margin-right: 10px;
  color: #000;
  font-size: 15px;
  letter-spacing: -0.5px;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox .inputs-list label > span {
  white-space: nowrap;
}

.solution-form .hubspot-form .hs-form .hs-error-msgs {
  margin-top: 2px;
  color: #d34931;
  font-size: 12px;
  line-height: 15px;
}

.solution-form .hubspot-form .hs-form .hs-fieldtype-booleancheckbox .hs-error-msgs {
  margin: 5px 0 15px;
}

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

/* A field: the label on the left, the input on the right. The 必須 badge sits
   inside the input, on its right. */
.solution-form .hubspot-form .hs-form .hs-form-field:not(.hs-fieldtype-checkbox, .hs-fieldtype-booleancheckbox) {
  display: grid;
  grid-template-columns: 190px 1fr;
  padding-bottom: var(--field-gap, 20px);
}

.solution-form
  .hubspot-form
  .hs-form
  .hs-form-field:not(.hs-fieldtype-checkbox, .hs-fieldtype-booleancheckbox)
  > label {
  padding-top: 4px;
  color: #000;
  font-size: 18px;
}

.solution-form .hubspot-form .hs-form .hs-form-field > label .hs-form-required {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #ed7e74;
  font-size: 0;
}

.solution-form .hubspot-form .hs-form .hs-form-field > label .hs-form-required::before {
  content: '必須';
  font-size: 14px;
}

.solution-form .hubspot-form .hs-form .hs-form-field > .input,
.solution-form .hubspot-form .hs-form .hs-form-field > .hs-error-msgs {
  grid-column: 2;
}

/* 氏 and 名 share a row: the label of 名 sits between the two inputs. */
.solution-form .hubspot-form .hs-form fieldset.form-columns-2 {
  display: grid;
  grid-template-columns: 1fr 205px;
}

.solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field {
  grid-template-columns: 30px 1fr;
}

.solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field > label {
  text-align: center;
}

.solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field > .input,
.solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field > .hs-error-msgs {
  grid-column: 2;
}

.solution-form .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  padding: 15px 60px 15px 15px;
  border: 0;
  border-radius: 4px;
  font-size: 18px;
  outline: 0;
}

.solution-form .hubspot-form .hs-form textarea.hs-input {
  height: 80px;
  resize: none;
}

.solution-form .hubspot-form .hs-form .hs-input::placeholder {
  color: #757575;
  opacity: 1;
}

.solution-form .hubspot-form .hs-form .hs-input.error:not([type='checkbox'], [type='radio']) {
  border: 0 !important;
  background: #ffeded;
}

/* Consent checkbox, in line with the inputs. */
.solution-form .hubspot-form .hs-form .hs-fieldtype-booleancheckbox {
  padding: 5px 0 30px 190px;
}

.solution-form .hubspot-form .hs-form .hs-form-booleancheckbox-display {
  color: #000;
  font-size: 12px;
}

.solution-form .hubspot-form .hs-form .hs-form-booleancheckbox-display input {
  margin-right: 10px;
}

.solution-form .hubspot-form .hs-form .hs-form-booleancheckbox-display input.error {
  border-color: #d34931 !important;
}

.solution-form .hubspot-form .hs-form .hs-form-booleancheckbox-display a {
  color: #000;
  text-decoration: underline;
}

.solution-form .hubspot-form .hs-form .hs-button {
  width: 100%;
  padding: 18px 15px;
  border: 0;
  border-radius: 6px;
  background: #ffcd3a;
  color: #000;
  font-size: 20px;
  font-weight: bold;
}

.solution-form .hubspot-form .hs-form .hs-button:hover {
  background: #e6b935;
}

.solution-form .branding {
  text-align: center;
}

@media (width <= 767px) {
  .solution-form .hubspot-form {
    --hubspot-form-min-height: 1063px;
  }

  .solution-form .hubspot-form .hs-form fieldset:has(.hs-fieldtype-checkbox) {
    margin-bottom: 20px;
  }

  .solution-form .hubspot-form .hs-form .hs-fieldtype-checkbox .inputs-list li {
    width: 100%;
    margin-bottom: 10px;
  }

  .solution-form .hubspot-form .hs-form .hs-form-field:not(.hs-fieldtype-checkbox, .hs-fieldtype-booleancheckbox),
  .solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field {
    grid-template-columns: 1fr;
    padding: 15px 0;
    border-top: 1px solid #fff;
  }

  .solution-form
    .hubspot-form
    .hs-form
    .hs-form-field:not(.hs-fieldtype-checkbox, .hs-fieldtype-booleancheckbox)
    > label,
  .solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field > label {
    padding-top: 0;
    text-align: left;
    font-size: 18px;
  }

  .solution-form .hubspot-form .hs-form .hs-form-field > .input,
  .solution-form .hubspot-form .hs-form .hs-form-field > .hs-error-msgs,
  .solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field > .input,
  .solution-form .hubspot-form .hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field > .hs-error-msgs {
    grid-column: 1;
    margin-top: 10px;
  }

  .solution-form .hubspot-form .hs-form fieldset.form-columns-2 {
    display: block;
  }

  /* The badge stays inside the input, under the label. */
  .solution-form .hubspot-form .hs-form .hs-form-field > label .hs-form-required {
    top: 66px;
  }

  .solution-form .hubspot-form .hs-form .hs-form-field > label .hs-form-required::before {
    font-size: 12px;
  }

  .solution-form .hubspot-form .hs-form .hs-fieldtype-booleancheckbox {
    padding: 15px 0;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
  }

  .solution-form .hubspot-form .hs-form .hs-button {
    padding: 15px;
    font-size: 16px;
  }
}

@media (width >= 768px) {
  .solution-form .hubspot-form .hs-form fieldset:has(.hs-fieldtype-checkbox) {
    width: calc(100% + 260px);
    margin-left: -130px;
  }
}
