/*
  /asset/css/hubspot.css
  hubspot調整用CSS
*/

.hbspt-form {
  margin: 10px 0 0;
}
.hbspt-form .hs_rsaiken_company .input,
.hbspt-form .hs_email .input,
.hbspt-form .hs_rsaiken_tell .input {
  position: relative;
}
.hbspt-form .hs_rsaiken_company .input::before,
.hbspt-form .hs_email .input::before,
.hbspt-form .hs_rsaiken_tell .input::before {
  position: absolute;
  z-index: 20;
  top: -47px;
  left: 0;
  line-height: 40px;
  background-color: var(--rsaikenkanri-accent);
  color: var(--black);
  font-weight: bold;
  border-radius: 5px;
  font-size: 11px;
  padding: 0 10px;
  display: none;
  white-space: nowrap;
}

.hbspt-form .hs_rsaiken_company .input::after,
.hbspt-form .hs_email .input::after,
.hbspt-form .hs_rsaiken_tell .input::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 30px;
  margin-left: -8px;
  border: 8px solid transparent;
  border-top: 8px solid var(--rsaikenkanri-accent);
  display: none;
}

.hbspt-form .hs_rsaiken_company .input.disp_popup::before,
.hbspt-form .hs_rsaiken_company .input.disp_popup::after,
.hbspt-form .hs_email .input.disp_popup::before,
.hbspt-form .hs_email .input.disp_popup::after,
.hbspt-form .hs_rsaiken_tell .input.disp_popup::before,
.hbspt-form .hs_rsaiken_tell .input.disp_popup::after {
  display: inline-block;
  opacity: 1;
  animation-name: fadeout;
  animation-duration: 6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.hbspt-form .hs_rsaiken_company .input::before {
  content: "お勤め先の会社名（個人事業主の方は屋号）を記入してください";
}

.hbspt-form .hs_email .input::before {
  content: "お仕事でお使いのメールアドレスを記入してください";
}

.hbspt-form .hs_rsaiken_tell .input::before {
  content: "日中繋がりやすい電話番号を記入してください";
}

@keyframes fadeout {
  75% {
    opacity: 1;
  }

  95% {
    opacity: 0;
  }

  100% {
    opacity: 0;
    display: none;
  }
}

.hs-form {
  margin: 0 auto;
}

.hs-form > fieldset {
  margin: 0;
  padding: 0;
  max-width: 1000px;
}
.hs-form > fieldset.form-columns-1,
.hs-form > fieldset.form-columns-2 {
  max-width: 1000px;
}

.hs-form > fieldset .field {
  margin-bottom: 5px;
}

.hs-form-field > label {
  width: 100%;
  position: relative;
  cursor: default;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 5px;
  padding-top: 8px;
  color: var(--rsaikenkanri-primary);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  @media screen and (max-width: 840px) {
    align-items: baseline;
  }
}

.hs-form-field > label > span {
  font-size: 15px;
  font-weight: bold;
  color: var(--rsaikenkanri-primary);
}

.hs-form-field .hs-form-required {
  color: var(--white);
  background-color: var(--rsaikenkanri-primary);
  font-size: 73%;
  border-radius: 5px;
  padding: 2px 4px;
  margin: -2px 4px 0 4px;
  @media screen and (max-width: 840px) {
    position: relative;
    top: -2px;
    font-size: 10px;
    width: 32px;
    line-height: 1.4;
    text-align: center;
  }
}

.hs-form-field .hs-error-msg {
  font-size: 12px;
  color: var(--form-error-color);
  padding-left: 0px;
  text-align: left;
}

.hs_error_rollup .hs-main-font-element {
  display: block;
  font-size: 12px;
  color: var(--form-error-color);
  cursor: default;
  margin: 10px auto;
  text-align: center;
}

.hs-form fieldset legend {
  display: block;
  margin-left: 150px;
  font-size: 19.5px;
  line-height: 1;
  color: var(--black);
}

.hs-form.stacked legend {
  margin-left: 0;
}

.hs-form .hs-field-desc {
  color: var(--gray-06);
  margin: 0px 0px 5px 150px;
  font-size: 10px;
  line-height: 12px;
}

.legal-consent-container .hs-richtext,
.hs-legaltext {
  margin-top: 10px;
  margin-bottom: 3px;
  line-height: 16px;
  font-size: 11px;
  color: var(--black);
  text-align: center;
  text-align: left;
}
.hs-richtext a {
  text-decoration: underline;
  &:hover {
    text-decoration: none;
  }
}

.hs-addtxt,
.hs-addtxt-gray {
  font-size: 11px;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 1em;
}

.hs-fieldtype-select .hs-input,
.hs-fieldtype-textarea .hs-input,
.hs-fieldtype-text .hs-input,
.hs-fieldtype-date .hs-input {
  display: inline-block;
  width: 100% !important;
  height: 45px;
  padding: 3px 10px;
  background-color: var(--white);
  font-size: 16px;
  line-height: 18px;
  font-weight: normal;
  color: var(--black);
  border-radius: 3px;
  border: 1px solid var(--gray-08);
  box-sizing: border-box;
}

.hs-input::placeholder {
  color: var(--form-placeholder);
}

.hs-input:focus {
  border: 2px solid var(--black);
  outline: 0;
}

.hs-input.error {
  border-color: var(--form-error-border);
  -webkit-box-shadow: 0 0 3px var(--form-error-shadow);
  -moz-box-shadow: 0 0 3px var(--form-error-shadow);
  box-shadow: 0 0 3px var(--form-error-shadow);
  background: var(--form-error-bg);
}

select.hs-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  -o-appearance: none;
  appearance: none;
  cursor: pointer;
}

