section.hero{
	background: url(/wordpress/wp-content/themes/higashiyama-tc/img/bg-contact.webp) no-repeat center center;
	background-size: cover;
}
@media screen and (max-width: 768px) {
	section.hero{
		background: url(/wordpress/wp-content/themes/higashiyama-tc/img/bg-contact-sp.webp) no-repeat center center;
		background-size: cover;
	}	
}

/* MW WP Form 送信完了画面のみ非表示 */
body:has(.mw_wp_form_complete) .form-head,
body:has(.mw_wp_form_complete) .contact-form__notice {
    display: none !important
}
/* ========================================
   お問い合わせフォーム
======================================== */

.contact-form {
    width: 100%;
    max-width: 900px;
    margin: 30px auto 60px;
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    box-sizing: border-box;
}

/* 必須項目の案内 */
.contact-form__notice {
    margin: 0 0 10px;
    color: #e53935;
    font-size: 14px;
}

/* ========================================
   テーブル
======================================== */

.contact-form__table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.contact-form__table th,
.contact-form__table td {
    padding: 16px;
    border: 1px solid #aaa;
    vertical-align: middle;
    box-sizing: border-box;
}

/* 項目名 */
.contact-form__table th {
    width: 30%;
    background: #f8f7f3;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    line-height: 1.7;
}

/* 入力欄 */
.contact-form__table td {
    width: 70%;
    background: #fff;
    text-align: left;
}

/* 必須マーク */
.contact-form .required {
    color: #e53935;
}

/* ========================================
   入力フォーム
======================================== */

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea,
.contact-form select {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #aaa;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
}

/* 通常の入力欄 */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
    width: 300px;
    min-height: 42px;
}

/* 住所 */
.contact-form input[name="your-address"] {
    width: 100%;
    max-width: 520px;
}

/* 郵便番号 */
.contact-form input[name="your-postcode"] {
    width: 200px;
}

/* セレクトボックス */
.contact-form select {
    width: 220px;
    min-height: 42px;
}

/* お問い合わせ内容 */
.contact-form textarea {
    display: block;
    width: 100%;
    max-width: 520px;
    min-height: 160px;
    resize: vertical;
}

/* フォーカス */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #2aa738;
    box-shadow: 0 0 0 2px rgba(42, 167, 56, 0.15);
}

/* ========================================
   ラジオボタン
======================================== */

.contact-form input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    accent-color: #2aa738;
    vertical-align: middle;
}

.contact-form .mwform-radio-field {
    display: inline-block;
    margin-right: 20px;
}

.contact-form .mwform-radio-field label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* ========================================
   補足テキスト
======================================== */

.contact-form__example {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    color: #777;
}

/* ========================================
   エラーメッセージ
======================================== */

.contact-form .error {
    display: block;
    margin-top: 5px;
    color: #e53935;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   ボタン
======================================== */

.contact-form__buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 35px;
}

.contact-form__buttons input[type="submit"],
.contact-form__buttons input[type="reset"],
.contact-form__buttons button {
    min-width: 150px;
    min-height: 48px;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    background: #143566;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
	text-align: center !important;
}

.contact-form__buttons input[type="submit"]:hover,
.contact-form__buttons button:hover {
    background: #2aa738;
}

/* リセット・戻る */
.contact-form__reset input,
.contact-form__back input {
    background: #777 !important;
}

.contact-form__reset input:hover,
.contact-form__back input:hover {
    background: #555 !important;
}

.mw_wp_form .mwform-tel-field input {
    width: 90px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
}

/* スマートフォン */
@media screen and (max-width: 720px) {
    .mw_wp_form .mwform-tel-field {
        width: 100%;
        gap: 5px;
    }

    .mw_wp_form .mwform-tel-field input {
        width: 75px;
        flex: 1 1 0;
    }
}

/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 768px) {

    .contact-form {
        margin: 20px auto 40px;
        font-size: 14px;
    }

    .contact-form__notice {
        font-size: 12px;
    }

    /* テーブルを縦並び */
    .contact-form__table,
    .contact-form__table tbody,
    .contact-form__table tr,
    .contact-form__table th,
    .contact-form__table td {
        display: block;
        width: 100%;
    }

    .contact-form__table tr {
        margin-bottom: 15px;
    }

    /* 項目名 */
    .contact-form__table th {
        padding: 12px 15px;
        border-bottom: none;
        text-align: left;
        font-size: 14px;
        font-weight: 600;
    }

    /* 入力欄 */
    .contact-form__table td {
        padding: 15px;
    }

    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form input[type="tel"],
    .contact-form textarea,
    .contact-form select {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }

    .contact-form__example {
        display: block;
        margin: 5px 0 0;
    }

    .contact-form__buttons {
        gap: 10px;
        margin-top: 25px;
    }

    .contact-form__buttons input[type="submit"],
    .contact-form__buttons input[type="reset"],
    .contact-form__buttons button {
        min-width: 120px;
    }
}