/* ==========================================================================
   採用エントリー（/recruit/entry/）Tayoriフォームの差分CSS
   共通部分（項目の並び・入力欄・ボタン・エラー色・スマホ）は contact-form.css を使い回す。
   ここには、このフォーム固有の項目ID（Tayori発行）に対する指定だけを置く。
   現行サイトの /recruit/entry/ にはフォーム用のデザインが無いため、
   /contact/ と同じ見た目を適用している（坂本さん了承）。
   ========================================================================== */

/* ---- 必須バッジ ----
   【重要】Tayoriのコードに必須/任意の情報が無いため、項目の並び順（nth-of-type）で指定する。
   以前はTayori発行のform-parts id（フォームを編集するたびに値が変わる固定ハッシュ）を
   直接指定していたが、2026-11-05のTayoriホスト名変更（埋め込みコード差し替え）でID値が
   変わり、このスタイルが丸ごと効かなくなる事故が発生した。並び順ベースに変更することで、
   「IDは変わるが項目の並び順は変わらない」編集には耐えられるようにしている。
   ただし、Tayori管理画面で項目の並び替え・追加・削除を行った場合はこのnth-of-typeの
   対応関係も崩れるため、その場合は下記の番号と必須/任意の対応を項目順に合わせて見直すこと。
   現在の並び順（.form-parts単位・1始まり）：1お名前(必須) 2フリガナ(必須) 3電話番号(必須)
   4メールアドレス(必須) 5応募職種(必須) 6その他備考(任意)
   【注意】nth-of-typeはタグ名のみで数えるため、.form-partsより前にある
   <div class="parts-error-message">（Tayori側の固定の1個）も1番目として数えられ、
   実際の指定番号は上記の項目番号+1になる（例：お名前=1番目だがnth-of-type(2)を指定）。 */
#tayori-form .form-parts:nth-of-type(2) > div:first-child::before,
#tayori-form .form-parts:nth-of-type(3) > div:first-child::before,
#tayori-form .form-parts:nth-of-type(4) > div:first-child::before,
#tayori-form .form-parts:nth-of-type(5) > div:first-child::before,
#tayori-form .form-parts:nth-of-type(6) > div:first-child::before {
  content: "必須";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  margin-right: 10px;
  padding: 2px 4px;
  background: #d71a1c;
  font-size: 14px;
  font-weight: normal;
  color: #fff;
}

/* ---- 姓・名／セイ・メイを同じ行に同じ幅で並べる ----
   【重要】上記と同じ理由でnth-of-typeを使用（お名前=2番目、フリガナ=3番目。+1の理由は上記参照） */
#tayori-form .form-parts:nth-of-type(2) > div:last-child,
#tayori-form .form-parts:nth-of-type(3) > div:last-child {
  display: flex;
  gap: 10px;
}

#tayori-form .form-parts:nth-of-type(2) > div:last-child > div,
#tayori-form .form-parts:nth-of-type(3) > div:last-child > div {
  flex: 1;
  min-width: 0;
}

@media (max-width: 767px) {
  #tayori-form .form-parts:nth-of-type(2) > div:first-child::before,
  #tayori-form .form-parts:nth-of-type(3) > div:first-child::before,
  #tayori-form .form-parts:nth-of-type(4) > div:first-child::before,
  #tayori-form .form-parts:nth-of-type(5) > div:first-child::before,
  #tayori-form .form-parts:nth-of-type(6) > div:first-child::before {
    position: static;
    margin-right: 1.3333vw;
    font-size: 2.6666vw;
  }

  #tayori-form .form-parts:nth-of-type(2) > div:last-child,
  #tayori-form .form-parts:nth-of-type(3) > div:last-child {
    gap: 2vw;
  }
}