select.hs-input option {
  cursor: pointer;
  background-color: var(--white);
  font-size: 16px;
}

select.hs-input:focus {
  z-index: 10;
  width: 100%;
  border: 1px solid var(--form-error-border);
  border: 1px solid -webkit-focus-ring-color;
  background: var(--form-error-bg);
  outline-offset: -2px;
}

.hs-fieldtype-select {
  position: relative;
}

.hs-fieldtype-select:after {
  position: absolute;
  display: block;
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--form-select-border);
  border-right: 1px solid var(--form-select-border);
  right: 25px;
  top: 49px;
  transform: rotate(135deg);
}

input[type="radio"],
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  -o-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  display: block;
  float: left;
}

@media all and (-ms-high-contrast: none) {
  input[type="radio"],
  input[type="checkbox"] {
    position: relative;
    top: 3px;
    float: left;
  }
}

.hs-fieldtype-checkbox .input ul li,
.hs-fieldtype-radio .input ul li {
  margin-bottom: 10px;
  margin-right: 15px;
  padding-left: 30px;
}

@media all and (-ms-high-contrast: none) {
  .hs-fieldtype-checkbox .input ul li,
  .hs-fieldtype-radio .input ul li {
    padding-left: 0;
  }
}

.hs-form-radio label,
.hs-form-checkbox label {
  display: block;
  cursor: pointer;
}

.hs-form-radio label > span,
.hs-form-checkbox label > span {
  font-size: 16px;
  margin-left: -5px;
}

@media all and (-ms-high-contrast: none) {
  .hs-form-radio label > span,
  .hs-form-checkbox label > span {
    margin-left: 0;
  }
}

.hs-form-radio label input[type="radio"] {
  vertical-align: middle;
  border: none;
  width: auto;
}

.hs-form-radio label input[type="radio"]:before,
.hs-form-radio label input[type="radio"]:after {
  content: "";
  display: block;
  position: absolute;
}

.hs-form-radio label input[type="radio"]:before {
  background-color: var(--white);
  border: 1px solid var(--form-placeholder);
  box-sizing: border-box;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  left: -30px;
  top: 0px;
}

.hs-form-radio label input[type="radio"]:after {
  background-color: var(--form-radio);
  border-radius: 50%;
  opacity: 0;
  width: 12px;
  height: 12px;
  left: -26px;
  top: 4px;
}

