/**
 * thinx-contact-page.css – Contact form (#thxContactPage) CSS
 *
 * 移管元: Post 136 (contact) Elementor /0/0 widget_id=9834c9b の inline <style>
 * 範囲:   #thxContactPage ルートスコープに完全クローズ（外部への副作用なし）
 *
 * 位置付け:
 *   - Phase 2-E 第 3 件（detail / form page 系で最高難度）。
 *   - お問い合わせフォームページ。Contact Form 7 (CF7) プラグインとの連携あり。
 *   - 3 層構造: (1) Elementor HTML Widget (HTML 骨格) + (2) CF7 form template
 *     (フォームフィールド本体、CF7 admin 画面管理) + (3) 物理 CSS / JS (装飾と挙動)。
 *   - CF7 form ID: 860c7c9（CF7 admin 画面で管理、本物理化対象外）。
 *
 * CSS 変数（ローカル定義、7 個 = brand-system 系 6 個 + form 固有 1 個）:
 *   --c-accent / --c-accent-rgb / --c-bg / --c-card-bg / --c-border /
 *   --c-muted / --c-input-bg
 *   ※ --c-input-bg は form 入力欄背景用（Contact form 固有、他コンポーネント無し）。
 *   ※ --c-* prefix は Contact teaser (#thxContact) / Company teaser (#thxCompany) /
 *     Company Detail (#thxCompanyDetail) と完全重複するが、スコープ ID で完全分離
 *     されているため値の衝突は起きない。Phase 2-F のグローバルトークン化候補。
 *
 * 移管時の処理:
 *   - inline 元は #thxContactPage / #thxContactPage::before / #thxContactPage .wpcf7
 *     系 3 行 の合計 5 行以外の全 31 クラスセレクタが「未スコープ」だったため、
 *     物理化時に #thxContactPage プレフィックスを全クラスセレクタに付与してスコープ化。
 *   - CF7 グローバルクラス（.wpcf7-not-valid-tip / .wpcf7-not-valid /
 *     .wpcf7-response-output）も #thxContactPage スコープで完全隔離
 *     （他ページの CF7 form＝Entry form 等への影響を遮断）。
 *   - .thx-container { max-width: 850px; ... } は thinx-base.css の 1120px とは
 *     値が異なる（form 用狭幅）ため、#thxContactPage .thx-container として
 *     詳細度勝ちで上書き（legal-layout 系 Security/Privacy 900px と類似パターン）。
 *   - @import url('Inter') は Phase 2-F Step 2（v0.7.1）で削除済み。Inter
 *     フォントは thinx-base.css の @import で全ページ共通ロード（依存配列で
 *     thinx-base 経由）。font-family 宣言は温存（Elementor 親テーマフォントの
 *     上書きに必要）。
 *   - !important は inline 元のまま 30 箇所温存（CF7 デフォルトスタイルを上書き
 *     するため大量に使用、機能変更禁止原則により全て温存）。
 *
 * @keyframes:
 *   - svc-pulse: Contact form 内で animation 参照が無い死に @keyframes だった
 *     ため、Phase 2-F Step 3（v0.7.2）で削除済み。
 *     ※ About / Service / Entry form では同名 svc-pulse が実使用されており
 *       温存（Phase 3 の @keyframes 重複統合候補）。
 *
 * @media:
 *   - (max-width: 768px) 1 個のみ。他ページの 900px と異なる form 向け狭幅切替。
 *     form-card padding 縮小 + form-row 1 列縦並び + section-label 余白縮小。
 *
 * 背景グリッド:
 *   - #thxContactPage::before で 92px 同期（brand-system 系と完全同型）。
 *
 * CF7 連携セレクタ（CF7 form template に依存）:
 *   - .thx-form-row / .thx-form-group / .thx-form-label / .thx-form-submit
 *   - .thx-input / .thx-textarea
 *   - .thx-custom-select / .thx-select-trigger / .thx-select-options /
 *     .thx-option / .is-open
 *   - .thx-submit-link / .thx-submit-btn-text / .thx-submit-arrow
 *   - .required-badge / .thx-hidden-system
 *   - .wpcf7-not-valid-tip / .wpcf7-not-valid / .wpcf7-response-output
 *   ※ これらのセレクタが対応する HTML 要素は CF7 admin 画面の form template で
 *     管理されている。HTML Widget には現れない。物理化作業の対象外。
 *
 * HTML 側に残る要素:
 *   - <section id="thxContactPage">...</section> の HTML 骨格（13 行と極小）
 *   - <header class="thx-contact-header"> + <h1 class="thx-contact-title-main">
 *   - <div class="thx-form-card"> 内に [contact-form-7 id="860c7c9" title="contact"]
 *     ショートコード（CF7 が form 本体を描画）
 *   - inline style 属性: 無し
 *   - <img>: 無し
 *   - Font Awesome: 無し
 *
 * 想定リスク:
 *   - CF7 form template 編集時の ID 依存（JS 側で #thxProxySubmit / #thxRealSubmit /
 *     #inquirySelect 等を参照、CF7 admin で template 変更すると JS が壊れる）
 *   - CF7 プラグインアップデートでクラス名変更時の見た目崩れ
 *
 * Phase: Phase 2-E 第 3 件（v0.6.1 → v0.6.2 patch bump）
 *
 * @package HelloElementorThinxChild
 */

