
/* ========================================
   お問い合わせフォーム
======================================== */

/* フォーム全体 */
#main-container:has(.wpcf7) .wpcf7 {
    width: 100%;
    max-width: 900px;
    margin: 40px auto 60px;
}

#main-container {
    padding-top: 220px;
}

.entry-title {
    text-align: center;
    font-weight: bold;
}



/* テーブル */
#main-container .table-form {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 0 30px;
}

#main-container .table-form tr {
    border-bottom: 1px solid #ddd;
}

#main-container .table-form tr:first-child {
    border-top: 1px solid #ddd;
}

#main-container .table-form td {
    padding: 24px 20px;
    vertical-align: middle;
    line-height: 1.7;
    font-size: 15px;
}

/* 左側の項目名 */
#main-container .table-form td:first-child {
    width: 32%;
    background: #f7f7f7;
    font-weight: 600;
}

/* 右側の入力欄 */
#main-container .table-form td:last-child {
    width: 68%;
}

/* 必須表示 */
#main-container .table-form td strong {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    background: #c73535;
    color: #fff;
    border-radius: 2px;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 500;
    vertical-align: middle;
}

/* ========================================
   入力欄
======================================== */

#main-container .table-form input[type="text"],
#main-container .table-form input[type="email"],
#main-container .table-form input[type="tel"],
#main-container .table-form textarea,
#main-container .table-form select {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font: inherit;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

#main-container .table-form .size-full {
    width: 100%;
}

#main-container .table-form .size-m {
    width: 100%;
    max-width: 280px;
}

/* 名前の横並び */
#main-container .form-flex-items {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

#main-container .form-flex-items .item {
    flex: 1;
    min-width: 0;
}

#main-container .form-flex-items .item input {
    width: 100%;
}

/* テキストエリア */
#main-container .table-form textarea {
    width: 100%;
    height: 100px;
    min-height: 100px;
    resize: vertical;
}

/* フォーカス */
#main-container .table-form input:focus,
#main-container .table-form textarea:focus,
#main-container .table-form select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .06);
}

/* 自動入力の問い合わせ内容 */
#main-container .table-form input[readonly] {
    background: #f4f4f4;
    color: #555;
    cursor: default;
}

/* プレースホルダー */
#main-container .table-form input::placeholder,
#main-container .table-form textarea::placeholder {
    color: #aaa;
}

/* ========================================
   個人情報同意
======================================== */

#main-container .privacy-check {
    margin: 30px auto;
    text-align: center;
    font-size: 14px;
    line-height: 2;
}

#main-container .privacy-check .wpcf7-list-item {
    margin: 0;
}

#main-container .privacy-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-right: 6px;
    vertical-align: middle;
    accent-color: #333;
}

#main-container .privacy-check a {
    color: #333;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ========================================
   送信・戻るボタン
======================================== */

#main-container .wpcf7 .btn-submit,
#main-container .wpcf7 .btn-back {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 320px;
    min-height: 56px;
    margin: 10px 8px;
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, opacity .2s;
}

/* 確認・送信 */
#main-container .wpcf7 .btn-submit {
    background: #333;
    border: 1px solid #333;
    color: #fff;
    line-height: 1;
}

#main-container .wpcf7 .btn-submit:hover {
    background: #555;
    border-color: #555;
}

/* 戻る */
#main-container .wpcf7 .btn-back {
    background: #fff;
    border: 1px solid #999;
    color: #333;
}

#main-container .wpcf7 .btn-back:hover {
    background: #f5f5f5;
}

/* ========================================
   バリデーション
======================================== */

#main-container .wpcf7-not-valid {
    border-color: #c73535 !important;
}

#main-container .wpcf7-not-valid-tip {
    display: block;
    margin-top: 7px;
    color: #c73535;
    font-size: 13px;
}

#main-container .wpcf7-response-output {
    margin: 25px 0 0;
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.7;
}

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

@media (max-width: 767px) {

    #main-container:has(.wpcf7) .wpcf7 {
        margin: 25px auto 40px;
        padding: 0 10px;
    }

#main-container {
    padding-top: 20vh;
}

    #main-container .table-form,
    #main-container .table-form tbody,
    #main-container .table-form tr,
    #main-container .table-form td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #main-container .table-form tr {
        border: none;
        margin-bottom: 22px;
    }

    #main-container .table-form td:first-child {
        width: 100%;
        padding: 12px 15px;
        border-left: 3px solid #ddd;
        font-size: 14px;
    }

    #main-container .table-form td:last-child {
        width: 100%;
        padding: 15px 0 0;
    }

    #main-container .table-form .size-m {
        max-width: none;
    }

    #main-container .form-flex-items {
        gap: 12px;
    }

    #main-container .table-form textarea {
        min-height: 150px;
    }

    #main-container .wpcf7 .btn-submit,
    #main-container .wpcf7 .btn-back {
        max-width: 100%;
        margin: 8px 0;
    }

    #main-container .privacy-check {
        font-size: 13px;
    }
}
