/* HubSpot form styling to match LP design */

.p-entry__form .hs-form {
  font-family: "Noto Sans JP", sans-serif !important;
  color: #052731;
}

.p-entry__form .hs-form-field {
  margin-bottom: 32px !important;
}

.p-entry__form label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  line-height: 1.85;
  color: #052731 !important;
  margin-bottom: 8px !important;
}

.p-entry__form .hs-form-required,
.p-entry__form label .hs-form-required {
  display: inline-flex !important;
  align-items: center;
  background: #ce0000;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em;
  line-height: 1.7;
  padding: 0 8px;
  border-radius: 100px;
  margin-left: 0 !important;
}

.p-entry__form .input {
  margin-right: 0 !important;
}

.p-entry__form input[type="text"],
.p-entry__form input[type="email"],
.p-entry__form input[type="tel"],
.p-entry__form input[type="number"],
.p-entry__form input[type="date"],
.p-entry__form select,
.p-entry__form textarea {
  width: 100% !important;
  max-width: 100% !important;
  height: 56px !important;
  padding: 12px 16px !important;
  background: #f2f2f2 !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: "Noto Sans JP", sans-serif !important;
  font-size: 16px !important;
  letter-spacing: 0.04em;
  color: #052731 !important;
  box-sizing: border-box;
}

.p-entry__form textarea {
  height: auto !important;
  min-height: 120px !important;
}

.p-entry__form input::placeholder,
.p-entry__form textarea::placeholder {
  color: #808080 !important;
}

.p-entry__form .hs-error-msgs {
  margin-top: 8px !important;
  list-style: none !important;
  padding: 0 !important;
}

.p-entry__form .hs-error-msgs label,
.p-entry__form .hs-error-msg {
  color: #ce0000 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.p-entry__form .hs-fieldtype-boolean .inputs-list,
.p-entry__form ul.inputs-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.p-entry__form .hs-form-booleancheckbox-display,
.p-entry__form .hs-form-checkbox-display {
  display: flex !important;
  align-items: flex-start;
  gap: 16px;
  font-size: 16px !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: #052731 !important;
}

.p-entry__form .hs-form-booleancheckbox-display a,
.p-entry__form .legal-consent-container a {
  color: #2e7d5b !important;
  text-decoration: underline !important;
}

/* プライバシーポリシー項目の必須マークのみ非表示 */
.p-entry__form .hs-privacy_policy .hs-form-required {
  display: none !important;
}

.p-entry__form input[type="checkbox"][name="privacy_policy"],
.p-entry__form input[type="checkbox"][name="privacy-policy"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid #052731 !important;
  border-radius: 2px !important;
  background: #fff !important;
  vertical-align: top;
  cursor: pointer;
}

.p-entry__form input[type="checkbox"][name="privacy_policy"]:checked,
.p-entry__form input[type="checkbox"][name="privacy-policy"]:checked {
  background-color: #2e7d5b !important;
  border-color: #2e7d5b !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") !important;
  background-size: 12px 12px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.p-entry__form .hs-submit {
  text-align: center;
  margin-top: 32px;
}

.p-entry__form .hs-button,
.p-entry__form input[type="submit"],
.p-entry__form .actions input[type="submit"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 256px !important;
  height: 60px !important;
  padding: 16px 24px 16px 40px !important;
  background: #2e7d5b !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: "Noto Sans JP", sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}

.p-entry__form .hs-button:hover,
.p-entry__form input[type="submit"]:hover {
  opacity: 0.85;
}

.p-entry__form .legal-consent-container {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.7;
  color: #052731;
}

.p-entry__form fieldset {
  max-width: 100% !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 姓・名のあいだに 8px */
.p-entry__form fieldset.form-columns-2:has(.hs-lastname):has(.hs-firstname) {
  display: flex !important;
  gap: 16px !important;
}

.p-entry__form fieldset.form-columns-2:has(.hs-lastname):has(.hs-firstname) > .hs-form-field {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  flex: 1 1 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 801px) and (max-width: 1439px) {
  .p-entry__form label {
    font-size: calc(16 / 1440 * 100vw) !important;
  }

  .p-entry__form input[type="text"],
  .p-entry__form input[type="email"],
  .p-entry__form input[type="tel"],
  .p-entry__form input[type="number"],
  .p-entry__form select,
  .p-entry__form textarea {
    height: calc(56 / 1440 * 100vw) !important;
    font-size: calc(16 / 1440 * 100vw) !important;
    padding: calc(12 / 1440 * 100vw) calc(16 / 1440 * 100vw) !important;
    border-radius: calc(8 / 1440 * 100vw) !important;
  }

  .p-entry__form .hs-form-field {
    margin-bottom: calc(32 / 1440 * 100vw) !important;
  }

  .p-entry__form .hs-button,
  .p-entry__form input[type="submit"] {
    min-width: calc(256 / 1440 * 100vw) !important;
    height: calc(60 / 1440 * 100vw) !important;
    font-size: calc(16 / 1440 * 100vw) !important;
  }
}

@media (max-width: 800px) {
  .p-entry__form label {
    font-size: calc(14 / 375 * 100vw) !important;
  }

  .p-entry__form input[type="text"],
  .p-entry__form input[type="email"],
  .p-entry__form input[type="tel"],
  .p-entry__form input[type="number"],
  .p-entry__form select,
  .p-entry__form textarea {
    height: calc(48 / 375 * 100vw) !important;
    font-size: calc(14 / 375 * 100vw) !important;
  }

  .p-entry__form .hs-form-field {
    margin-bottom: calc(24 / 375 * 100vw) !important;
  }

  .p-entry__form .hs-button,
  .p-entry__form input[type="submit"] {
    width: 100% !important;
    min-width: 0 !important;
    height: calc(60 / 375 * 100vw) !important;
    font-size: calc(16 / 375 * 100vw) !important;
    padding: calc(16 / 375 * 100vw) calc(24 / 375 * 100vw) !important;
  }

  .p-entry__form .hs-form-booleancheckbox-display,
  .p-entry__form .hs-form-checkbox-display,
  .p-entry__form .legal-consent-container {
    font-size: calc(14 / 375 * 100vw) !important;
  }

  .p-entry__form fieldset.form-columns-2:has(.hs-lastname):has(.hs-firstname) {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .p-entry__form fieldset.form-columns-2:has(.hs-lastname):has(.hs-firstname) > .hs-form-field {
    width: 100% !important;
    flex: none !important;
  }
}
