/*!
 * Fab4design HubSpot Form
 * Version: 1.2.1-f4d.10
 * 1.2.1 からの変更点（9point 側パッチ）:
 *   - .hsfc-Form の padding を削除
 *   - .hsfc-ErrorAlert をラベル列から入力欄の列へ移動（PCで折り返していた）
 *   - ラジオ／チェックボックスの選択時に青いフォーカス枠と橙のハローが
 *     二重に出て崩れていたのを、常に1本のリングになるよう修正
 *     （併せて、HubSpot標準の :hover/:focus/:active のグレー影も打ち消し）
 *   - ラジオの点／チェックマークが左上へ寄っていたのを修正
 *     （HubSpot標準の ::after position:absolute + SVGマスクを打ち消し）
 *   - ラジオの点は内側の白リングで描く方式に変更（半端な座標のにじみ対策）
 *   - チェックマークに残っていたHubSpot標準の暗い背景(#332b26)を透明化
 *   - 幅を既存 /contact/ と同寸に拡大（全体=本文カラム幅、
 *     ラベル250px + 余白28px + 入力欄520px）
 *   - 文字サイズを既存 /contact/ と同じ16px基準へ全体的に拡大
 *     （必須バッジ70x28/12px、入力欄40px、テキストエリア300px、
 *       送信ボタン270x50/16px も既存フォームに合わせて調整）
 *   - 先頭注記のバッジと文字の縦ズレを修正
 *     （HubSpot標準の .hsfc-RichText::after は clearfix で height:0。
 *       これを打ち消さないと文字が箱から溢れて約9px下へずれる）
 *   - 同意チェックボックスと1行目テキストの縦ズレを修正（margin-top 1px→3.5px）
 *   - 【重要】必須入力ガイドの置換が送信完了メッセージまで巻き込んでいたのを修正。
 *     完了画面も step > row > richText の同じ構造で描画されるため、
 *     :has(.hsfc-FieldLabel) で入力画面だけに限定した
 *   - 送信完了画面を独立パネル（チェックマーク付き）として表示
 * Portal: 245660187
 * Form: 05dfea46-0806-4b7f-9c1e-18d8c55a7038
 *
 * HubSpotの「開発者コード（上級）」専用です。
 * 通常の .hs-form-frame（iframe版）には適用されません。
 */

#f4design-hubspot-form {
  /* 既存の /contact/ と同じく本文カラム幅いっぱいを使う（PCで799px相当） */
  width: 100%;
  margin: 0;
  color: #332b26;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.65;

  /* HubSpot公式の更新版フォーム用CSS変数 */
  --hsf-global__font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  --hsf-global__font-size: 16px;
  --hsf-global__color: #332b26;
  --hsf-global-error__color: #9f2923;
  --hsf-row__horizontal-spacing: 10px;
  --hsf-row__vertical-spacing: 0px;
  --hsf-module__vertical-spacing: 0px;
  --hsf-richtext__font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  --hsf-richtext__font-size: 16px;
  --hsf-richtext__color: #332b26;
  --hsf-heading__font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  --hsf-heading__color: #332b26;
  --hsf-background__background-color: #ffffff;
  --hsf-background__border-style: none;
  --hsf-background__border-width: 0px;
  --hsf-background__border-radius: 0px;
  --hsf-background__padding: 0px;
  --hsf-field-label__font-family: "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --hsf-field-label__font-size: 16px;
  --hsf-field-label__color: #3a312b;
  --hsf-field-label-requiredindicator__color: #ffffff;
  --hsf-field-description__font-family: "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --hsf-field-description__color: #77706a;
  --hsf-field-input__font-family: "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --hsf-field-input__color: #2d2723;
  --hsf-field-input__background-color: #ffffff;
  --hsf-field-input__placeholder-color: #c6c6c6;
  --hsf-field-input__border-color: #4e3928;
  --hsf-field-input__border-width: 1px;
  --hsf-field-input__border-style: solid;
  --hsf-field-input__border-radius: 3px;
  --hsf-field-input__padding: 10px;
  --hsf-field-textarea__font-family: "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --hsf-field-textarea__color: #2d2723;
  --hsf-field-textarea__background-color: #ffffff;
  --hsf-field-textarea__placeholder-color: #c6c6c6;
  --hsf-field-textarea__border-color: #4e3928;
  --hsf-field-textarea__border-width: 1px;
  --hsf-field-textarea__border-style: solid;
  --hsf-field-textarea__border-radius: 3px;
  --hsf-field-textarea__padding: 10px;
  --hsf-field-radio__background-color: #ffffff;
  --hsf-field-radio__border-color: #77706a;
  --hsf-field-radio__border-width: 1px;
  --hsf-field-radio__border-style: solid;
  --hsf-field-radio__color: #332b26;
  --hsf-field-checkbox__background-color: #ffffff;
  --hsf-field-checkbox__border-color: #77706a;
  --hsf-field-checkbox__border-width: 1px;
  --hsf-field-checkbox__border-style: solid;
  --hsf-field-checkbox__color: #332b26;
  --hsf-button__font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  --hsf-button__font-size: 16px;
  --hsf-button__color: #ffffff;
  --hsf-button__background-color: #ff8b2b;
  --hsf-button__background-image: none;
  --hsf-button__border-radius: 999px;
  --hsf-button__padding: 0px;
  --hsf-button__box-shadow: none;
}

