/* =====================================================================
 * Contact Page (/contact/) — お問い合わせフォーム整理
 *
 * 対象テンプレート: inc/page-inquiry.php (DB)
 * フォーム: <table class="cform wideform"> (CForm 系プラグイン or MW WP Form 出力)
 *
 * 目的:
 *   - 見出しを中央揃え
 *   - モバイル: ラベル(th) と入力欄(td) を縦積み (th 列が狭くて改行されまくる問題)
 *   - タブレット以上: 2 列グリッド (200px : 1fr)
 *   - 入力欄は 100% 幅 + iOS auto-zoom 防止 (font-size 16px+)
 *   - 電話番号 3 ボックス入力の整列
 *   - 上部の店舗電話番号リスト .parent1 もコンパクトに
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. 見出し中央化
 * ------------------------------------------------------------------ */
body.page-id-710 .page-header,
.page-template-page-inquiry .page-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 0;
  background: none;
  border-radius: 0;
}
body.page-id-710 .page-header .page-title,
.page-template-page-inquiry .page-header .page-title {
  display: inline-block;
  margin: 0 auto;
}
body.page-id-710 .page-header .underline,
.page-template-page-inquiry .page-header .underline {
  display: block;
  width: 64px;
  height: 2px;
  margin: 12px auto 0;
  background: var(--brand-gold, #c19a3d);
}

/* ---------------------------------------------------------------------
 * 2. 上部の店舗電話番号リスト (table.parent1) — モバイルで縦積み
 * ------------------------------------------------------------------ */
table.parent1 {
  width: 100%;
  margin: 0 0 32px;
  background: var(--brand-cream-2, #f5edd8);
  border-radius: 12px;
  border-collapse: collapse;
}
table.parent1 td {
  display: block;
  width: 100%;
  padding: 18px 22px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--brand-ink, #2f2a21);
  border-top: 1px dashed rgba(160, 127, 44, 0.25);
}
table.parent1 td:first-child { border-top: 0; }
table.parent1 br.empty { display: block; content: ''; }

@media (min-width: 768px) {
  table.parent1 { display: table; }
  table.parent1 tr { display: table-row; }
  table.parent1 td {
    display: table-cell;
    width: 50%;
    border-top: 0;
    border-left: 1px dashed rgba(160, 127, 44, 0.25);
  }
  table.parent1 td:first-child { border-left: 0; }
}

/* ---------------------------------------------------------------------
 * 3. お問い合わせフォーム (table.cform.wideform) — レスポンシブ化
 * ------------------------------------------------------------------ */
table.cform.wideform {
  width: 100%;
  margin: 0 auto 32px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--brand-line, #e6d9b8);
  overflow: hidden;
}

/* モバイル: tr/th/td を block 化して縦積み */
table.cform.wideform tr {
  display: block;
  padding: 18px 20px;
  border-top: 1px solid var(--brand-line, #e6d9b8);
}
table.cform.wideform tr:first-child { border-top: 0; }
table.cform.wideform th,
table.cform.wideform td {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}
table.cform.wideform th {
  font-family: var(--ff-serif, Georgia, serif);
  font-weight: 600;
  font-size: 14px;
  color: var(--brand-ink, #2f2a21);
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* 必須バッジ */
table.cform.wideform .required-srt,
table.cform.wideform span.required-srt {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--brand-gold-deep, #a07f2c);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* タブレット以上: 2 列グリッド (label : input) */
@media (min-width: 768px) {
  table.cform.wideform tr {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    padding: 22px 28px;
    align-items: start;
  }
  table.cform.wideform th {
    margin: 0;
    padding-top: 10px;
  }
  table.cform.wideform td { padding: 0; }
}

/* ---------------------------------------------------------------------
 * 4. 入力欄共通スタイル
 * ------------------------------------------------------------------ */
table.cform.wideform input[type="text"],
table.cform.wideform input[type="email"],
table.cform.wideform input[type="tel"],
table.cform.wideform input[type="number"],
table.cform.wideform input[type="url"],
table.cform.wideform select,
table.cform.wideform textarea {
  width: 100%;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--brand-line, #e6d9b8);
  border-radius: 8px;
  font-size: 16px;  /* iOS auto-zoom 防止 (16px 以上必須) */
  font-family: inherit;
  line-height: 1.5;
  background: #fafaf6;
  color: var(--brand-ink, #2f2a21);
  box-sizing: border-box;
  transition: border-color 0.15s ease-out, background 0.15s ease-out;
}
table.cform.wideform textarea {
  min-height: 140px;
  resize: vertical;
}
table.cform.wideform input:focus,
table.cform.wideform select:focus,
table.cform.wideform textarea:focus {
  outline: none;
  border-color: var(--brand-gold, #c19a3d);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(193, 154, 61, 0.18);
}
table.cform.wideform select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23a07f2c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 36px;
}

/* ---------------------------------------------------------------------
 * 5. 電話番号 3 ボックス (mwform-tel-field) — 横並びで詰めて配置
 * ------------------------------------------------------------------ */
.mwform-tel-field,
table.cform.wideform .mwform-tel-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.mwform-tel-field input[type="tel"],
table.cform.wideform .mwform-tel-field input[type="tel"] {
  width: 100%;
  max-width: 110px;
  text-align: center;
}

/* hyphen "-" がブロック表示されている場合のインライン化 */
table.cform.wideform td > br + br { display: none; }

/* 「-」だけの行（入力欄を縦に並べてしまう実装の補正） */
table.cform.wideform td {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 768px) {
  table.cform.wideform td {
    display: block;
  }
}
/* tel フィールド群を inline で並べる */
table.cform.wideform td .mwform-tel-field {
  display: inline-flex;
}

/* ---------------------------------------------------------------------
 * 6. 送信ボタン (確認画面へ進む)
 * ------------------------------------------------------------------ */
.cform input[type="submit"],
.cform button[type="submit"],
.mw_wp_form input[type="submit"],
.mw_wp_form button[type="submit"] {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 32px auto 0;
  padding: 16px 24px;
  background: var(--brand-gold, #c19a3d);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.15s ease-out;
}
.cform input[type="submit"]:hover,
.cform button[type="submit"]:hover,
.mw_wp_form input[type="submit"]:hover,
.mw_wp_form button[type="submit"]:hover {
  background: var(--brand-gold-deep, #a07f2c);
}

/* ---------------------------------------------------------------------
 * 7. エラー表示 (mwform-error)
 * ------------------------------------------------------------------ */
.mw_wp_form .error,
table.cform.wideform .error {
  display: block;
  margin-top: 6px;
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
}

/* End of contact.css */
