/* Sizes of the form */
.home-mv__form .hubspot-form {
  --hubspot-form-min-height: 423px;
  --hubspot-form-column-gap: 0;
}

@media (width <= 1199px) {
  .home-mv__form .hubspot-form {
    --hubspot-form-min-height: 650px;
  }
}

/* The white card around the heading, the form and the reCAPTCHA notice. */
.home-mv__form-card {
  max-width: 470px;
  margin: 0 auto;
  padding: 40px 24px;
  border-radius: 20px;
  background: #fff;
}

.home-mv__form-card .home-mv__form__title {
  padding-bottom: 2px;
  color: #1a469d;
  font-size: 21px;
  font-weight: 700;
  text-align: center;
}

.home-mv__form-card .home-mv__form__subtitle {
  margin: 0;
  padding-bottom: 16px;
  color: #1a469d;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* home-mv.min.css draws every form in .home-mv__form as a card. */
.home-mv__form .hubspot-form .hs-form {
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
}

/* A field is a row: the label on the left, the input on the right. The
   small paddings keep the places of the old table cells. */
.home-mv__form .hubspot-form .hs-form .hs-form-field {
  display: flex;
  flex-wrap: wrap;
  padding: 2px 3px 26px 2px;
  font-size: 13px;
}

.home-mv__form .hubspot-form .hs-form .hs-form-field > label {
  display: flex;
  flex: 0 0 100px;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding-right: 10px;
  color: #667075;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

/* 姓 and 名 share the space after their labels equally. */
.home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-form-field {
  flex: 1 1 100px;
}

.home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-form-field + .hs-form-field {
  flex-basis: 65px;
}

.home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-form-field + .hs-form-field > label {
  flex-basis: 65px;
}

.home-mv__form .hubspot-form .hs-form .hs-form-field > .input {
  flex: 1 1 0;
  min-width: 0;
  margin: 1px 0 0 3px;
}

/* The help text comes before the input in the markup, but is shown under it. */
.home-mv__form .hubspot-form .hs-form .hs-form-field > .hs-field-desc {
  order: 1;
  flex: 0 0 100%;
  margin: 2px 0 0;
  padding: 0 0 0 103px;
  color: #667075;
  font-size: 12px;
  line-height: 1.63;
}

/* The 必須 badge in place of the required mark (*). */
.home-mv__form .hubspot-form .hs-form .hs-form-field > label .hs-form-required {
  flex-shrink: 0;
  padding: 2px 5px;
  border-radius: 4px;
  background: #469cc7;
  color: #fff;
  font-size: 0;
  white-space: nowrap;
}

.home-mv__form .hubspot-form .hs-form .hs-form-field > label .hs-form-required::before {
  content: '必須';
  font-size: 12px;
  font-weight: 700;
}

.home-mv__form .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  height: 40px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: #cbe6f0;
  font-size: 13px;
  outline: none;
}

.home-mv__form .hubspot-form .hs-form .hs-input::placeholder {
  color: #92a1a8;
}

.home-mv__form .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']):hover,
.home-mv__form .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']):focus {
  background: #b5ddef;
}

.home-mv__form .hubspot-form .hs-form .hs-input.error:not([type='checkbox'], [type='radio']) {
  border: 1px solid #f95154 !important;
  background: #ffe8e9;
}

/* The error message sits in the space under the input. */
.home-mv__form .hubspot-form .hs-form .hs-error-msgs {
  position: absolute;
  bottom: 9px;
  left: 104px;
  color: #f95154;
  font-size: 10px;
  font-weight: 700;
}

.home-mv__form .hubspot-form .hs-form .hs-fieldtype-booleancheckbox .hs-error-msgs {
  bottom: 0;
}

/* 姓 and 名: the inputs are too narrow for the message, so it starts under
   the label, on one line. */
.home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-error-msgs {
  left: 2px;
  white-space: nowrap;
}

/* Consent checkbox */
.home-mv__form .hubspot-form .hs-form .hs-fieldtype-booleancheckbox {
  padding-bottom: 22px;
  padding-left: 102px;
}

.home-mv__form .hubspot-form .hs-form .hs-form-booleancheckbox-display {
  gap: 0;
  color: #0c82bc;
  font-size: 14px;
  font-weight: 700;
}

.home-mv__form .hubspot-form .hs-form .hs-form-booleancheckbox-display input {
  margin: 0 4px 0 0;
}

.home-mv__form .hubspot-form .hs-form .hs-form-booleancheckbox-display a {
  margin-right: 10px;
  color: #0c82bc;
  text-decoration: underline;
}

/* Submit button. It is an <input>, which has no content, so its icon is
   drawn on the element around it. */
.home-mv__form .hubspot-form .hs-form .hs_submit {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.home-mv__form .hubspot-form .hs-form .hs_submit .actions {
  position: relative;
}

.home-mv__form .hubspot-form .hs-form .hs_submit .actions::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50px;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23191B1C' stroke-width='2'%3E%3Cpath d='M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1Z'/%3E%3Cpath d='M10.834 7.89047L15.1402 12.1966L10.834 16.5028' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
  pointer-events: none;
}

.home-mv__form .hubspot-form .hs-form .hs-button {
  padding: 15px 50px 15px 90px;
  border: 0;
  border-radius: 50px;
  background: #fac84c;
  box-shadow: 0 3px 6px 0 #00000042;
  color: #191b1c;
  font-size: 20px;
  font-weight: 600;
}

.home-mv__form .hubspot-form .hs-form .hs-button:hover {
  background: #edb407;
}

/* Labels above the inputs, and 姓 above 名 */
@media (width <= 1199px) {
  .home-mv__form-card {
    padding: 18px;
  }

  .home-mv__form .hubspot-form .hs-form {
    padding-top: 2px;
  }

  .home-mv__form .hubspot-form .hs-form .form-columns-2 {
    flex-direction: column;
  }

  .home-mv__form .hubspot-form .hs-form .hs-form-field,
  .home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-form-field,
  .home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-form-field + .hs-form-field {
    flex: 1 1 auto;
    flex-flow: column nowrap;
    padding: 0 2px 20px;
  }

  .home-mv__form .hubspot-form .hs-form .hs-form-field > label,
  .home-mv__form .hubspot-form .hs-form .form-columns-2 .hs-form-field + .hs-form-field > label {
    flex: none;
    justify-content: flex-start;
    text-align: left;
  }

  .home-mv__form .hubspot-form .hs-form .hs-form-field > .input {
    flex: none;
    margin: 1px 1px 0;
  }

  .home-mv__form .hubspot-form .hs-form .hs-form-field > .hs-field-desc {
    flex: none;
    padding-left: 1px;
  }

  .home-mv__form .hubspot-form .hs-form .hs-error-msgs {
    bottom: 5px;
    left: 2px;
  }

  .home-mv__form .hubspot-form .hs-form .hs-fieldtype-booleancheckbox {
    padding-bottom: 19px;
    padding-left: 2px;
  }

  /* Line breaks in labels (メール / アドレス) are for wide screens only. */
  .home-mv__form .hubspot-form .hs-form .hs-form-field > label br {
    display: none;
  }

  .home-mv__form .hubspot-form .hs-form .hs_submit .actions {
    width: 100%;
  }

  .home-mv__form .hubspot-form .hs-form .hs-button {
    width: 100%;
    padding: 20px 50px 20px 90px;
    font-size: 14px;
  }

  /* The icon is next to the centred text. */
  .home-mv__form .hubspot-form .hs-form .hs_submit .actions::before {
    left: calc(50% - 76px);
  }
}
