@charset "utf-8";
/* CSS Document */
/* ==========================================================================
   1. フォーム全体の共通基本スタイル（スマホ・PC共通）
   ========================================================================== */
.form-section {
  width: 100%; /* フォームの最大幅 */
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
}

/* すべての要素でサイズ計算を崩さないための指定 */
.form-section *, 
.form-section *::before, 
.form-section *::after {
  box-sizing: border-box;
}

/* 入力項目（テキスト、メール、セレクト、テキストエリア）の共通デザイン */
.form-section input[type="text"],
.form-section input[type="email"],
.form-section select,
.form-section textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px; /* iPhoneでのフォーカス時自動ズーム防止 */
  background-color: #fff;
}

/* セレクトボックスの高さ微調整 */
.form-section select {
  height: 46px;
}

/* テキストエリア */
.form-section textarea {
  resize: vertical; /* 縦方向にのみサイズ変更可能に */
}

/* 注釈テキスト（small） */
.form-section small {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

/* --- ラジオボタン・チェックボックスのグループ --- */
.radio-group {
  display: flex;
  flex-wrap: wrap; /* 折り返しを許可 */
  gap: 12px 20px;  /* 項目間の余白（縦 補正 / 横） */
  padding: 5px 0;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal !important; /* 親の太字を解除 */
  font-size: 15px;
}

.radio-group input[type="radio"] {
  margin: 0 6px 0 0;
  width: 18px;
  height: 18px;
}

/* 科目選択の下にあるテキスト入力枠の調整 */
.radio-group + input[type="text"] {
  margin-top: 10px;
}

/* --- 送信・リセットボタンエリア --- */
.form-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.form-buttons input[type="submit"],
.form-buttons input[type="reset"] {
  padding: 15px 40px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 確認ボタン */
.form-buttons input[type="submit"] {
  background-color: #0066cc; /* 信頼感のあるブルー（適宜変更してください） */
  color: #fff;
  width: 50%; /* 初期値：少し太め */
}
.form-buttons input[type="submit"]:hover {
  background-color: #004c99;
}

/* リセットボタン */
.form-buttons input[type="reset"] {
  background-color: #e0e0e0;
  color: #333;
  width: 50%;
}
.form-buttons input[type="reset"]:hover {
  background-color: #cccccc;
}

/* フォーム下のリンク */
.underform {
  text-align: center;
  margin-top: 25px;
  font-size: 15px;
}


/* ==========================================================================
   3. PC用レイアウト（画面幅 768px 以上） 【パターンB：左ライン・バグ修正版】
   ========================================================================== */
@media screen and (min-width: 768px) {
  .form-group {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap; /* 右側で要素が溢れたら下に落とす */
    margin-bottom: 35px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 25px;
  }

  /* 左側：ラベルの横幅を35%に完全固定 */
  .form-group > label {
    width: 35%;
    flex-shrink: 0; /* 幅が狭まるのを絶対に防ぐ */
    font-weight: bold;
    padding-top: 8px;
    padding-right: 20px;
    padding-left: 15px;
    border-left: 4px solid #0066cc;
  }

  /* 右側：入力要素の幅 */
  .form-group > input[type="text"],
  .form-group > input[type="email"],
  .form-group > select,
  .form-group > textarea,
  .form-group > .radio-group,
  .form-group > small {
    width: 65%;
  }

  /* 【ココが修正点】選択肢の下に入力枠を回り込ませる調整 */
  .form-group > .radio-group + input[type="text"] {
    display: block;
    margin-left: 35%; /* ラベルの幅（35%）と同じ分だけ左に余白を作って右側に揃える */
    width: 65%;       /* 幅を他の入力項目と揃える */
    margin-top: 10px;
  }

  /* セミナーの注釈（small）も左側を揃える */
  .form-group > small {
    margin-left: 35%;
    width: 65%;
    margin-top: 10px;
  }
}/* ==========================================================================
   2. スマホ用レイアウト（画面幅 767px 以下） 【パターンB：左ラインと下線】
   ========================================================================== */
@media screen and (max-width: 767px) {
  .form-group {
    margin-bottom: 45px; /* ★次の項目との間隔をかなり広めにとる */
    border-bottom: 2px solid #f0f0f0; /* 項目ごとの区切りにアンダーラインを入れる */
    padding-bottom: 25px; /* 下線までの余白 */
  }

  .form-group > label {
    display: block;
    font-weight: bold;
    font-size: 16px; /* 文字を少しだけ大きく */
    margin-bottom: 15px; /* ★ラベルと入力項目の間を広げる */
    padding-left: 10px;
    border-left: 4px solid #0066cc; /* ★スマホでも左側にアクセントラインを入れる */
  }

  /* ラジオボタンなどの選択肢同士の間隔もスマホ用に少し広げる */
  .radio-group {
    gap: 16px 20px; /* 上下の間隔を16pxに広げて誤タップ防止 */
    padding: 5px 0 10px 0;
  }

  /* 診療科目の「その他」入力枠の隙間 */
  .form-group > .radio-group + input[type="text"] {
    margin-top: 10px;
  }

  /* 注釈（small）の隙間 */
  .form-group > small {
    margin-top: 12px;
  }

  /* ボタンエリア */
  .form-buttons {
    flex-direction: column-reverse;
    gap: 15px;
    margin-top: 50px;
  }
  .form-buttons input[type="submit"],
  .form-buttons input[type="reset"] {
    width: 100%;
    padding: 16px;
  }
}

.formtext {
	padding: 0 15px 30px 15px;
}
.thanks {
	margin: 50px 0 0 0;
}