#f4design-hubspot-form,
#f4design-hubspot-form *,
#f4design-hubspot-form *::before,
#f4design-hubspot-form *::after {
  box-sizing: border-box;
}

#f4design-hubspot-form [data-hsfc-id="Renderer"],
#f4design-hubspot-form .hsfc-FormWrapper,
#f4design-hubspot-form .hsfc-Form,
#f4design-hubspot-form .hsfc-Step,
#f4design-hubspot-form .hsfc-Step__Content {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  background: #ffffff;
}

#f4design-hubspot-form .hsfc-Form {
  padding: 0;
}

#f4design-hubspot-form .hsfc-Step__Content > .hsfc-Row {
  display: block;
  margin: 0;
}

/* 冒頭の説明ブロックを、旧サイトと同じ必須入力ガイドへ置換。
   :has(.hsfc-FieldLabel) は必須。送信完了画面も
   `.hsfc-Step__Content > .hsfc-Row:first-child > .hsfc-RichText` という
   まったく同じ構造で描画されるため、限定しないと完了メッセージ本文が
   display:none で消され、「必 須 は必ずご入力ください。」に置き換わってしまう。 */
#f4design-hubspot-form
  .hsfc-Step__Content:has(.hsfc-FieldLabel)
  > .hsfc-Row:first-child
  > .hsfc-RichText {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0 0 26px;
  padding: 0 0 14px;
  border-bottom: 1px solid #bdbdbd;
  color: #332b26;
}

#f4design-hubspot-form
  .hsfc-Step__Content:has(.hsfc-FieldLabel)
  > .hsfc-Row:first-child
  > .hsfc-RichText
  > * {
  display: none;
}

