/* Sizes of the form */
.form-box .hubspot-form {
  --hubspot-form-min-height: 380px;
  --hubspot-form-column-gap: 10px;
}

/* The white card around the title and the form. HubSpot draws a <form> of its
   own, which the rules of form.min.css for `.form-box form` would match, so
   they are reset below. */
.form-box .form-card {
  padding: 24px 40px;
  border: 1px solid #f0ecea;
  border-radius: 20px;
  background: #fff;
}

.form-box .hubspot-form .hs-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.form-box .form-card .box-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.form-box .form-card .form-title,
.form-box .form-card .form-subtitle {
  position: relative;
  margin: 0;
  text-align: center;
}

.form-box .form-card .form-title {
  color: #0c233d;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
}

.form-box .form-card .form-subtitle {
  color: #090a0a;
  font-size: 24px;
  font-weight: 700;
  line-height: 34.75px;
}

.form-box .form-card .form-subtitle::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 16px;
  background: #ffd1b3;
}

.form-box .form-card .box-title span {
  position: relative;
  z-index: 1;
}

/* A field: the label with its badge above the input. */
.form-box .hubspot-form .hs-form .hs-form-field {
  padding-bottom: 15px;
}

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

.form-box .hubspot-form .hs-form .hs-form-field > label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  color: #0c233d;
  font-size: 14px;
  font-weight: 700;
}

/* The 必須 badge in place of the required mark (*). */
.form-box .hubspot-form .hs-form .hs-form-field > label .hs-form-required {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 2px;
  background: #ffeee3;
  color: #ec3900;
  font-size: 0;
  line-height: 12px;
}

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

.form-box .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  padding: 10px 8px;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  font-size: 14px;
  line-height: 16px;
  outline: 0;
}

.form-box .hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']):focus {
  outline: 2px solid #388bff;
  outline-offset: -2px;
}

.form-box .hubspot-form .hs-form .hs-input.error:not([type='checkbox'], [type='radio']) {
  border-color: #f00 !important;
  background: #ffe8e9;
}

.form-box .hubspot-form .hs-form .hs-error-msgs {
  margin-top: 2px;
  color: #f95154;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
}

/* The reCAPTCHA notice */
.form-box .form-card .branding {
  margin-top: 16px;
  color: #6b6c6e;
  font-size: 12px;
  text-align: center;
}

.form-box .form-card .branding a {
  color: #6b6c6e;
}

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

.form-box .hubspot-form .hs-form .hs-form-booleancheckbox-display {
  justify-content: center;
  gap: 10px;
  color: #0c233d;
  font-size: 14px;
  font-weight: 700;
}

.form-box .hubspot-form .hs-form .hs-form-booleancheckbox-display input {
  width: 18px;
}

.form-box .hubspot-form .hs-form .hs-form-booleancheckbox-display a {
  color: #0c233d;
  text-decoration: underline;
}

.form-box .hubspot-form .hs-form .hs-form-booleancheckbox-display a:hover {
  color: #ee6033;
}

.form-box .hubspot-form .hs-form .hs-fieldtype-booleancheckbox .hs-error-msgs label {
  justify-content: center;
}

/* Submit button */
.form-box .hubspot-form .hs-form .hs-button {
  width: 100%;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: linear-gradient(90deg, #ee6033 0%, #b50077 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  transition: 0.3s;
}

.form-box .hubspot-form .hs-form .hs-button:hover {
  background:
    linear-gradient(0deg, rgb(0 0 0 / 20%), rgb(0 0 0 / 20%)), linear-gradient(90deg, #ee6033 0%, #b50077 100%);
  background-blend-mode: overlay;
}

@media (width <= 991px) {
  .form-box .form-card {
    padding: 24px 16px;
  }

  .form-box .form-card .form-title,
  .form-box .form-card .form-subtitle {
    font-size: 20px;
  }

  .form-box .form-card .form-subtitle::before {
    display: none;
  }

  .form-box .hubspot-form .hs-form .hs-form-field {
    padding-bottom: 20px;
  }

  .form-box .hubspot-form .hs-form .hs-form-field:has(> .hs-error-msgs) {
    padding-bottom: 4px;
  }
}