.hs-form-radio label input[type="radio"]:checked:before {
  border-color: var(--form-radio);
}

.hs-form-radio label input[type="radio"]:checked:after {
  opacity: 1;
}

.hs-form-radio label input[type="radio"]:focus {
  border: none;
}

.hs-form-radio label:hover input[type="radio"]:after {
  background-color: var(--form-radio-bg);
}

.hs-form-checkbox label input[type="checkbox"] {
  vertical-align: middle;
  border: none;
}

.hs-form-checkbox label input[type="checkbox"]:before,
.hs-form-checkbox label input[type="checkbox"]:after {
  content: "";
  display: block;
  position: absolute;
}

.hs-form-checkbox label input[type="checkbox"]:before {
  background-color: var(--white);
  border-radius: 0%;
  border: 1px solid var(--form-placeholder);
  width: 20px;
  height: 20px;
  top: 0px;
  left: -30px;
  border-radius: 3px;
}

.hs-form-checkbox label input[type="checkbox"]:after {
  opacity: 0;
  height: 7px;
  width: 14px;
  top: 5px;
  left: -27px;
  border-bottom: 3px solid var(--white);
  border-left: 3px solid var(--white);
  transform: rotate(-45deg);
}

.hs-form-checkbox label input[type="checkbox"]:checked:before {
  background-color: var(--form-radio);
  border-color: var(--form-radio);
}

.hs-form-checkbox label input[type="checkbox"]:checked:after {
  opacity: 1;
}

.hs-form-checkbox label input[type="checkbox"]:focus {
  border: none;
}

.hs-form-checkbox label:hover input[type="checkbox"]:checked:before {
  background-color: var(--form-radio-bg);
}

.hs-button {
  outline: 0;
  text-decoration: none;
  position: relative;
  text-align: center;
  display: block;
  padding: 24px 20px 22px;
  border-radius: 4px;
  font-size: 22px;
  background: var(--rsaikenkanri-cta);
  color: var(--white);
  margin: 20px auto 0;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 500px;
  font-weight: bold;
  line-height: 1.4;
  border: 3px solid var(--white);
  border-radius: 1000px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
  @media screen and (max-width: 840px) {
    font-size: 18px;
    padding: 14px 20px;
  }
}

.hs-button:hover {
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
  background-color: var(--white);
  border: 3px solid var(--rsaikenkanri-cta);
  color: var(--rsaikenkanri-cta);
  transform: scale(1.03);
}

/* 
バリテーション（調整中）
*/

.hbspt-form {
  .hs_rsaiken_company .input,
  .hs_email .input,
  .hs_rsaiken_tell .input {
    position: relative;
    &::before {
      position: absolute;
      z-index: 20;
      top: -47px;
      left: 0;
      line-height: 40px;
      background-color: var(--rsaikenkanri-accent);
      color: var(--black);
      font-weight: bold;
      border-radius: 5px;
      font-size: 11px;
      padding: 0 10px;
      display: none;
      white-space: nowrap;
    }
    &::after {
      content: "";
      position: absolute;
      top: -8px;
      left: 30px;
      margin-left: -8px;
      border: 8px solid transparent;
      border-top: 8px solid var(--rsaikenkanri-accent);
      display: none;
    }
    &.disp_popup {
      &::before,
      &::after {
        display: inline-block;
        opacity: 1;
        animation-name: fadeout;
        animation-duration: 6s;
        animation-timing-function: ease-out;
        animation-fill-mode: forwards;
      }
    }
  }
  .hs_rsaiken_company .input::before {
    content: "お勤め先の会社名（個人事業主の方は屋号）を記入してください";
  }
  .hs_email .input::before {
    content: "お仕事でお使いのメールアドレスを記入してください";
  }
  .hs_rsaiken_tell .input::before {
    content: "日中繋がりやすい電話番号を記入してください";
  }
}
@keyframes fadeout {
  75% {
    opacity: 1;
  }
  95% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    display: none;
  }
}

#jsFlexForm .hbspt-form .hs_rsaiken_tell .input::before {
  left: auto;
  right: -20px;
}