/* =========================================================
    THINX Contact Page - 配置同期・配色一貫性修正版
   ========================================================= */
/* @import url('Inter') は Phase 2-F Step 2（v0.7.1）で削除済み。thinx-base.css 経由でロード */

/*
 * Phase 3 Step 2-I（v1.1.9）でローカル変数を Phase 3 統合トークンへ
 * フォールバック付き var() 参照に移行。--c-* 変数名は維持（既存
 * var(--c-...) 参照箇所への影響なし、後方互換性 100%）。
 * 同 prefix --c-* は Contact teaser / Company teaser / Company Detail /
 * Entry form と共有するが、スコープ ID で完全分離されているため値の
 * 衝突は起きない。
 * 重要バリアント: --c-input-bg は form 入力欄背景用（標準カラーでは無く
 * Contact form / Entry form のみで使用）のため --thx-input-bg を参照
 * （Step 2-I 初の -input-bg 使用、Phase 3 統合トークン 11 個中で最後の
 * 予約バリアント実用化）。
 * 他は標準トークン参照。
 */
#thxContactPage {
    --c-accent:     var(--thx-accent);
    --c-accent-rgb: var(--thx-accent-rgb);
    --c-bg:         var(--thx-bg);
    --c-card-bg:    var(--thx-card-bg);
    --c-border:     var(--thx-border);
    --c-muted:      var(--thx-muted);
    --c-input-bg:   var(--thx-input-bg);
    background-color: var(--c-bg);
    color: #ECE7DA;
    padding: 140px 0 100px !important;
    font-family: "Inter", system-ui, -apple-system, sans-serif !important;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* 背景グリッド */
#thxContactPage::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(200,190,170,0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(200,190,170,0.05) 1px, transparent 1px);
    background-size: 92px 92px; background-attachment: fixed; pointer-events: none; z-index: 1;
}

/*
 * .thx-container はスコープ override 850px（thinx-base.css の 1120px とは異なる、
 * form 用狭幅、legal-layout 系 Security/Privacy 900px と類似パターン）
 */
#thxContactPage .thx-container { max-width: 850px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ヘッダー */
#thxContactPage .thx-contact-header { text-align: center; margin-bottom: 80px; }
#thxContactPage .thx-contact-title-ja { font-size: 20px; font-weight: 800; color: var(--c-accent); letter-spacing: 0.15em; margin-top: 0; margin-bottom: 12px; display: block; }
#thxContactPage .thx-contact-label { font-size: 13px; letter-spacing: 0.5em; color: var(--c-muted); text-transform: uppercase; margin-bottom: 110px; position: relative; display: block; }
#thxContactPage .thx-contact-label::after { content: ""; position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background: var(--c-accent); opacity: 0.8; }
/* Phase 4-D（v2.1.0）でセリフ書体（Georgia + Noto Serif JP）を適用、研究組織型の佇まいに。 */
#thxContactPage .thx-contact-title-main { font-family: Georgia, "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(28px, 4vw, 38px); font-weight: 400; line-height: 1.5; letter-spacing: 0.02em; color: #ECE7DA; margin: 0; }

/* フォームカード & Grid */
#thxContactPage .thx-form-card { background: var(--c-card-bg); border: 1px solid var(--c-border); border-radius: 24px; padding: 60px; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
#thxContactPage .thx-form-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 32px !important; margin-bottom: 0; }
#thxContactPage .thx-form-group { margin-bottom: 32px; position: relative; }
#thxContactPage .thx-form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 12px; color: #fff; letter-spacing: 0.05em; }
#thxContactPage .required-badge { font-size: 13px; margin-left: 10px; padding: 4px 8px !important; border-radius: 4px; vertical-align: middle; font-weight: 700; color: var(--c-accent); background: rgba(55, 171, 157, 0.1); border: 1px solid var(--c-accent); }

/* 入力欄 */
#thxContactPage .thx-input, #thxContactPage .thx-textarea { width: 100%; background: var(--c-input-bg); border: 1px solid var(--c-border); border-radius: 12px; padding: 18px 20px; color: #fff; font-size: 15px; outline: none; box-sizing: border-box; transition: 0.3s ease; }
#thxContactPage .thx-input:focus, #thxContactPage .thx-textarea:focus { border-color: var(--c-accent); background: rgba(55, 171, 157, 0.08); box-shadow: 0 0 25px rgba(55, 171, 157, 0.2); }

