/* ============================================================
   inquiry.css  –  お問合せフォーム スタイルシート
   ============================================================
   このCSSはフォーム単体で動作するシンプルなスタイルです。
   サイトのデザインに合わせて自由に上書きしてください。

   主なクラス:
     .inquiry-section   … フォーム全体のセクション
     .inquiry-wrap      … フォームの最大幅コンテナ
     .inquiry-title     … ページタイトル
     .inquiry-lead      … 説明テキスト
     .inquiry-table     … フォームテーブル
     .confirm-table     … 確認画面テーブル
     .required-mark     … ※ 必須マーク（赤）
     .optional-mark     … 任意バッジ
     .error-summary     … エラーまとめボックス
     .error-text        … 各フィールドのエラーメッセージ
     .btn               … ボタン共通
     .btn-primary       … 送信・確認ボタン
     .btn-secondary     … 戻るボタン
   ============================================================ */

/* ---- リセット（フォーム要素） ---- */
.inquiry-section *, .inquiry-section *::before, .inquiry-section *::after { box-sizing: border-box; }

/* ---- セクション ---- */
.inquiry-section {
  padding: 3rem 1rem;
}

/* ---- コンテナ ---- */
.inquiry-wrap {
  max-width: 860px;
  margin: 0 auto;
}

/* ---- タイトル ---- */
.inquiry-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}

/* ---- 説明テキスト ---- */
.inquiry-lead {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #444;
}

/* ---- 必須・任意マーク ---- */
.required-mark {
  color: #c0392b;
  font-weight: bold;
  margin-left: 0.25em;
}

.optional-mark {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.1em 0.5em;
  margin-left: 0.4em;
  border: 1px solid #aaa;
  border-radius: 3px;
  color: #777;
  vertical-align: middle;
  line-height: 1.5;
}

/* ---- フォームテーブル ---- */
.inquiry-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.inquiry-table th,
.inquiry-table td {
  padding: 0.9rem 1rem;
  border: 1px solid #ddd;
  vertical-align: middle;
  text-align: left;
}

.inquiry-table th {
  width: 32%;
  background: #f5f6f8;
  font-weight: bold;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #333;
}

.inquiry-table td {
  background: #fff;
}

/* エラーがある行 */
.inquiry-table tr.has-error td {
  background: #fff8f8;
}

/* ---- 英語ラベル ---- */
.label-en {
  display: block;
  font-size: 0.75rem;
  font-weight: normal;
  color: #888;
  margin-top: 0.1em;
}

/* ---- 入力要素共通 ---- */
.input-text,
.input-postcode,
.input-date,
.input-select,
.input-textarea {
  display: block;
  width: 100%;
  padding: 0.55em 0.75em;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.input-text:focus,
.input-postcode:focus,
.input-date:focus,
.input-select:focus,
.input-textarea:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.2);
}

/* エラー状態 */
.input-text.is-error,
.input-postcode.is-error,
.input-date.is-error,
.input-select.is-error,
.input-textarea.is-error {
  border-color: #c0392b;
}

/* ---- 入力幅の調整 ---- */
.input-postcode { max-width: 180px; display: inline-block; }
.input-date     { max-width: 220px; }

/* ---- セレクトボックス（矢印追加） ---- */
.input-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  padding-right: 2.2em;
  cursor: pointer;
}

/* ---- テキストエリア ---- */
.input-textarea {
  min-height: 140px;
  resize: vertical;
}

/* ---- ラジオ・チェックボックス グループ ---- */
.radio-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.radio-label,
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
}

.radio-label input,
.checkbox-label input {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #4a90d9;
}

/* 同意チェックボックス */
.agree-label {
  font-size: 0.93rem;
}

.agree-label a {
  color: #4a90d9;
  text-decoration: underline;
}

/* ---- 個人情報保護方針（表の外に表示） ---- */
.privacy-consent {
  margin: 1.6rem 0 0.5rem;
}
.privacy-intro {
  font-size: 0.88rem;
  line-height: 1.9;
  color: #333;
  margin: 0 0 1rem;
}
.privacy-agree {
  text-align: center;
}
.privacy-consent.has-error .agree-label {
  color: #c53030;
}
.privacy-agree .error-text {
  margin-top: 0.4rem;
}

/* ---- 郵便番号アシストテキスト ---- */
.postcode-assist {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
}

.postcode-assist.is-error {
  color: #c0392b;
}

