/* =============================================================
   お客様相談窓口 (customer-support)
   ============================================================= */

/*==================================================
  共通・ユーティリティ
==================================================*/
.sp-only {
    display: none;
}

.areaTitle {
    margin-bottom: 50px;
}

.areaTitle.short {
    margin-bottom: 20px;
}

/*==================================================
  メインビジュアル (customerSupportMain)
==================================================*/
.customerSupportMain {
    position: relative;
    padding: 31px 0 29px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1FAFF;
    height: 190px;
    overflow: hidden;
}

.customerSupportMain::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background: url(../images/common/main-photo-left.png) no-repeat center center/100%;
    width: 270px;
    height: 100%;
    z-index: 0;
}

.customerSupportMain::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    background: url(../images/common/main-photo-right.png) no-repeat center center/100%;
    width: 354px;
    height: 100%;
    z-index: 0;
}

.customerSupportMain .inner {
    position: relative;
    z-index: 1;
}

.customerSupportMain .mainTitle {
    font-size: 37px;
    font-weight: bold;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
    color: #00B0ED;
}

.customerSupportMain .mainTxt {
    font-size: 16px;
    line-height: 1.62;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.mainTxtSp {
    display: none;
}

/*==================================================
  こんなときはご相談ください (areaConsultCase)
==================================================*/
.areaConsultCase {
    padding: 60px 0;
    background: #fff;
}

.consultCaseGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.consultCaseCard {
    border-radius: 6px;
    overflow: hidden;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
    display: flex;
    flex-direction: column;
}

.consultCaseCardTitle {
    background: #00B0ED;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 17px 0;
    margin: 0;
    line-height: 1.4;
}

.consultCaseList {
    background: #F2F6F9;
    padding: 20px 20px 20px 28px;
    margin: 0;
    list-style: none;
    flex: 1;
}

.consultCaseList li {
    position: relative;
    padding-left: 16px;
    line-height: 1.6;
    color: #40536A;
    margin-bottom: 10px;
}

.consultCaseList li:last-child {
    margin-bottom: 0;
}

.consultCaseList li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    background: #00B0ED;
    border-radius: 50%;
    flex-shrink: 0;
}

/*==================================================
  ご相談の流れ (areaConsultFlow)
==================================================*/
.areaConsultFlow {
    padding: 60px 0;
    background: #F1FAFF;
}

.consultFlowTimeline {
    background: #fff;
    border-radius: 12px;
    padding: 30px 95px 20px;
}

.consultFlowStep {
    display: flex;
    gap: 0;
    margin-bottom: 22px;
}

.consultFlowStepLast {
    margin-bottom: 0;
}

/* 左側：番号と丸 */
.consultFlowLeft {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    align-self: stretch;
}

.consultFlowNumber {
    font-size: 24px;
    font-weight: bold;
    color: #00B0ED;
    line-height: 1;
}

.consultFlowCircle {
    padding-top: 5px;
}

.consultFlowDot {
    display: block;
    width: 20px;
    height: 20px;
    background: #00B0ED;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.consultFlowLine {
    content: "";
    position: absolute;
    top: 18px;
    left: calc(22px + 25px);
    width: 3px;
    height: calc(100% + 20px);
    background: #00B0ED;
}

/* 右側：見出しと本文 */
.consultFlowRight {
    flex: 1;
    margin-left: -2px;
}