#f4design-hubspot-form
  .hsfc-Step__Content:has(.hsfc-FieldLabel)
  > .hsfc-Row:first-child
  > .hsfc-RichText::before {
  content: "必 須";
  display: inline-flex;
  width: 70px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #ff8b2b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#f4design-hubspot-form
  .hsfc-Step__Content:has(.hsfc-FieldLabel)
  > .hsfc-Row:first-child
  > .hsfc-RichText::after {
  content: "は必ずご入力ください。";
  grid-column: 2;
  /* HubSpot標準は .hsfc-RichText::after を clearfix として
     `content:"."; display:block; height:0; clear:both` で使っている。
     height:0 を打ち消さないと文字が高さ0の箱から溢れ、約9px下へずれる。
     バッジと同じ28pxのflex箱にして中身を中央に置き、確実に揃える。 */
  display: flex;
  height: 28px;
  align-items: center;
  clear: none;
  position: static;
  visibility: visible;
  opacity: 1;
  color: #332b26;
  -webkit-text-fill-color: #332b26;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ── 送信完了画面 ──────────────────────────────
   送信後はフォームの入力欄が消えて短いメッセージだけが残るため、
   そのままだと「送れたのか分からない」状態になる。
   完了したことが一目で伝わる独立パネルとして見せる。 */
#f4design-hubspot-form .hsfc-Form:not(:has(.hsfc-FieldLabel)) {
  padding: 48px 32px 52px;
  border: 2px solid #ff8b2b;
  border-radius: 8px;
  background: #fff8f2;
  text-align: center;
}

/* 内側の Step / Step__Content は既定で白背景なので、完了パネルでは透過させる */
#f4design-hubspot-form .hsfc-Form:not(:has(.hsfc-FieldLabel)) .hsfc-Step,
#f4design-hubspot-form .hsfc-Form:not(:has(.hsfc-FieldLabel)) .hsfc-Step__Content,
#f4design-hubspot-form .hsfc-Form:not(:has(.hsfc-FieldLabel)) .hsfc-Row {
  background: transparent;
}

#f4design-hubspot-form
  .hsfc-Form:not(:has(.hsfc-FieldLabel))
  .hsfc-RichText::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #ff8b2b
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 7'/%3E%3C/svg%3E")
    center / 32px 32px no-repeat;
}

#f4design-hubspot-form .hsfc-Form:not(:has(.hsfc-FieldLabel)) .hsfc-RichText p {
  margin: 0 0 14px;
  line-height: 1.8;
}

#f4design-hubspot-form
  .hsfc-Form:not(:has(.hsfc-FieldLabel))
  .hsfc-RichText
  p:last-child {
  margin-bottom: 0;
}

/* ラベル + 必須欄 + 入力欄の3カラム */
#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  ) {
  display: grid;
  /* 既存 /contact/ と同寸: ラベル250px + 余白28px + 入力欄520px */
  grid-template-columns: 250px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 3px;
  align-items: start;
  width: 100%;
  margin: 0 0 12px;
}

#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-FieldLabel {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 250px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  color: #3a312b;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-FieldLabel
  > span {
  display: grid;
  /* 既存 /contact/ は space-between でバッジがラベル列の右端に付くので合わせる */
  grid-template-columns: minmax(0, 1fr) 70px;
  column-gap: 8px;
  align-items: center;
  min-height: 40px;
}

/* 必須バッジが無い項目は、ラベル文字がラベル列(250px)を全幅使えるようにする。
   バッジ用の70pxを常に確保すると「当社をどこで知りましたか？」が折り返してしまうため。
   既存 /contact/ の justify-content:space-between と同じ挙動。 */
#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-FieldLabel
  > span:not(:has(.hsfc-FieldLabel__RequiredIndicator)) {
  grid-template-columns: minmax(0, 1fr);
}

#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-FieldLabel
  > span
  > span:first-child {
  grid-column: 1;
  overflow-wrap: anywhere;
}

/* HubSpot側の補足入りラベルは、補足文を説明欄へ分離して簡潔に表示 */
#f4design-hubspot-form
  .hsfc-DropdownField:has(input[name="0-1/gochuumonnorottosuu"])
  > .hsfc-FieldLabel
  > span
  > span:first-child {
  color: transparent;
  font-size: 0;
  white-space: nowrap;
}

#f4design-hubspot-form
  .hsfc-DropdownField:has(input[name="0-1/gochuumonnorottosuu"])
  > .hsfc-FieldLabel
  > span
  > span:first-child::before {
  content: "ご注文のロット数";
  color: #3a312b;
  font-size: 16px;
}

