/* ============================================================
   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     … 戻るボタン
   ============================================================ */

/* ---- リセット（フォーム要素） ---- */
.contactPage *, .contactPage *::before, .contactPage *::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;
}

/* ---- ファイル入力（「ファイルを選択」ボタン＋削除ボタン） ---- */
.upload-blc {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.input-file {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  font-size: 0.95rem;
  color: #333;
}

/* 「ファイルを選択」ボタン */
/* edit: ボタンの色をサイトに合わせて変更してください（.btn-primary と揃える） */
.input-file::file-selector-button {
  margin-right: 0.75em;
  padding: 0.45em 1.1em;
  border: 1px solid #2c5fa8;
  border-radius: 4px;
  background: #2c5fa8;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.input-file::file-selector-button:hover {
  background: #fff;
  color: #2c5fa8;
}

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

/* 削除ボタン（ゴミ箱）：選択中のファイルを外す。未選択の間は無効 */
.upload-clear {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #2c5fa8;
  border-radius: 4px;
  background: #fff;
  color: #2c5fa8;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.upload-clear:not(:disabled):hover,
.upload-clear:not(:disabled):focus-visible {
  background: #2c5fa8;
  color: #fff;
}

.upload-clear:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.upload-clear svg {
  width: 17px;
  height: 17px;
}

/* ---- ハニーポット（スパム対策・人間には見えない） ---- */
.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; }

/* ACTアクト：旧 contact_pc の寸法・色に合わせる。共通サイトCSSは変更しない。 */
.contactPage .inquiry-section { padding: 0; }
.contactPage .inquiry-wrap { max-width: none; margin: 0; }
.contactPage .inquiry-table { margin: 20px auto 40px; border-bottom: 1px solid #ccc; }
.contactPage .inquiry-table th, .contactPage .inquiry-table td { padding: 10px 12px; border: 1px solid #ccc; font-size: inherit; line-height: inherit; vertical-align: top; }
.contactPage .inquiry-table th { width: 28%; background: #eee; font-weight: normal; color: inherit; }
.contactPage .inquiry-table td { background: #fff; }
.contactPage .required-mark { background: #f02323; color: #fff; display: inline-block; font-weight: normal; font-size: 12px; margin: 0 5px; padding: 0; text-align: center; line-height: 22px; width: 40px; }
.contactPage .input-text, .contactPage .input-postcode, .contactPage .input-select, .contactPage .input-textarea { padding: 5px; font: inherit; line-height: normal; border: 1px solid #ccc; border-radius: 0; background: #fff; }
.contactPage .input-text { width: 55%; }
.contactPage #postcode { width: 20%; }
.contactPage #tel { width: 35%; }
.contactPage #address { width: 80%; display: block; }
.contactPage .input-select { width: auto; margin-bottom: 7px; }
.contactPage .input-textarea { width: 100%; height: 150px; min-height: 150px; }
.contactPage .input-text:focus, .contactPage .input-postcode:focus, .contactPage .input-select:focus, .contactPage .input-textarea:focus { border-color: #39c; box-shadow: 0 0 5px #39c; outline: none; }
.contactPage .address-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contactPage .privacy-consent { margin: 0; padding: 0; border: none; background: none; }
.contactPage .policy { text-align: left; }
.contactPage .privacy-agree { margin: 25px 0; }
.contactPage .form-submit { text-align: center; margin: 40px 0 0; display: flex; justify-content: center; gap: 12px; }
.contactPage .btn { display: inline-block; min-width: 0; padding: 5px 8px; border: 1px solid #999; border-radius: 2px; background: #efefef; color: #222; font: inherit; line-height: 1.5; text-decoration: none; box-shadow: none; cursor: pointer; }
.contactPage .btn:hover { background: #ddd; color: #222; opacity: 1; }
.contactPage .complete-message { text-align: left; padding: 0; }
.contactPage .is-error { border-color: #c00; }
@media screen and (max-width: 750px) {
  .contactPage .inquiry-table { margin: 8% auto 10%; }
  .contactPage .inquiry-table tr { display: block; border: 1px solid #ccc; border-bottom: none; padding: 6% 5%; }
  .contactPage .inquiry-table th, .contactPage .inquiry-table td { display: block; width: 100%; border: none; padding: 0; }
  .contactPage .inquiry-table th { text-align: center; padding: 2% 5%; margin-bottom: 7%; }
  .contactPage .inquiry-table td { text-align: center; }
  .contactPage .input-text, .contactPage #address, .contactPage .input-select { width: 100%; }
  .contactPage #postcode { width: 35%; }
  .contactPage #tel { width: 60%; }
}