.consultFlowHeader {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.consultFlowHeaderLine {
    width: 25px;
    height: 1px;
    background: #00B0ED;
    flex-shrink: 0;
}

.consultFlowTitle {
    font-size: 18px;
    font-weight: bold;
    color: #00B0ED;
    margin: 0;
    padding-left: 5px;
}

.consultFlowBody {
    margin-bottom: 25px;
}

.consultFlowBody p {
    font-size: 16px;
    line-height: 1.6;
    color: #40536A;
    margin: 0;
    margin-left: 32px;
}

/*==================================================
  相談窓口フォーム (areaConsultForm)
==================================================*/
.areaConsultForm {
    padding: 0 0 72px;
    background: #F1FAFF;
}

/* --- フォームカード --- */
.consultFormCard {
    background: #fff;
    border-radius: 14px;
    padding: 30px 115px 30px;
    /* max-width: 720px; */
    margin: 0 auto;
}

/* --- フォーム全体のラッパー (CF7 が生成する .wpcf7-form) --- */
.consultFormCard .wpcf7-form {
    margin: 0;
}

/* --- 条件表示フィールド（料金に関すること / サービス品質 / 対応・マナー / レビュー・評価 / 安全面での不安 選択時） --- */
.csf-conditional-fee,
.csf-conditional-service,
.csf-conditional-manner,
.csf-conditional-review,
.csf-conditional-safety {
    display: none;
    overflow: hidden;
}

.csf-conditional-fee.is-visible,
.csf-conditional-service.is-visible,
.csf-conditional-manner.is-visible,
.csf-conditional-review.is-visible,
.csf-conditional-safety.is-visible {
    display: block;
    animation: csfFadeIn 0.25s ease;
}

@keyframes csfFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- 各フィールドブロック --- */
.csf-item {
    margin-bottom: 22px;
}

/* --- ラベル行 --- */
.csf-label {
    font-size: 18px;
    font-weight: bold;
    color: #454545;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- 必須バッジ --- */
.csf-required {
    display: inline-block;
    background: #FF6E00;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 0 7px;
    border-radius: 5px;
    line-height: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* --- テキスト / メール / 電話 / 数値 インプット --- */
.csf-item input[type="text"],
.csf-item input[type="email"],
.csf-item input[type="tel"],
.csf-item input[type="number"],
.consultFormCard .wpcf7-form-control.wpcf7-text,
.consultFormCard .wpcf7-form-control.wpcf7-email,
.consultFormCard .wpcf7-form-control.wpcf7-tel,
.consultFormCard .wpcf7-form-control.wpcf7-number {
    width: 100%;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    padding: 11px 14px;
    font-size: 14px;
    color: #1A2E40;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.csf-item input[type="text"]:focus,
.csf-item input[type="email"]:focus,
.csf-item input[type="tel"]:focus,
.csf-item input[type="number"]:focus,
.consultFormCard .wpcf7-form-control.wpcf7-text:focus,
.consultFormCard .wpcf7-form-control.wpcf7-email:focus,
.consultFormCard .wpcf7-form-control.wpcf7-number:focus,
.consultFormCard .wpcf7-form-control.wpcf7-tel:focus {
    border-color: #00B0ED;
    outline: none;
}

/* --- プレースホルダー色 --- */
.csf-item input::placeholder,
.csf-item textarea::placeholder,
.consultFormCard .wpcf7-form-control::placeholder {
    color: #E0E0E0;
}

/* --- ラジオボタン / チェックボックス グリッド --- */
.csf-item-checkbox .wpcf7-checkbox,
.csf-item-checkbox .wpcf7-radio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.csf-item-checkbox .wpcf7-list-item {
    margin: 0;
}

.csf-item-checkbox .wpcf7-list-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    padding: 10px 10px;
    font-size: 16px;
    color: #E0E0E0;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
    text-align: center;
    line-height: 1.4;
}

/* ラジオ/チェックボックス本体を非表示にしてレイアウト崩れを防ぐ */
.csf-item-checkbox .wpcf7-list-item input[type="checkbox"],
.csf-item-checkbox .wpcf7-list-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.csf-item-checkbox .wpcf7-list-item input[type="checkbox"]:checked + span,
.csf-item-checkbox .wpcf7-list-item input[type="radio"]:checked + span,
.csf-item-checkbox .wpcf7-list-item.active label {
    background: #00B0ED;
    border-color: #00B0ED;
    color: #fff;
    font-weight: bold;
}

/* JavaScriptで選択状態を反映するためのフォールバック */
.csf-item-checkbox .wpcf7-list-item label:has(input:checked) {
    background: #00AFEC;
    border-color: #00AFEC;
    color: #fff;
    font-weight: bold;
}

/* --- テキストエリア --- */
.csf-item textarea,
.consultFormCard .wpcf7-form-control.wpcf7-textarea {
    width: 100%;
    min-height: 150px;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
    color: #1A2E40;
    background: #fff;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    height: 42px;
    line-height: 42px;
}

.csf-item textarea:focus,
.consultFormCard .wpcf7-form-control.wpcf7-textarea:focus {
    border-color: #00B0ED;
    outline: none;
}

/* --- 補足テキスト --- */
.csf-note {
    font-size: 16px;
    color: #40536A;
    margin-top: 6px;
    margin-bottom: 0;
}

/* --- CF7 デフォルトエラーメッセージは常に非表示
     エラー表示は JS 側の .csf-error-tip に完全統一 --- */
.consultFormCard .wpcf7-not-valid-tip {
    display: none !important;
}

/* --- カスタムエラーメッセージ --- */
.csf-error-tip {
    font-size: 12px;
    color: #E53935;
    margin-top: 4px;
    display: block;
}

/* --- エラー状態のインプット枠（JS が .csf-invalid を付与） --- */
.csf-item input.csf-invalid,
.csf-item textarea.csf-invalid {
    border-color: #E53935;
    background-color: #FFF5F5;
    transition: border-color 0.2s, background-color 0.2s;
}

/* ラジオ（相談種類）未選択エラー：枠は赤くせずエラーメッセージのみ表示 */
.csf-item-checkbox.csf-radio-error .csf-error-tip {
    margin-top: 8px;
}

/* --- 送信失敗メッセージ --- */
.csf-send-failed {
    text-align: center;
    padding: 24px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #742a2a;
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 8px;
    margin-top: 16px;
}

/* --- 送信中スピナー（CF7ネイティブの visibility 制御に乗せる） --- */
.consultFormCard .wpcf7-spinner {
    margin: 0 0 0 12px;
    vertical-align: middle;
}

/* --- 個人情報保護方針 同意チェックボックス --- */
.csf-privacy-agree {
    text-align: center;
    margin-top: 37px;
    margin-bottom: 25px;
}

.csf-privacy-agree .wpcf7-list-item {
    margin: 0;
}

.csf-privacy-agree .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #40536A;
    cursor: pointer;
}

.csf-privacy-agree .wpcf7-list-item input[type="checkbox"] {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid #E0E0E0;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.csf-privacy-agree .wpcf7-list-item input[type="checkbox"]:checked {
    background: #9E9E9E;
    border-color: #9E9E9E;
}

.csf-privacy-agree .wpcf7-list-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 8px;
    width: 7px;
    height: 13px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.csf-privacy-agree a {
    color: #00B0ED;
}

.csf-privacy-agree .csf-error-tip {
    display: block;
    text-align: center;
    margin-top: 8px;
}

/* --- 送信ボタン エリア --- */
.csf-submit {
    text-align: center;
    margin-top: 32px;
    margin-bottom: 28px;
}

.csf-submit input[type="submit"],
.consultFormCard .wpcf7-submit {
    display: inline-block;
    background: #00AFEC;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 16px 64px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    min-width: 280px;
    -webkit-appearance: none;
}

.csf-submit input[type="submit"]:hover,
.consultFormCard .wpcf7-submit:hover {
    opacity: 0.85;
}

/* --- 安心してご相談いただくために ボックス --- */
.csf-security-note {
    background: #FFFDE1;
    border: 2px solid #FAD438;
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 4px;
}

.csf-security-title {
    font-size: 18px;
    font-weight: bold;
    color: #00B0ED;
    text-align: center;
    margin: 0 0 16px 0;
    position: relative;
    padding-bottom: 10px;
}

.csf-security-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: #00B0ED;
}

.csf-security-note ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.csf-security-note ul li {
    font-size: 14px;
    color: #40536A;
    line-height: 1.7;
    padding-left: 0;
}

/*==================================================
  レスポンシブ：モバイル (768px以下)
==================================================*/
@media (max-width: 768px) {

    /*---------- メインビジュアル ----------*/
    .customerSupportMain {
        padding: 22px 0 20px;
        height: 120px;
    }

    .customerSupportMain .mainTitle {
        font-size: 30px;
        margin-bottom: 6px;
    }

    .customerSupportMain .mainTxt {
        display: none;
    }

    .mainTxtSp {
        display: block;
        padding: 20px 0 0;
        background: #fff;
    }

    .mainTxtSp .mainTxt {
        display: block;
        font-size: 14px;
        letter-spacing: 0.2px;
        line-height: 1.55;
        font-weight: 600;
        text-align: center;
        color: #40536A;
    }

    .customerSupportMain::before {
        top: auto;
        left: 0;
        bottom: -16px;
        width: 128px;
    }

    .customerSupportMain::after {
        top: -9px;
        right: 0;
        width: 204px;
    }

    /*---------- こんなときはご相談ください ----------*/
    .areaConsultCase {
        padding: 40px 0;
    }

    .consultCaseGrid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .consultCaseCardTitle {
        font-size: 18px;
        padding: 10px 0;
    }

    .consultCaseList {
        padding: 18px 20px;
        flex: unset;
    }

    .consultCaseList br {
        display: none;
    }

    .consultCaseList li {
        font-size: 14px;
        margin-bottom: 8px;
    }

    /*---------- ご相談の流れ ----------*/
    .areaConsultFlow {
        padding: 40px 0;
    }

    .consultFlowTimeline {
        padding: 30px 12px 10px;
        border-radius: 10px;
    }

    .consultFlowStep {
        gap: 0;
        margin-bottom: 15px;
    }

    .consultFlowLeft {
        gap: 8px;
    }

    .consultFlowNumber {
        font-size: 22px;
    }

    .consultFlowLine {
        left: calc(22px + 22px);
        width: 2px;
    }

    .consultFlowCircle {
        padding-top: 2px;
    }

    .consultFlowHeaderLine {
        width: 18px;
    }

    .consultFlowTitle {
        font-size: 16px;
        padding-left: 8px;
    }

    .consultFlowHeader {
        margin-bottom: 5px;
    }

    .consultFlowBody {
        margin-bottom: 12px;
    }

    .consultFlowBody p {
        font-size: 14px;
        margin-left: 25px;
    }

    /*---------- 相談窓口フォーム ----------*/
    .areaConsultForm {
        padding: 0 0 52px;
    }

    .consultFormCard {
        padding: 28px 18px 32px;
        border-radius: 10px;
    }

    .csf-label {
        font-size: 16px;
    }

    .csf-item-checkbox .wpcf7-checkbox,
    .csf-item-checkbox .wpcf7-radio {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .csf-item-checkbox .wpcf7-list-item label {
        font-size: 12px;
        padding: 9px 6px;
    }

    .csf-note {
        font-size: 14px;
    }

    .csf-submit {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* スピナーと同幅のゴースト要素を左に置いてボタンを中央に保つ */
    .csf-submit::before {
        content: '';
        display: block;
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .csf-submit input[type="submit"],
    .consultFormCard .wpcf7-submit {
        font-size: 16px;
        padding: 14px 32px;
        min-width: 0;
        flex: 1;
        max-width: 290px;
    }

    .consultFormCard .wpcf7-spinner {
        width: 24px;
        margin: 0 0 0 8px;
        flex-shrink: 0;
    }

    .csf-security-note {
        padding: 16px 16px;
    }

    .csf-security-title {
        font-size: 16px;
    }

}
