/* =========================
   Contact Form (Input + Modal)
   ========================= */

/* 入力フォーム全体 */
.contact-form .contact_area {
    max-width: 820px;
    margin: 0 auto;
}

.contact-form .contact-row {
    margin-bottom: 18px;
}

.contact-form .contact-row--2col {
    display: flex;
    gap: 16px;
}

@media (max-width: 780px) {
    .contact-form .contact-row--2col {
        flex-direction: column;
    }
}

/* フィールド枠 */
.contact-form .contact-field {
    flex: 1;
}

/* ラベル */
.contact-form label {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.required_label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    margin-left: 8px;
    background: #e8f5e9;
    color: #1b5e20;
    vertical-align: middle;
}

/* 入力要素 */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9dde3;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 16px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #98a2ad;
}

/* フォーカス */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #6eba2c;
    box-shadow: 0 0 0 4px rgba(110, 186, 44, .14);
}

/* エラーメッセージ */
.error-message {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #b00020;
}

/* 送信前の確認ボタン */
.button_area_kakunin {
    margin-top: 22px;
    text-align: center;
}

.button_area_kakunin button {
    appearance: none;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 14px 60px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    background: #6eba2c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.button_area_kakunin button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
    filter: brightness(1.02);
}

.button_area_kakunin button:active {
    transform: translateY(0);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

/* =========================
   Modal
   ========================= */

body.is-modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    padding: 24px 2px;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: min(860px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .22);
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@media (max-width: 599px) {
    .modal-content {
        padding: 22px 11px 18px;
    }
}


/* 閉じるボタン */
.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

/* 確認画面 */
.cf7-confirm-wrap {
    padding-top: 8px;
}

.cf7-lead {
    margin: 0 0 14px;
    color: #334155;
    font-weight: 600;
}

/* 確認テーブル */
.cf7-confirm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #eef1f5;
    background: #fafbfc;
    margin-bottom: 18px;
}

.cf7-confirm-table th,
.cf7-confirm-table td {
    padding: 10px 10px;
    vertical-align: top;
    border-bottom: 1px solid #eef1f5;
}

.cf7-confirm-table tr:last-child th,
.cf7-confirm-table tr:last-child td {
    border-bottom: none;
}

.cf7-confirm-table th {
    width: 180px;
    color: #0f172a;
    font-weight: 700;
    background: #f3f6f8;
}

@media (max-width: 780px) {
    .cf7-confirm-table th {
        width: 140px;
    }
}

/* CF7フォーム（最小版の見た目調整） */
.wpcf7 {
    margin: 0;
}

.wpcf7 form {
    margin: 0;
}

/* CF7の送信ボタン */
.wpcf7 input[type="submit"].cf7-send {
    width: 100%;
    appearance: none;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 20px 18px;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    background: #6eba2c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
    transition: transform .2s ease, box-shadow .2s ease;
}

.wpcf7 input[type="submit"].cf7-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

.wpcf7 input[type="submit"].cf7-send:active {
    transform: translateY(0);
}

/* 戻るボタン */
.cf7-confirm-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 16px;
    border-top: 1px solid #eee;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06)
}

.cf7-confirm-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cf7-back {
    appearance: none;
    cursor: pointer;
    border: 1px solid #d9dde3;
    background: #fff;
    color: #0f172a;
    border-radius: 999px;
    padding: 5px 25px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cf7-back:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

/* 成功・失敗ボックス */
.success-box,
.error-box {
    margin-top: 16px;
    border-radius: 14px;
    padding: 14px 14px;
}

.success-box {
    background: #ecf8e6;
    border: 1px solid #d7f0c8;
}

.error-box {
    background: #fff0f1;
    border: 1px solid #ffd2d6;
}

.success-title,
.error-title {
    margin: 0 0 6px;
    font-weight: 800;
}

.success-text,
.error-text {
    margin: 0 0 10px;
    color: #334155;
}

.success-close,
.error-close {
    appearance: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 5px 25px;
    font-weight: 700;
    border: 1px solid #d9dde3;
    background: #fff;
}

/* hidden（CF7 minimalの非表示） */
.cf7-hidden {
    display: none !important;
}

/* CF7の標準レスポンス（必要なら非表示） */
.wpcf7-response-output {
    margin: 12px 0 0 !important;
    border-radius: 12px;
}

/* モーダル表示中は追従ヘッダーを隠す（SWELL想定の広めセレクタ） */
body.is-modal-open .l-fixHeader,
body.is-modal-open .l-header__fix,
body.is-modal-open .l-header,
body.is-modal-open .c-fixHeader,
body.is-modal-open .c-header {
    display: none !important;
}

/* モーダル内CF7の不要なpを消す（見た目＆高さをゼロに） */
.modal .wpcf7 form>p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* brもゼロ化（p内に残ってるやつ） */
.modal .wpcf7 form>p br {
    display: none !important;
}