/* Sizes of the form */
.hubspot-form {
  --hubspot-form-min-height: 480px;
  --hubspot-form-column-gap: 12px;
}

.hubspot-form .hs-form {
  font-size: 14px;
  font-weight: 600;
}

/* A field: the label with its required mark above the input. */
.hubspot-form .hs-form .hs-form-field {
  margin-top: 26px;
}

.hubspot-form .hs-form fieldset:first-child .hs-form-field {
  margin-top: 0;
}

.hubspot-form .hs-form .hs-form-field > label {
  font-weight: 600;
}

.hubspot-form .hs-form .hs-form-field > label .hs-form-required {
  margin-left: 4px;
  color: #fd1349;
  font-size: 0;
}

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

.hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']) {
  height: 32px;
  padding: 5px 7px;
  border: 0;
  border-radius: 4px;
  background-color: #edf0f4;
  color: #0b2148;
  font-size: 13px;
  font-weight: 400;
  outline: 0;
}

.hubspot-form .hs-form .hs-input::placeholder {
  color: #939baa;
  opacity: 1;
}

.hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio']):focus,
.hubspot-form .hs-form .hs-input:not([type='checkbox'], [type='radio'], .is-placeholder):not(:placeholder-shown) {
  background-color: #e8f0fe;
}

.hubspot-form .hs-form .hs-input.error:not([type='checkbox'], [type='radio']) {
  border: 2px solid #fd1349;
  background-color: #ffeaef;
}

/* The select shows the arrow of the icon font. */
.hubspot-form .hs-form .hs-fieldtype-select .input {
  position: relative;
}

.hubspot-form .hs-form .hs-fieldtype-select .input::after {
  content: '\F0140';
  position: absolute;
  top: 4px;
  right: 10px;
  color: #657186;
  font: 24px/1 'Material Design Icons';
  pointer-events: none;
}

.hubspot-form .hs-form select.hs-input {
  padding-right: 40px;
  cursor: pointer;
}

.hubspot-form .hs-form select.hs-input.is-placeholder {
  color: #939baa;
}

/* The note under the email input comes after the input. */
.hubspot-form .hs-form .hs-email {
  display: flex;
  flex-direction: column;
}

.hubspot-form .hs-form .hs-email .input {
  order: 1;
}

.hubspot-form .hs-form .hs-email .hs-field-desc {
  order: 2;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
}

.hubspot-form .hs-form .hs-email .hs-error-msgs {
  order: 3;
}

/* Error messages under the input. They sit in the space before the next
   field, so the form does not grow when they are shown. */
.hubspot-form .hs-form .hs-error-msgs {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
  color: #fd1349;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.hubspot-form .hs-form .hs-error-msgs label {
  font-size: 12px;
  font-weight: 500;
}

/* 姓 and 名 are too narrow for the message, so it spans the row: the message
   of 姓 runs to the right, the one of 名 to the left. When both are empty,
   the message of 姓 is enough. */
.hubspot-form .hs-form .hs_firstname .hs-error-msgs {
  right: 0;
  left: auto;
}

.hubspot-form .hs-form fieldset:has(.hs_lastname .hs-error-msgs) .hs_firstname .hs-error-msgs {
  display: none;
}

/* Consent */
.hubspot-form .hs-form .hs-fieldtype-booleancheckbox {
  margin-top: 16px;
  padding-top: 5px;
}

.hubspot-form .hs-form .hs-form-booleancheckbox-display {
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

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

.hubspot-form .hs-form .hs-form-booleancheckbox-display a:hover {
  text-decoration: none;
}

.hubspot-form .hs-form .hs-fieldtype-booleancheckbox input {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid #6c83ac;
  border-radius: 2px;
  background-color: #fff;
  cursor: pointer;
  appearance: none;
}

.hubspot-form .hs-form .hs-fieldtype-booleancheckbox input:hover {
  background-color: #dce1ea;
}

.hubspot-form .hs-form .hs-fieldtype-booleancheckbox input:checked {
  background-color: #2c436c;
}

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

/* The message fits in the space above the button. */
.hubspot-form .hs-form .hs-fieldtype-booleancheckbox .hs-error-msgs {
  right: 0;
  margin-top: 1px;
  line-height: 14px;
  text-align: center;
}

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

/* Submit button */
.hubspot-form .hs-form .actions {
  position: relative;
  max-width: 360px;
  margin: 16px auto 0;
}

.hubspot-form .hs-form .hs-button {
  display: block;
  width: 100%;
  height: 55px;
  margin: 0;
  padding: 0 40px 0 16px;
  border: 2px solid #fd1349;
  border-radius: 35px;
  background-color: #fd1349;
  box-shadow: 0 3px 6px rgb(108 26 45 / 40%);
  color: #fff;
  font-size: 23px;
  font-weight: 700;
}

.hubspot-form .hs-form .actions::after {
  content: '\F0142';
  position: absolute;
  top: 15px;
  right: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #fff;
  color: #fd1349;
  font: 18px/24px 'Material Design Icons';
  text-align: center;
  pointer-events: none;
}

.hubspot-form .hs-form .hs-button:hover {
  background-color: #fff;
  color: #fd1349;
}

.hubspot-form .hs-form .actions:has(.hs-button:hover)::after {
  background-color: #fd1349;
  color: #fff;
}

/* The reCAPTCHA notice */
.hubspot-form ~ .branding {
  margin-top: 16px;
  color: #657186;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.hubspot-form ~ .branding a {
  color: inherit;
  white-space: nowrap;
  text-decoration: underline;
}

/* The end of the notice wraps as one piece, so a few characters are not left
   alone on the last line. */
.hubspot-form ~ .branding span {
  white-space: nowrap;
}

@media only screen and (max-width: 767px) {
  /* The longest button text (11 characters) stays on one line. */
  .hubspot-form .hs-form .hs-button {
    font-size: min(23px, calc((100vw - 160px) / 11));
    white-space: nowrap;
  }

  /* The notice fits on two lines down to 360px wide. */
  .hubspot-form ~ .branding {
    margin-right: -8px;
    margin-left: -8px;
    font-size: 10px;
  }

  .hubspot-form ~ .branding .hide-pc {
    display: inline;
  }
}