#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-FieldLabel
  .hsfc-FieldLabel__RequiredIndicator {
  grid-column: 2;
  display: inline-flex;
  width: 70px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #ff8b2b;
  color: transparent;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-FieldLabel
  .hsfc-FieldLabel__RequiredIndicator::before {
  content: "必 須";
  color: #ffffff;
  font-size: 12px;
}

#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > :is(
    .hsfc-TextInput,
    .hsfc-DropdownInput,
    .hsfc-PhoneInput,
    .hsfc-NumberInput,
    .hsfc-TextareaInput,
    .hsfc-FileInput,
    .hsfc-RadioFieldGroup__Options
  ) {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

#f4design-hubspot-form .hsfc-FieldDescription {
  grid-column: 2;
  grid-row: 2;
  margin: 4px 0 0;
  color: #77706a;
  font-size: 13px;
  line-height: 1.55;
}

/* エラー文は自動配置だとラベル列（165px）へ入って折り返すので、入力欄の列に置く */
#f4design-hubspot-form
  :is(
    .hsfc-TextField,
    .hsfc-EmailField,
    .hsfc-DropdownField,
    .hsfc-PhoneField,
    .hsfc-NumberField,
    .hsfc-TextareaField,
    .hsfc-FileField,
    .hsfc-RadioFieldGroup
  )
  > .hsfc-ErrorAlert {
  grid-column: 2;
  margin: 4px 0 0;
  font-size: 14px;
}

#f4design-hubspot-form
  :is(.hsfc-NumberInput, .hsfc-DropdownInput) {
  width: 100%;
  min-width: 0;
}

#f4design-hubspot-form .hsfc-TextInput {
  min-height: 40px;
  height: 40px;
  border: 1px solid #4e3928;
  border-radius: 3px;
  background: #ffffff;
  color: #2d2723;
  padding: 10px 10px 10px 10px;
  font-size: 16px;
  line-height: 20px;
  outline: none;
}

#f4design-hubspot-form .hsfc-PhoneInput {
  min-height: 40px;
}

#f4design-hubspot-form .hsfc-PhoneInput > .hsfc-TextInput {
  min-height: 40px;
  height: 40px;
  border: 1px solid #4e3928;
  border-radius: 3px;
  background: #ffffff;
  color: #2d2723;
  padding-block: 10px;
  font-size: 16px;
}

#f4design-hubspot-form .hsfc-TextareaInput {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 300px;
  resize: vertical;
  border: 1px solid #4e3928;
  border-radius: 3px;
  background: #ffffff;
  color: #2d2723;
  padding: 10px;
  font-size: 16px;
  line-height: 1.6;
  outline: none;
}

#f4design-hubspot-form
  :is(.hsfc-TextInput, .hsfc-TextareaInput)::placeholder {
  color: #c6c6c6;
  opacity: 1;
}

#f4design-hubspot-form
  :is(.hsfc-TextInput, .hsfc-TextareaInput):focus,
#f4design-hubspot-form .hsfc-DropdownInput:focus-within,
#f4design-hubspot-form .hsfc-PhoneInput:focus-within,
#f4design-hubspot-form .hsfc-FileInput:focus-visible {
  border-color: #0b82bd;
  box-shadow: 0 0 0 2px rgb(11 130 189 / 14%);
}

#f4design-hubspot-form .hsfc-RadioFieldGroup__Options {
  display: flex;
  min-height: 40px;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 22px;
}

#f4design-hubspot-form .hsfc-RadioFieldGroup__Options > div {
  margin: 0;
}

#f4design-hubspot-form
  .hsfc-RadioFieldGroup__Options
  .hsfc-FieldLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  color: #332b26;
  font-size: 16px;
  font-weight: 400;
}

