/**
 * Contact Form 7 確認画面スタイル
 * 売却お問い合わせフォーム用
 */

/* ===== ステップインジケーター ===== */
.step {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 40px;
    padding: 0;
    list-style: none;
}

.step__items {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #999;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step__items::after {
    content: '';
    position: absolute;
    right: -20px;
    width: 40px;
    height: 2px;
    background: #ddd;
    top: 50%;
    transform: translateY(-50%);
}

.step__items:last-child::after {
    display: none;
}

.step__items.is-active {
}

.step__items.is-active .step__num {
    color: #fff;
    animation: stepPulse 0.5s ease;
}

.step__num {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

@keyframes stepPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== フォームテーブル共通 ===== */
.wpcf7-form .inquiry {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
}

.wpcf7-form .inquiry tr {
    border-bottom: 1px solid #e5e5e5;
}

.wpcf7-form .inquiry th {
    width: 30%;
    padding: 20px;
    background: #f8f9fa;
    text-align: left;
    font-weight: 500;
    vertical-align: middle;
}

.wpcf7-form .inquiry td {
    padding: 20px;
    background: #fff;
}

.inq-title {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2385C5;
}

.inq-subtitle {
    font-size: 18px;
    color: #2385C5;
    margin: 30px 0 15px;
    padding-left: 10px;
    border-left: 4px solid #2385C5;
}

/* ===== 必須・任意ラベル ===== */
.haveto, .any {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 10px;
    font-size: 12px;
    border-radius: 3px;
    font-weight: bold;
}

.haveto {
    background: #ff5757;
    color: #fff;
}

.any {
    background: #6c757d;
    color: #fff;
}

/* ===== フォーム要素 ===== */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #2385C5;
    box-shadow: 0 0 0 3px rgba(35, 133, 197, 0.1);
}

.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* チェックボックス */
.check1 label {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.check1 label:hover {
    color: #2385C5;
}

.check1 input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

/* ===== エラー表示 ===== */
.error {
    border-color: #ff5757 !important;
    background: #fff5f5 !important;
    animation: shake 0.3s ease;
}

.error-message {
    display: block;
    color: #ff5757;
    font-size: 13px;
    margin-top: 5px;
    animation: slideDown 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

/* ===== 確認画面 ===== */
#cf7-confirm-screen {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.confirm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.confirm-table tr {
    border-bottom: 1px solid #e5e5e5;
}

.confirm-table tr:last-child {
    border-bottom: none;
}

.confirm-table th {
    width: 30%;
    padding: 20px;
    background: #f8f9fa;
    text-align: left;
    font-weight: 500;
    color: #333;
}

.confirm-table td {
    padding: 20px;
    background: #fff;
    line-height: 1.6;
}

.section-header th {
    background: #2385C5;
    color: #fff;
    text-align: center;
}

.section-header .inq-subtitle {
    color: #fff;
    border: none;
    margin: 0;
    padding: 0;
}

/* ===== ボタン ===== */
.wpcf7-submit-block {
    text-align: center;
    margin: 40px 0;
}

#formbtn,
.btn-back,
.btn-submit {
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#formbtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#formbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#formbtn:active {
    transform: translateY(0);
}

/* 波紋エフェクト */
#formbtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#formbtn:active::after {
    width: 300px;
    height: 300px;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.btn-back {
    background: #6c757d;
    color: #fff;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-submit {
    background: linear-gradient(135deg, #2385C5 0%, #1e6ba8 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(35, 133, 197, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 133, 197, 0.4);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ローディングスピナー */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 送信ボタンのローディング状態 */
.btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    background: linear-gradient(135deg, #1a5d8a 0%, #164e79 100%);
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== モーダル非表示 ===== */
/* NOTE: !important used to override Contact Form 7 plugin modal styles (third-party) */
#wpcf7-modal__wrap,
#wpcf7-modal__bg,
#wpcf7-modal,
div[id*="wpcf7-modal"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* ===== プライバシーポリシー ===== */
.privacy-txt {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    /* background: #f8f9fa; */
    border-radius: 8px;
}

.privacy-txt a {
    color: #2385C5;
    text-decoration: none;
    font-weight: bold;
}

.privacy-txt a:hover {
    text-decoration: underline;
}

/* ===== 完了画面 ===== */
#cf7-completion-screen {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.completion-message {
    background: #f0f8ff;
    border: 2px solid #2385C5;
    border-radius: 10px;
    padding: 40px;
    margin: 40px auto;
    max-width: 600px;
}

.completion-message p {
    font-size: 18px;
    line-height: 1.8;
    margin: 15px 0;
    color: #333;
}

.completion-message p:first-child {
    font-weight: bold;
    color: #2385C5;
    font-size: 20px;
}

/* ===== レスポンシブ対応 ===== */

/* タブレット (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .wpcf7-form .inquiry th,
    .confirm-table th {
        width: 35%;
        padding: 15px;
    }
    
    .wpcf7-form .inquiry td,
    .confirm-table td {
        padding: 15px;
    }
}

/* スマートフォン (767px以下) */
@media screen and (max-width: 767px) {
    .step {
        /* flex-direction: column; */
        gap: 20px;
    }
    
    .step__items::after {
        /* display: none; */
    }
    
    .step__items {
        width: 100%;
        justify-content: center;
    }
    
    .wpcf7-form .inquiry,
    .confirm-table {
        box-shadow: none;
        border: 1px solid #e5e5e5;
    }
    
    .wpcf7-form .inquiry tr,
    .confirm-table tr {
        display: block;
        /* border-bottom: 2px solid #e5e5e5; */
        /* margin-bottom: 10px; */
    }
    
    .wpcf7-form .inquiry th,
    .wpcf7-form .inquiry td,
    .confirm-table th,
    .confirm-table td {
        display: block;
        width: 100%;
        padding: 10px 15px;
    }
    
    .wpcf7-form .inquiry th,
    .confirm-table th {
        background: #f8f9fa;
        color: #000000;
        font-size: 14px;
    }
    
    .wpcf7-form .inquiry td,
    .confirm-table td {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    .inq-title {
        font-size: 20px;
    }
    
    .inq-subtitle {
        font-size: 16px;
    }
    
    .confirm-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-back,
    .btn-submit {
        width: 100%;
        padding: 15px 20px;
    }
    
    #formbtn {
        width: 100%;
        padding: 15px 20px;
    }
    
    /* チェックボックスレイアウト調整 */
    .check1 label {
        display: block;
        margin-bottom: 10px;
    }
    
    /* 入力フィールドのフォントサイズ調整（iOS対策） */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px; /* iOS自動ズーム防止 */
    }
}

/* 超小型デバイス (480px以下) */
@media screen and (max-width: 480px) {
    .inq-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .wpcf7-form .inquiry th,
    .wpcf7-form .inquiry td,
    .confirm-table th,
    .confirm-table td {
        padding: 10px;
    }
    
    #formbtn,
    .btn-back,
    .btn-submit {
        font-size: 14px;
        padding: 12px 20px;
    }
}