/* ---- 補足テキスト ---- */
.field-note {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #777;
  line-height: 1.5;
}

/* ---- ファイル入力 ---- */
.input-file {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 0.95rem;
  padding: 0.4em 0;
}

.input-file.is-error {
  outline: 1px solid #c0392b;
}

/* ---- ハニーポット（スパム対策・人間には見えない） ---- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- エラーまとめ ---- */
.error-summary {
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e74c3c;
  border-left: 4px solid #e74c3c;
  background: #fff8f8;
  border-radius: 4px;
  color: #c0392b;
  font-size: 0.93rem;
}

/* ---- フィールドエラーテキスト ---- */
.error-text {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #c0392b;
  line-height: 1.5;
}

/* ---- reCAPTCHA ---- */
.recaptcha-wrap {
  margin: 1.2rem 0;
}

/* v3 の表示テキスト */
.recaptcha-v3-note {
  font-size: 0.8rem;
  color: #888;
  margin: 0;
}

/* ---- ボタン共通 ---- */
.btn {
  display: inline-block;
  padding: 0.75em 2.5em;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

/* 送信・確認ボタン */
/* edit: ボタンの色をサイトに合わせて変更してください */
.btn-primary {
  background: #2c5fa8;
  color: #fff;
  border-color: #2c5fa8;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #1e4a8a;
  border-color: #1e4a8a;
}

/* 戻るボタン */
.btn-secondary {
  background: #fff;
  color: #555;
  border-color: #bbb;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #f0f0f0;
}

/* ---- 送信ボタンエリア ---- */
.form-submit {
  text-align: center;
  margin-top: 2rem;
}

.confirm-submit {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ---- 確認画面テーブル ---- */
.confirm-table th {
  background: #f0f2f5;
}

/* ---- 送信完了メッセージ ---- */
.complete-message {
  text-align: center;
  padding: 3rem 1rem;
  line-height: 2;
  color: #333;
}

/* ============================================================
   レスポンシブ対応
   ============================================================ */
@media (max-width: 640px) {
  .inquiry-table,
  .inquiry-table tbody,
  .inquiry-table tr,
  .inquiry-table th,
  .inquiry-table td {
    display: block;
    width: 100%;
  }

  .inquiry-table th {
    border-bottom: none;
    padding-bottom: 0.4rem;
  }

  .inquiry-table td {
    border-top: none;
    padding-top: 0.4rem;
  }

  .confirm-submit {
    flex-direction: column-reverse;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ============================================================
   layout.php デモ用の仮ヘッダー／フッター
   （実サイトのヘッダー・フッターに差し替える前提の簡易スタイル）
   ============================================================ */
.site-header {
  border-bottom: 1px solid #e0e4ec;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.site-header__logo { margin: 0; font-weight: bold; font-size: 1.1rem; }
.site-header__logo a { color: #1a3a6e; text-decoration: none; }
.site-footer {
  border-top: 1px solid #e0e4ec;
  padding: 1.2rem;
  margin-top: 2.5rem;
  text-align: center;
}
.site-footer__copy { margin: 0; font-size: .85rem; color: #888; }

/* ============================================================
   サイト（旧デザイン）に合わせた調整
   ============================================================ */
.inquiry-section {
  padding: 0;
}
.inquiry-wrap {
  max-width: none;
}
.inquiry-table {
  margin-bottom: 20px;
}
.inquiry-table tr {
  border-bottom: #999 dotted 1px;
}
.inquiry-table th,
.inquiry-table td {
  padding: 15px 10px;
  border: none;
  background: none;
  font-size: 14px;
}
.inquiry-table th {
  width: 25%;
}
.confirm-table th {
  background: none;
}
.inquiry-title {
  font-size: 18px;
  margin: 10px 0;
}
.input-text,
.input-postcode,
.input-date,
.input-select,
.input-textarea,
.radio-label,
.checkbox-label,
.agree-label,
.privacy-intro,
.error-summary,
.complete-message,
.btn {
  font-size: 14px;
}
#formBlc .input-select {
  padding-right: 2.2em;
}
#formBlc .birthday-group .input-select {
  display: inline-block;
  width: auto;
  min-width: 5.5em;
}
.complete-message {
  text-align: left;
  padding: 10px 0;
}
.form-submit {
  margin-top: 20px;
}
@media (max-width: 640px) {
  .inquiry-table th {
    width: 100%;
  }
}
