/* ==========================================================================
   お問い合わせフォーム専用スタイルシート (form-style.css)
   ========================================================================== */

/* フォーム全体の最大幅や余白調整 */
.contarea {
    width: 100% !important;
    max-width: 800px !important;
    margin: 40px auto 20px auto !important;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #2d3748 !important; /* 少し濃いグレーで読みやすさを向上 */
    line-height: 1.7 !important;
}

/* テーブル全体のレイアウト（背景色を #e8e8e8 ベースに設定） */
table.formTable {
    width: 100% !important;
    max-width: 100% !important;
    display: table !important;
    border-collapse: separate !important;
    border-spacing: 2px !important; /* セル間に2pxの隙間を空けてシャープな枠線を表現 */
    background-color: #e8e8e8 !important; /* テーブルのベース背景色 */
    border-top: none !important; /* 上の青い線を完全に非表示 */
    margin-bottom: 40px !important;
}

/* 行のレイアウト保証 */
table.formTable tr {
    display: table-row !important;
}

/* 各セルの基本調整 */
table.formTable th.contsub,
table.formTable td.contsub {
    padding: 20px 24px !important; /* 余白を少し広げてゆとりを持たせる */
    vertical-align: middle !important;
    box-sizing: border-box !important;
    display: table-cell !important;
}

/* 左側の項目名セル（全体の32%幅。少し濃いめのグレーで引き締め） */
table.formTable th.contsub {
    width: 32% !important;
    min-width: 140px !important;
    background-color: #f1f1f1 !important; /* 項目名はやや明るいグレー */
    font-weight: bold !important;
    font-size: 16px !important; /* 文字を少し大きく調整 */
    text-align: left !important;
    color: #1a202c !important;
}

/* 右側の入力・確認エリアセル（全体の68%幅。背景は白にしてコントラストを出す） */
table.formTable td.contsub {
    width: 68% !important;
    background-color: #ffffff !important; /* 入力・確認エリアは白背景で見やすく */
    text-align: left !important;
    font-size: 16px !important; /* 文字を少し大きく調整 */
    color: #2d3748 !important;
}

/* 必須マークの装飾（＊） */
.conthis {
    color: #e53e3e !important;
    margin-left: 6px !important;
    font-size: 15px !important;
    font-weight: bold !important;
}

/* --------------------------------------------------------------------------
   各種入力パーツの調整
   -------------------------------------------------------------------------- */

/* テキスト・メール・電話の入力パーツ */
table.formTable input[type="text"],
table.formTable input[type="email"],
table.formTable input[type="tel"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important; /* 他のCSSによる高さ制限をリセット */
    padding: 12px 14px !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 6px !important;
    font-size: 16px !important; /* 入力文字も大きめに */
    color: #2d3748 !important;
    background-color: #fff !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* 住所欄（郵便番号と住所の横並び）の微調整 */
table.formTable input[name="郵便番号"] {
    display: inline-block !important;
    width: 140px !important;
    margin-right: 15px !important;
}
table.formTable input[name="住所"] {
    display: inline-block !important;
    width: calc(100% - 170px) !important;
    min-width: 200px !important;
}

/* フォーカス時の強調エフェクト（グレー基調に合わせる） */
table.formTable input[type="text"]:focus,
table.formTable input[type="email"]:focus,
table.formTable input[type="tel"]:focus,
table.formTable select:focus,
table.formTable textarea:focus {
    outline: none !important;
    border-color: #4a5568 !important;
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.15) !important;
    background-color: #f7fafc !important;
}

/* セレクトボックス（プルダウン）文字潰れ対策の修正 */
table.formTable select {
    width: 100% !important;
    max-width: 380px !important;
    height: auto !important; /* 高さを自動設定にして他CSSの干渉を防ぐ */
    line-height: 1.5 !important; /* 行の高さを正常化 */
    padding: 12px 35px 12px 14px !important; /* 内側の余白をしっかり確保 */
    border: 1px solid #cbd5e0 !important;
    border-radius: 6px !important;
    font-size: 16px !important; /* 文字を大きく */
    color: #2d3748 !important;
    background-color: #fff !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    display: inline-block !important;
}

/* ラジオボタンまわりの余白 */
table.formTable td.contsub label {
    margin-right: 24px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
}
table.formTable input[type="radio"] {
    margin-right: 8px !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
}

/* お問い合わせ内容（テキストエリア）の調整 */
table.formTable textarea {
    width: 100% !important;
    padding: 14px !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    color: #2d3748 !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    box-sizing: border-box !important;
}