/* 法人／個人などの選択肢は、楕円ではなく正円のラジオボタンに統一する。 */
#f4design-hubspot-form .hsfc-RadioInput {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  box-sizing: border-box;
  flex: 0 0 16px;
  inline-size: 16px !important;
  block-size: 16px !important;
  min-inline-size: 16px;
  min-block-size: 16px;
  max-inline-size: 16px;
  max-block-size: 16px;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid #a89a8e;
  border-radius: 50%;
  background: #ffffff;
  /* HubSpot標準は :hover/:focus/:active でグレーのぼかし影を当ててくるので打ち消す。
     リングはこのCSSの :focus-visible で1本だけ出す。 */
  box-shadow: none;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#f4design-hubspot-form .hsfc-RadioInput::after {
  /* 点は「7pxの箱を中央寄せ」ではなく、パディングボックス(14px)へぴったり重ねて
     内側の白リングで抜く。中央寄せだと 3.5px の半端な位置になり、16pxでは
     輪郭がにじんで輪と点が詰まって見えるため。
     HubSpot標準のSVGマスクと固定サイズは打ち消す。 */
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  mask-image: none;
  -webkit-mask-image: none;
  border: 0;
  border-radius: 50%;
  background: #ff8b2b;
  box-shadow: inset 0 0 0 4px #ffffff;
  content: "";
  opacity: 0;
  transition: opacity 120ms ease;
}

#f4design-hubspot-form .hsfc-RadioInput:hover {
  border-color: #ff8b2b;
}

#f4design-hubspot-form .hsfc-RadioInput:checked {
  border-color: #ff8b2b;
}

#f4design-hubspot-form .hsfc-RadioInput:checked::after {
  opacity: 1;
}

/* Chromeはマウスクリックでもラジオに :focus-visible を当てるため、
   選択時の橙ハローと青い outline が二重になって崩れていた。
   リングは常に橙の1本だけにする（outline は強制カラーモード用に透明で残す）。 */
#f4design-hubspot-form .hsfc-RadioInput:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgb(255 139 43 / 28%);
}

/* 同意欄のチェックボックスは、OS標準の見た目ではなくフォームに合わせる。 */
#f4design-hubspot-form .hsfc-CheckboxInput {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  box-sizing: border-box;
  flex: 0 0 16px;
  inline-size: 16px !important;
  block-size: 16px !important;
  min-inline-size: 16px;
  min-block-size: 16px;
  max-inline-size: 16px;
  max-block-size: 16px;
  /* align-items:flex-start の親に対し、1行目の字面の中心へ合わせる。
     同意欄は 14px / line-height 1.55（=21.7px）なので中心は約11.5px、
     16pxの箱の上端は 11.5 - 8 = 3.5px。1px だと約3.7px上にずれる。 */
  margin: 3.5px 0 0 !important;
  padding: 0 !important;
  place-content: center;
  border: 1px solid #cdbdad;
  border-radius: 3px;
  background: #ffffff;
  /* ラジオと同じ理由でHubSpot標準のグレー影を打ち消す */
  box-shadow: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease;
}

#f4design-hubspot-form .hsfc-CheckboxInput::after {
  /* HubSpot標準は ::after に position:absolute + inset:0 + SVGマスクを当て、
     さらに background-color: #332b26 を敷いている。マスクだけ外すとその暗い塊が
     そのまま見えてしまうので、位置・マスク・背景をまとめて打ち消し、
     白い枠線で描いたチェックマークだけを残す。 */
  position: static;
  inset: auto;
  mask-image: none;
  -webkit-mask-image: none;
  background: transparent;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
  transition: opacity 120ms ease, transform 120ms ease;
}

#f4design-hubspot-form .hsfc-CheckboxInput:hover {
  border-color: #ff8b2b;
}

#f4design-hubspot-form .hsfc-CheckboxInput:checked {
  border-color: #ff8b2b;
  background: #ff8b2b;
}

#f4design-hubspot-form .hsfc-CheckboxInput:checked::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

#f4design-hubspot-form .hsfc-CheckboxInput:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgb(255 139 43 / 28%);
}

