/* モーダル背景の設定（スクロール制御） */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* 横スクロールによるブラウザの戻る挙動などを防止 */
    overscroll-behavior-x: none;
}

/* モーダルコンテンツ */
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 25px;
    border-radius: 12px;
    max-height: 85vh;
    overflow-y: auto;
    /* コンテンツ内も横スクロールを禁止 */
    overflow-x: hidden;
}

/* ボタンエリア：縦並びにする設定 */
.modal-buttons {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    gap: 15px; /* ボタン間の垂直方向の間隔 */
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 「修正する」ボタン */
.close-modal {
    order: 2; /* 送信ボタンの下に配置 */
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

/* 「申し込みを完了する」ボタン（CF7のSubmit） */
.modal-buttons .wpcf7-submit {
    order: 1; /* 修正ボタンより上に配置（一番目立つ位置） */
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 18px; /* 高さを出して押しやすく */
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    width: 100% !important;
    margin: 0 !important;
}

/* テーブルのさらなる微調整（縦幅圧縮） */
.confirm-table th, .confirm-table td {
    padding: 8px 5px;
    font-size: 14px;
}