/* =================================================================
   CF7 フォーム スタイル上書き
   旧サイトのフォーム見た目に合わせる
   ================================================================= */

/* --- ラジオボタン：旧サイト準拠（横並び） --- */
.contaxt-form .wpcf7-radio {
    display: inline !important;
}
.contaxt-form .wpcf7-radio .wpcf7-list-item {
    display: inline-block;
    margin: 0 20px 0 0;
}
.contaxt-form .wpcf7-radio .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    line-height: 1;
}
.contaxt-form .wpcf7-radio .wpcf7-list-item-label {
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.contaxt-form .wpcf7-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
    -webkit-appearance: radio;
    appearance: radio;
}
/* CF7 がラジオ親spanに form-check-input を付与する問題を打ち消し */
span.wpcf7-radio.form-check-input {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    min-height: auto !important;
}

/* --- 送信ボタン：旧サイト再現 --- */
.submit-line {
    text-align: center;
    margin-top: 30px;
}
.submit-line p {
    margin: 0;
}
.submit-line input[type="submit"],
.submit-line .wpcf7-submit {
    display: inline-block;
    width: 300px;
    max-width: 100%;
    padding: 18px 40px;
    background: #009463;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.submit-line input[type="submit"]:hover,
.submit-line .wpcf7-submit:hover {
    background: #007a52;
    opacity: .9;
}
.submit-line input[type="submit"]:disabled,
.submit-line .wpcf7-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

/* --- スピナー非表示 --- */
.wpcf7-spinner {
    display: none !important;
}

/* --- CF7 自動挿入の <p> タグを潰す --- */
.contaxt-form p,
.policy-check p,
.policy-text p:last-child,
.submit-line p {
    margin-bottom: 0;
}

/* --- バリデーションエラー --- */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
}

/* --- 送信結果メッセージ --- */
.wpcf7-response-output {
    text-align: center;
    margin: 20px auto 0;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
}
.wpcf7 form.sent .wpcf7-response-output {
    border-color: #009463;
    color: #009463;
}
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* ==============================================================
   CF7 pタグ余白リセット（全幅共通）
   CF7は各ショートコードを <p> で囲むため余白が発生する
   ============================================================== */
.wpcf7 form p {
    margin: 0 !important;
}

/* ==============================================================
   SP レスポンシブ（768px以下）
   ============================================================== */
@media (max-width: 768px) {
    /* フォーム DL：旧サイト準拠のコンパクト表示 */
    .contaxt-form dl {
        display: block;
        margin-bottom: 0;
    }
    .contaxt-form dl dt,
    .contaxt-form dl dd {
        display: block;
        width: 100%;
    }
    .contaxt-form dl dt {
        padding: 10px 10px 6px;
    }
    .contaxt-form dl dd {
        padding: 4px 10px 10px;
    }

    /* ラジオボタン：SPでも横並び（旧サイト準拠） */
    .contaxt-form .wpcf7-radio .wpcf7-list-item {
        display: inline-block;
        margin: 0 12px 4px 0;
    }
    .contaxt-form .wpcf7-radio .wpcf7-list-item-label {
        font-size: 14px;
    }

    /* 送信ボタン：旧サイト準拠サイズ */
    .submit-line {
        margin-top: 20px;
    }
    .submit-line input[type="submit"],
    .submit-line .wpcf7-submit {
        width: 80%;
        max-width: 300px;
        padding: 14px 20px;
        font-size: 15px;
    }

    /* 承諾チェックボックス行 */
    .policy-check {
        margin-top: 12px;
    }
    .policy-check .wpcf7-list-item label {
        font-size: 13px;
    }

    /* ポリシーテキスト */
    .policy-text {
        margin-top: 6px;
    }
    .policy-text p {
        font-size: 12px !important;
        line-height: 1.5;
    }
}

/* --- 承諾チェックボックス --- */
.policy-check .wpcf7-acceptance {
    display: inline;
}
.policy-check .wpcf7-list-item {
    margin: 0;
}
.policy-check .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
