/* ==========================================================================
   受験申込画面（旧システム一時対応用オーバーライドCSS）
   ========================================================================== */

/* フォーム全体の基本フォント・ボックス設定 */
form[name="form1"] {
  font-family: "Noto Sans JP", sans-serif;
  color: #333;
  line-height: 1.6;
  padding-bottom: 3rem;
}

form[name="form1"] * {
  box-sizing: border-box;
}

/* 見出し（試験名・フォームタイトル） */
form[name="form1"] .h1_out {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
}

form[name="form1"] .h1_out h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a365d;
  border-left: 5px solid #1a365d;
  border-bottom: 1px solid #d0d7de;
  padding: 0.5rem 0 0.5rem 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

form[name="form1"] .h1_out h1 span {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 400;
  color: #d93025;
  margin-left: 0.5rem;
}

/* コンテナ内の中央寄せ補正 */
form[name="form1"] .w_adjuster {
  margin-left: auto;
  margin-right: auto;
}

#form_box .h1_out {
  padding: 0;
  max-width: 100%;
}

/* 試験概要テーブル（#kentei_form_01）・申込フォームテーブル（#kentei_form_02）共通 */
table.kentei_form {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-top: 2px solid #1a365d;
  border-bottom: 1px solid #cbd5e1;
  font-size: 0.95rem;
}

/* 上部の試験概要テーブルはコンテナ外にあるため幅を制限して中央寄せ */
table#kentei_form_01 {
  max-width: 930px;
  margin: 0 auto 2rem;
}

table.kentei_form tr {
  border-bottom: 1px solid #e2e8f0;
}

table.kentei_form td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

/* 左列（項目名）のスタイル */
table.kentei_form td:first-child:not([colspan="2"]) {
  background-color: #f4f6f9;
  font-weight: 600;
  color: #1e293b;
  width: 30%;
  border-right: 1px solid #e2e8f0;
}

/* 入力欄（.formelement）共通 */
table.kentei_form .formelement {
  display: inline-block;
  height: 2.4rem;
  padding: 0.35rem 0.65rem;
  font-size: 1rem;
  color: #212529;
  background-color: #fff;
  border: 1px solid #adb5bd;
  border-radius: 4px;
  vertical-align: middle;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

table.kentei_form .formelement:focus {
  border-color: #2563eb;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* テキスト入力欄の幅調整 */
#AddressB,
#Email,
#Emailre,
#PayName {
  width: 100%;
  max-width: 480px;
}

#AddressA {
  margin-left: 0.4rem;
  max-width: 420px;
}

/* 姓・名 / セイ・メイ */
table.kentei_form .formelement.short1 {
  width: 140px;
  margin: 0 0.75rem 0 0.35rem;
}

/* 生年月日 */
table.kentei_form tr.input_dob #DOB_Y {
  width: 84px;
  margin: 0 0.3rem;
  text-align: center;
}
table.kentei_form tr.input_dob #DOB_M,
table.kentei_form tr.input_dob #DOB_D {
  width: 58px;
  margin: 0 0.3rem;
  text-align: center;
}

/* 郵便番号 */
table.kentei_form tr.input_zip #ZipA {
  width: 78px;
  margin-right: 0.3rem;
  text-align: center;
}
table.kentei_form tr.input_zip #ZipB {
  width: 96px;
  margin-left: 0.3rem;
  text-align: center;
}

/* 電話番号 */
table.kentei_form tr.input_tel .formelement.short1 {
  width: 88px;
  margin: 0 0.3rem;
  text-align: center;
}
table.kentei_form tr.input_tel .formelement.short1:first-child {
  margin-left: 0;
}

/* LID */
table.kentei_form tr.input_lid #LID {
  width: 220px;
  margin-left: 0.35rem;
}

/* ラジオボタン・チェックボックスのラベル */
table.kentei_form label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

table.kentei_form input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
}

/* 規約リンク・同意行（HTML側のクラス名 noboder に合わせて指定） */
table.kentei_form tr.noboder {
  border-bottom: none;
}

table.kentei_form tr.noboder td:first-child:not([colspan="2"]) {
  background-color: transparent;
  border-right: none;
}

table.kentei_form tr.noboder a {
  display: inline-block;
  margin: 0.25rem 0.75rem;
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
}

/* 受験地・受験科目の最終確認ボックス */
table.kentei_form tr.place_notice td {
  background-color: #fff5f5;
  border-top: 1px solid #fecaca;
  border-bottom: 1px solid #fecaca;
  padding: 1.1rem 1rem;
}

/* 確認へボタン */
button#submit {
  display: inline-block;
  min-width: 240px;
  padding: 0.85rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background-color: #1a365d;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button#submit:hover {
  background-color: #2c5282;
}

button#submit:active {
  transform: translateY(1px);
}

/* ==========================================================================
   スマートフォン向けレスポンシブ対応（768px未満）
   ========================================================================== */
@media (max-width: 767.98px) {
  form[name="form1"] .h1_out h1 {
    font-size: 1.15rem;
  }

  form[name="form1"] .h1_out h1 span {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
  }

  table#kentei_form_01 {
    width: calc(100% - 30px);
  }

  table.kentei_form colgroup {
    display: none;
  }

  table.kentei_form tbody,
  table.kentei_form tr,
  table.kentei_form td {
    display: block;
    width: 100% !important;
  }

  table.kentei_form td:first-child:not([colspan="2"]) {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
  }

  table.kentei_form td:not(:first-child),
  table.kentei_form td[colspan="2"] {
    padding: 0.75rem;
  }

  /* 同意チェックボックス行の空セルを非表示 */
  table.kentei_form tr.noboder td:first-child:empty,
  table.kentei_form tr.noboder td:first-child:not([colspan="2"]) {
    display: none;
  }

  table.kentei_form .formelement.short1 {
    width: calc(50% - 2.2rem);
    min-width: 100px;
    margin: 0.2rem 0.4rem 0.2rem 0.25rem;
  }

  table.kentei_form tr.input_tel .formelement.short1 {
    width: calc(33% - 1.2rem);
    min-width: 70px;
  }

  #AddressA {
    width: 100% !important;
    margin-left: 0;
    margin-top: 0.35rem;
  }

  button#submit {
    width: 100%;
    max-width: 320px;
  }
}