/**
 * Contact Form 7 Multi-Step Forms カスタムスタイル
 */

/* マルチステップフォーム全体のスタイル */
.wpcf7-form.cf7msf {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ステップインジケーター */
.cf7msf-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.cf7msf-steps:after {
    content: '';
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.cf7msf-step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cf7msf-step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: bold;
    margin-bottom: 5px;
}

.cf7msf-step.active .cf7msf-step-number {
    background: #007bff;
    color: white;
}

.cf7msf-step.completed .cf7msf-step-number {
    background: #28a745;
    color: white;
}

/* ボタンスタイル */
.cf7msf-next,
.cf7msf-prev,
.wpcf7-submit {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 5px;
    transition: all 0.3s;
}

.cf7msf-prev {
    background: #6c757d;
}

.cf7msf-next:hover,
.wpcf7-submit:hover {
    background: #0069d9;
}

.cf7msf-prev:hover {
    background: #5a6268;
}

/* 確認画面のスタイル */
.cf7msf-confirm {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.cf7msf-confirm-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.cf7msf-confirm-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.cf7msf-confirm-value {
    color: #333;
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 5px 0;
    line-height: 1;
}

.wpcf7-response-output {
    margin: 20px 0;
    padding: 10px;
    border-radius: 4px;
}

/* フォームフィールド */
.wpcf7-form-control-wrap {
    margin-bottom: 35px;
    display: block;
}

.wpcf7-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    position: relative;
    z-index: 2;
}

/* 疑似要素の位置を固定 - エラーメッセージの有無に関係なく */
.wpcf7-form-control-wrap::before,
.wpcf7-form-control-wrap::after {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

/* custom-select-wrap内のselectタグのAlert疑似要素の位置調整 */
.custom-select-wrap .wpcf7-form-control-wrap.error::after {
    top: 32%;
    right: 42px;
    transform: none;
}

/* 必須マーク */
.required {
    color: #dc3545;
    margin-left: 3px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .cf7msf-steps {
        flex-direction: column;
        align-items: flex-start;
    }

    .cf7msf-steps:after {
        display: none;
    }

    .cf7msf-step {
        margin-bottom: 10px;
        display: flex;
        align-items: center;
    }

    .cf7msf-step-number {
        margin-right: 10px;
        margin-bottom: 0;
    }
}