#f4design-hubspot-form .hsfc-CheckboxInput:disabled {
  border-color: #d9d4cf;
  background: #f5f2ef;
  cursor: not-allowed;
}

#f4design-hubspot-form .hsfc-FileInput {
  display: block;
  width: 100%;
  min-height: 130px;
  border: 1px dashed #c9c9c9;
  border-radius: 2px;
  background: #ffffff;
  color: #77706a;
  padding: 42px 18px 20px;
  font-size: 14px;
}

#f4design-hubspot-form .hsfc-FileInput::file-selector-button {
  margin-right: 10px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background: #ffffff;
  color: #544b45;
  padding: 7px 14px;
  cursor: pointer;
  font: inherit;
}

#f4design-hubspot-form .hsfc-DataPrivacyField {
  margin: 29px 0 35px;
  padding: 24px 28px;
  background: #fff8f2;
  color: #544b45;
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
}

#f4design-hubspot-form .hsfc-DataPrivacyField .hsfc-Row {
  display: block;
  margin: 0 0 9px;
}

#f4design-hubspot-form .hsfc-DataPrivacyField .hsfc-RichText {
  display: block;
  margin: 0;
  color: #544b45;
  font-size: 14px;
}

#f4design-hubspot-form .hsfc-DataPrivacyField .hsfc-CheckboxField {
  margin: 0;
}

#f4design-hubspot-form
  .hsfc-DataPrivacyField
  .hsfc-CheckboxField
  > .hsfc-FieldLabel {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  color: #544b45;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

#f4design-hubspot-form
  .hsfc-DataPrivacyField
  .hsfc-FieldLabel__RequiredIndicator {
  color: #ff6f24;
}

#f4design-hubspot-form .hsfc-NavigationRow {
  margin: 0;
}

#f4design-hubspot-form .hsfc-NavigationRow__Alerts {
  margin: 0 0 10px;
  color: #9f2923;
}

#f4design-hubspot-form .hsfc-NavigationRow__Buttons {
  display: flex;
  justify-content: center;
}

#f4design-hubspot-form .hsfc-NavigationRow__Buttons > .hsfc-Button {
  display: inline-flex;
  width: 270px;
  height: 50px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #ff8b2b;
  color: #ffffff;
  padding: 0 20px;
  box-shadow: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
}

#f4design-hubspot-form .hsfc-NavigationRow__Buttons > .hsfc-Button:hover {
  background: #f27c1d;
}

#f4design-hubspot-form
  .hsfc-NavigationRow__Buttons
  > .hsfc-Button:focus-visible {
  outline: 3px solid rgb(11 130 189 / 28%);
  outline-offset: 2px;
}

#f4design-hubspot-form
  :is(.hsfc-TextInput, .hsfc-TextareaInput)[aria-invalid="true"] {
  border-color: #c73b31;
  background: #fffafa;
}

