/* Sizes of the form */
.inquiry-wrapper .hubspot-form {
  --hubspot-form-min-height: 434px;
  --hubspot-form-column-gap: 14px;

  /* Space under a field. */
  --field-space: 18px;
}

.inquiry-wrapper .hubspot-form .hs-form {
  display: flex;
  flex-direction: column;
}

/* The banner keeps the short form of the old page: no WebサイトURL and no
   ご相談事項. The fields are optional, and /contact/ shows them. */
.inquiry-wrapper .hubspot-form .hs-form fieldset:has(.hs_improvementsite__c),
.inquiry-wrapper .hubspot-form .hs-form fieldset:has(.hs_message) {
  display: none;
}

.inquiry-wrapper .hubspot-form .hs-form fieldset:has(> .hs-form-field[style*='display: none']) {
  display: none;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: var(--field-space);
}

/* An error message (13px, 7px under the input, 2px of it taken back by its
   margin) takes the space under the field, so a message of one line does not
   move the fields below. A longer one wraps and pushes them down. */
.inquiry-wrapper .hubspot-form .hs-form .hs-form-field:has(> .hs-error-msgs) {
  padding-bottom: calc(var(--field-space) - 18px);
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display > span {
  color: #000;
  font-size: 14px;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-field > label,
.inquiry-wrapper .hubspot-form .hs-form .hs-form-field > label > span {
  color: #000;
  font-size: 14px;
  font-weight: 500;
}

/* The 必須 badge in place of the required mark (*). */
.inquiry-wrapper .hubspot-form .hs-form .hs-form-field > label .hs-form-required {
  display: inline-block;
  margin-left: 15px;
  padding: 1px 8px;
  vertical-align: middle;
  line-height: 16px;
  border-radius: 7px;
  background: #ffeaea;
  color: #fa5555;
  font-size: 0;
}

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

.inquiry-wrapper .hubspot-form .hs-form .hs-form-field > .hs-field-desc {
  color: #667075;
  font-size: 12px;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  height: 32px;
  padding: 0 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: #7e8087;
  font-size: 14px;
  outline: none;
  transition: 0.4s;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']):hover {
  background-color: #dcdee3;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']):focus {
  border-color: #2f1de3;
  background-color: transparent;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-input.error:not([type='checkbox'], [type='radio']) {
  border-color: #fa5757 !important;
}

.inquiry-wrapper .hubspot-form .hs-form textarea.hs-input:not([type='checkbox'], [type='radio']) {
  height: 96px;
  padding: 8px 10px;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-error-msgs {
  padding-left: 5px;
  color: #fa5555;
  font-size: 10px;
  font-weight: 500;
  margin-top: -2px;
  line-height: 13px;
}

/* reCAPTCHA notice */
.inquiry-wrapper .branding {
  margin-top: 8px;
  color: #667075;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.6;
}

.inquiry-wrapper .branding a {
  color: #667075;
  text-decoration: none;
}

/* Consent checkbox */
.inquiry-wrapper .hubspot-form .hs-form .hs-fieldtype-booleancheckbox:has(> .hs-error-msgs) {
  padding-bottom: 6px;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display {
  gap: 10px;
  color: #000;
  font-size: 14px;
  font-weight: 500;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display input {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid #3620e7;
  border-radius: 3px;
  background-color: #fff;
  box-shadow: none;
  cursor: pointer;
  outline: none;
  transition: 0.3s;
  appearance: none;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display input:hover {
  background-color: #dcdee3;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display input:checked {
  background-color: #3620e7;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display input::after {
  content: '';
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 12px;
  margin-top: -8px;
  margin-left: -3px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.inquiry-wrapper .hubspot-form .hs-form .hs-form-booleancheckbox-display input:checked::after {
  display: block;
}

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

/* Submit button */
.inquiry-wrapper .hubspot-form .hs-form .hs_submit .actions {
  display: flex;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-button {
  width: 100%;
  height: 69px;
  border: 0;
  border-radius: 30px;
  background: #e5eb39;
  color: #000;
  font-size: 28px;
  font-weight: 500;
  transition: 0.4s;
}

.inquiry-wrapper .hubspot-form .hs-form .hs-button:hover {
  background: #f6fa9c;
}

@media (width <= 767px) {
  .inquiry-wrapper .hubspot-form {
    --hubspot-form-min-height: 425px;
  }

  .inquiry-wrapper .hubspot-form .hs-form .hs-button {
    width: 305px;
    height: 60px;
    font-size: 20px;
  }

  .inquiry-wrapper .hubspot-form .hs-form .hs_submit .actions {
    justify-content: center;
  }
}

@media (992px <= width <= 1200px) {
  .inquiry-wrapper .hubspot-form {
    --hubspot-form-min-height: 410px;
    --field-space: 15px;
  }

  .inquiry-wrapper .hubspot-form .hs-form .hs-button {
    width: 305px;
    height: 60px;
    font-size: 20px;
  }

  .inquiry-wrapper .hubspot-form .hs-form .hs_submit .actions {
    justify-content: center;
  }
}