/* エラー表示：配色修正ポイント（CF7 グローバルクラスを #thxContactPage で完全隔離） */
#thxContactPage .wpcf7-not-valid-tip {
    color: var(--c-accent) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-top: 8px !important;
    display: block !important;
    position: relative !important;
    left: 0 !important;
}
#thxContactPage .wpcf7-not-valid { border-color: var(--c-accent) !important; }
#thxContactPage .wpcf7-response-output {
    border: 1px solid var(--c-accent) !important;
    background: rgba(var(--c-accent-rgb), 0.1) !important;
    color: #fff !important;
    border-radius: 12px !important;
    margin: 32px 0 0 !important;
    padding: 15px !important;
    text-align: center !important;
}

/* カスタムセレクトUI */
#thxContactPage .thx-custom-select { position: relative; width: 100%; user-select: none; }
#thxContactPage .thx-select-trigger { width: 100%; background: var(--c-input-bg); border: 1px solid var(--c-border); border-radius: 12px; padding: 18px 20px; color: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
#thxContactPage .thx-select-trigger::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent); transform: rotate(45deg); transition: 0.3s; }
#thxContactPage .is-open .thx-select-trigger::after { transform: rotate(-135deg); }
#thxContactPage .thx-select-options { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #061426; border: 1px solid var(--c-accent); border-radius: 12px; overflow: hidden; z-index: 100; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: 0.3s; box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
#thxContactPage .is-open .thx-select-options { opacity: 1; visibility: visible; transform: translateY(0); }
#thxContactPage .thx-option { padding: 15px 20px; font-size: 14px; color: rgba(255,255,255,0.8); cursor: pointer; transition: 0.2s; }
#thxContactPage .thx-option:hover { background: rgba(55, 171, 157, 0.2); color: #fff; padding-left: 25px; }

/* 送信ボタン */
#thxContactPage .thx-form-submit { text-align: center; margin-top: 60px; display: flex !important; justify-content: center !important; align-items: center !important; gap: 16px !important; }
#thxContactPage .thx-submit-link { display: inline-flex !important; align-items: center !important; justify-content: flex-start !important; gap: 16px !important; text-decoration: none; background: transparent !important; border: none !important; outline: none !important; cursor: pointer; padding: 0 !important; transition: all 0.3s ease; white-space: nowrap !important; width: auto !important; }
#thxContactPage .thx-submit-btn-text { display: inline-block !important; font-size: 14px; font-weight: 700; color: #fff; letter-spacing: 0.15em; text-transform: uppercase; border-bottom: 1px solid rgba(55, 171, 157, 0.3); padding-bottom: 4px; transition: all 0.3s ease; }
#thxContactPage .thx-submit-arrow { flex-shrink: 0 !important; width: 44px !important; height: 44px !important; border-radius: 50% !important; border: 1px solid rgba(var(--c-accent-rgb), 0.3) !important; display: flex !important; align-items: center !important; justify-content: center !important; position: relative !important; transition: all 0.4s ease !important; color: var(--c-accent) !important; cursor: pointer !important; line-height: 0 !important; }

#thxContactPage .thx-submit-link:hover .thx-submit-btn-text, #thxContactPage .thx-form-submit:hover .thx-submit-btn-text { color: var(--c-accent) !important; border-color: var(--c-accent) !important; }
#thxContactPage .thx-submit-link:hover .thx-submit-arrow, #thxContactPage .thx-form-submit:hover .thx-submit-arrow { background: var(--c-accent) !important; color: #fff !important; border-color: var(--c-accent) !important; box-shadow: 0 0 20px rgba(var(--c-accent-rgb), 0.6) !important; transform: translateX(5px) !important; }

/*
 * 死に @keyframes svc-pulse（Contact form 内で animation 参照なし）は
 * Phase 2-F Step 3（v0.7.2）で削除済み。
 * About / Service / Entry form では同名 svc-pulse が実使用されており、それらは
 * Phase 3 の @keyframes 重複統合候補として温存。
 */

/* CF7 隠し要素設定（既に #thxContactPage スコープ付き、inline 元のまま） */
#thxContactPage .wpcf7 form p { margin: 0 !important; }
#thxContactPage .wpcf7 form br { display:none !important; }
#thxContactPage .wpcf7 span.wpcf7-form-control-wrap { display:block !important; width:100% !important; position: relative !important; }
#thxContactPage .thx-hidden-system { display: none !important; }

@media (max-width: 768px) { #thxContactPage { padding: 130px 0 80px !important; } #thxContactPage .thx-form-card { padding: 40px 20px; } #thxContactPage .thx-form-row { grid-template-columns: 1fr !important; gap: 0; } #thxContactPage .thx-contact-label { margin-bottom: 60px; } }