@media (max-width: 640px) {
  #f4design-hubspot-form {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    --hsf-global__font-size: 16px;
    --hsf-field-label__font-size: 16px;
  }

  #f4design-hubspot-form .hsfc-Form {
    padding: 0;
  }

  #f4design-hubspot-form .hsfc-Form:not(:has(.hsfc-FieldLabel)) {
    padding: 34px 18px 38px;
  }

  #f4design-hubspot-form
    .hsfc-Form:not(:has(.hsfc-FieldLabel))
    .hsfc-RichText::before {
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    background-size: 28px 28px;
  }

  #f4design-hubspot-form
    :is(
      .hsfc-TextField,
      .hsfc-EmailField,
      .hsfc-DropdownField,
      .hsfc-PhoneField,
      .hsfc-NumberField,
      .hsfc-TextareaField,
      .hsfc-FileField,
      .hsfc-RadioFieldGroup
    ) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 7px;
    margin-bottom: 17px;
  }

  #f4design-hubspot-form
    :is(
      .hsfc-TextField,
      .hsfc-EmailField,
      .hsfc-DropdownField,
      .hsfc-PhoneField,
      .hsfc-NumberField,
      .hsfc-TextareaField,
      .hsfc-FileField,
      .hsfc-RadioFieldGroup
    )
    > .hsfc-FieldLabel {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-height: 28px;
    font-size: 16px;
  }

  #f4design-hubspot-form
    :is(
      .hsfc-TextField,
      .hsfc-EmailField,
      .hsfc-DropdownField,
      .hsfc-PhoneField,
      .hsfc-NumberField,
      .hsfc-TextareaField,
      .hsfc-FileField,
      .hsfc-RadioFieldGroup
    )
    > .hsfc-FieldLabel
    > span {
    grid-template-columns: max-content 70px;
    justify-content: start;
    gap: 9px;
  }

  #f4design-hubspot-form
    .hsfc-DropdownField:has(input[name="0-1/gochuumonnorottosuu"])
    > .hsfc-FieldLabel
    > span
    > span:first-child::before {
    font-size: 16px;
  }

  #f4design-hubspot-form
    :is(
      .hsfc-TextField,
      .hsfc-EmailField,
      .hsfc-DropdownField,
      .hsfc-PhoneField,
      .hsfc-NumberField,
      .hsfc-TextareaField,
      .hsfc-FileField,
      .hsfc-RadioFieldGroup
    )
    > :is(
      .hsfc-TextInput,
      .hsfc-DropdownInput,
      .hsfc-PhoneInput,
      .hsfc-NumberInput,
      .hsfc-TextareaInput,
      .hsfc-FileInput,
      .hsfc-RadioFieldGroup__Options
    ) {
    grid-column: 1;
    grid-row: 2;
  }

  #f4design-hubspot-form .hsfc-FieldDescription {
    grid-column: 1;
    grid-row: 3;
    font-size: 13px;
  }

  #f4design-hubspot-form
    :is(
      .hsfc-TextField,
      .hsfc-EmailField,
      .hsfc-DropdownField,
      .hsfc-PhoneField,
      .hsfc-NumberField,
      .hsfc-TextareaField,
      .hsfc-FileField,
      .hsfc-RadioFieldGroup
    )
    > .hsfc-ErrorAlert {
    grid-column: 1;
  }

  #f4design-hubspot-form .hsfc-TextInput,
  #f4design-hubspot-form .hsfc-PhoneInput > .hsfc-TextInput {
    min-height: 42px;
    height: 42px;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 24px;
  }

  #f4design-hubspot-form .hsfc-PhoneInput {
    min-height: 42px;
  }

  #f4design-hubspot-form .hsfc-TextareaInput {
    min-height: 170px;
    padding: 10px;
    font-size: 16px;
  }

  #f4design-hubspot-form .hsfc-RadioFieldGroup__Options {
    min-height: 36px;
    gap: 8px 20px;
  }

  #f4design-hubspot-form
    .hsfc-RadioFieldGroup__Options
    .hsfc-FieldLabel {
    min-height: 30px;
    font-size: 16px;
  }

  #f4design-hubspot-form .hsfc-FileInput {
    min-height: 130px;
    padding: 40px 14px 20px;
    font-size: 14px;
  }

  #f4design-hubspot-form .hsfc-DataPrivacyField {
    margin-top: 24px;
    padding: 20px 18px;
    font-size: 14px;
  }

  #f4design-hubspot-form .hsfc-DataPrivacyField .hsfc-RichText,
  #f4design-hubspot-form
    .hsfc-DataPrivacyField
    .hsfc-CheckboxField
    > .hsfc-FieldLabel {
    font-size: 14px;
  }

  #f4design-hubspot-form .hsfc-NavigationRow__Buttons > .hsfc-Button {
    width: min(100%, 270px);
    height: 50px;
    min-height: 50px;
    font-size: 16px;
  }
}