/* --------------------------------------------------------------------------
   【修正】ボタンエリア（シックなモノトーン・グレーに統一）
   -------------------------------------------------------------------------- */

/* ボタン配置コンテナ（旧・新規の両対応用） */
.contbtn,
.contbtn-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 24px !important; /* ボタン同士の間隔 */
    margin: 40px auto 60px auto !important;
    max-width: 600px !important;
    width: 100% !important;
}

/* 全ボタン共通のベース設定 */
.btn-back, 
.btn-submit,
.contbtn input[type="reset"],
.contbtn input[type="submit"] {
    display: inline-block !important;
    height: 52px !important; /* 高さを綺麗に統一 */
    line-height: 52px !important; /* 文字を垂直中央に */
    padding: 0 30px !important; /* 左右にタップしやすい余白を確保 */
    font-size: 16px !important;
    font-weight: bold !important;
    border-radius: 30px !important; /* 角丸で洗練された印象に */
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    border: none !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important; /* 絶対に途中で改行させない */
    min-width: 200px !important;    /* 最低幅を設定 */
    width: auto !important;
    text-decoration: none !important; /* リンク下線消去 */
}

/* サブボタン（リセット / 戻る修正）：明るめの洗練されたグレー */
.btn-back,
.contbtn input[type="reset"] {
    background-color: #cbd5e0 !important; /* 明るめのグレー */
    color: #2d3748 !important;
}
.btn-back:hover,
.contbtn input[type="reset"]:hover {
    background-color: #a0aec0 !important; /* ホバーで少し暗く */
    color: #1a202c !important;
}

/* メイン決定ボタン（確認へ / 送信する / トップへ戻る）：少し濃いめのチャコールグレー */
.btn-submit,
.contbtn input[type="submit"] {
    background-color: #4a5568 !important; /* 背景にマッチする濃いチャコールグレー */
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(74, 85, 104, 0.15) !important; /* 馴染む影を少し追加 */
}
.btn-submit:hover,
.contbtn input[type="submit"]:hover {
    background-color: #2d3748 !important; /* ホバーでさらに濃くして押しやすさを演出 */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(74, 85, 104, 0.25) !important;
}

/* --------------------------------------------------------------------------
   スマホ対応（画面幅768px以下の場合に自動切り替え）
   ========================================================================== */
@media screen and (max-width: 768px) {
    .contarea {
        padding: 0 10px !important;
    }
    
    /* スマホ用に1カラムのリスト形式に配置 */
    table.formTable, 
    table.formTable tbody, 
    table.formTable tr, 
    table.formTable th.contsub, 
    table.formTable td.contsub {
        display: block !important;
        width: 100% !important;
    }
    
    /* 行ごとの区切り */
    table.formTable tr {
        border-bottom: 3px solid #e8e8e8 !important;
        margin-bottom: 5px !important;
        background-color: #ffffff !important;
    }
    
    table.formTable th.contsub,
    table.formTable td.contsub {
        border: none !important;
        padding: 14px 16px !important;
    }
    
    /* スマホ時の項目ヘッダー（薄グレーの帯を敷いて見やすさアップ） */
    table.formTable th.contsub {
        background-color: #f1f1f1 !important;
        font-size: 15px !important;
        padding-bottom: 10px !important;
        font-weight: bold !important;
    }
    
    /* スマホ時の内容表示エリア */
    table.formTable td.contsub {
        padding-top: 10px !important;
        padding-bottom: 20px !important;
        font-size: 16px !important;
    }
    
    /* 郵便番号と住所をスマホでは縦に積み上げる */
    table.formTable input[name="郵便番号"] {
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    table.formTable input[name="住所"] {
        width: 100% !important;
    }
    
    /* ボタンを指でタップしやすいよう画面いっぱいに広げ、縦並びにする */
    .contbtn,
    .contbtn-container {
        flex-direction: column-reverse !important; /* スマホでは決定アクション（送信等）を上に、戻るを下に配置 */
        gap: 16px !important;
        padding: 0 10px !important;
    }
    .btn-back, 
    .btn-submit,
    .contbtn input[type="reset"],
    .contbtn input[type="submit"] {
        width: 100% !important;
        padding: 0 !important; /* 高さとline-heightで制御するため内側は0に */
        font-size: 18px !important;
        border-radius: 8px !important; /* タップしやすい角丸 */
    }
}