@charset "UTF-8";

/* ========================================
   お問い合わせページ (contact.css)
   ステップ型・条件分岐フォーム
======================================== */

/* === フォーム全体のラップ === */
.cf-form-wrap {
    padding: 50px 0;
    background: #f9f9f7;
}
.cf-form-wrap .container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === プログレスバー === */
.cf-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px;
}
.cf-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}
.cf-progress-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    background: #e0e0e0;
    color: #999;
    transition: all 0.3s;
}
.cf-progress-step--active .cf-progress-num {
    background: #1A3A5C;
    color: #fff;
}
.cf-progress-step--current .cf-progress-num {
    background: #CC0000;
    color: #fff;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3);
}
.cf-progress-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}
.cf-progress-step--active .cf-progress-label {
    color: #333;
}
.cf-progress-line {
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    margin-bottom: 22px;
}

/* === ステップの表示切替 === */
.cf-step {
    display: none;
}
.cf-step--active {
    display: block;
    animation: cfFadeIn 0.3s ease;
}
@keyframes cfFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === ステップ見出し === */
.cf-step-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
}
.cf-step-desc {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    margin-bottom: 36px;
}

/* === STEP 1：目的カード === */
.cf-purpose-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 36px;
}
.cf-purpose-card {
    cursor: pointer;
    position: relative;
}
.cf-purpose-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cf-purpose-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
}
.cf-purpose-card:hover .cf-purpose-card-inner {
    border-color: #1A3A5C;
    box-shadow: 0 4px 16px rgba(26, 58, 92, 0.1);
}
.cf-purpose-card--selected .cf-purpose-card-inner,
.cf-purpose-radio:checked ~ .cf-purpose-card-inner {
    border-color: #CC0000;
    background: #fff5f5;
    box-shadow: 0 4px 16px rgba(204, 0, 0, 0.12);
}
.cf-purpose-icon {
    font-size: 2rem;
    color: #1A3A5C;
    margin-bottom: 12px;
}
.cf-purpose-icon .material-symbols-outlined {
    font-size: 36px;
}
.cf-purpose-radio:checked ~ .cf-purpose-card-inner .cf-purpose-icon {
    color: #CC0000;
}
.cf-purpose-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.cf-purpose-note {
    font-size: 0.78rem;
    color: #999;
}

/* === ボタン === */
.cf-btn-wrap {
    text-align: center;
    margin-top: 24px;
}
.cf-btn {
    display: inline-block;
    padding: 14px 48px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.cf-btn--primary {
    background: #CC0000;
    color: #fff;
}
.cf-btn--primary:hover {
    background: #a80000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
}
.cf-btn-back {
    display: inline-block;
    background: none;
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 24px;
    font-family: inherit;
    transition: color 0.2s;
}
.cf-btn-back:hover {
    color: #333;
}

/* === STEP 2：分岐パネル === */
.cf-branch {
    display: none;
}
.cf-branch--active {
    display: block;
    animation: cfFadeIn 0.3s ease;
}

/* === その他の細分岐 === */
.cf-other-sub {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}
.cf-other-sub--active {
    display: block;
    animation: cfFadeIn 0.3s ease;
}

/* === お知らせボックス（協業・営業サブブランチ用） === */
.cf-notice-box {
    background: #f7f5f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.cf-notice-box a {
    color: #CC0000;
    text-decoration: underline;
}
.cf-notice-text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}
.cf-notice-text:last-child {
    margin-bottom: 0;
}

/* === フォーム部品（既存スタイル継承） === */
.contact-form-group {
    margin-bottom: 28px;
}
.contact-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.contact-form-label .required {
    display: inline-block;
    font-size: 0.7rem;
    color: #fff;
    background: #CC0000;
    padding: 1px 8px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: 500;
    vertical-align: middle;
}
.contact-form-label .optional {
    display: inline-block;
    font-size: 0.7rem;
    color: #888;
    background: #e5e5e5;
    padding: 1px 8px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: 500;
    vertical-align: middle;
}
.contact-form-input,
.contact-form-select,
.contact-form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.contact-form-input:focus,
.contact-form-select:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: #1A3A5C;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}
.contact-form-textarea {
    min-height: 200px;
    resize: vertical;
}
.contact-form-textarea--short {
    min-height: 100px;
}
.contact-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}
.contact-form-select--half {
    width: calc(50% - 8px);
}
.cf-input--error {
    border-color: #CC0000 !important;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1) !important;
}

/* === ラジオ・チェックボックスグループ === */
.cf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 4px;
}
.cf-radio-group--vertical {
    flex-direction: column;
    gap: 12px;
}
.cf-radio-group label,
.contact-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
}
.cf-radio-group input[type="radio"],
.contact-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1A3A5C;
}
.contact-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 4px;
}

/* === 日時選択 === */
.cf-datetime-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.cf-datetime-label {
    font-size: 0.82rem;
    color: #888;
    font-weight: 600;
    min-width: 52px;
    flex-shrink: 0;
}

/* === 注意事項・同意・送信 === */
.contact-notice {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 24px 28px;
    margin: 40px 0;
}
.contact-notice-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}
.contact-notice-list {
    padding-left: 1.2em;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.9;
}
.contact-notice-list li {
    margin-bottom: 4px;
}
.contact-privacy-agree {
    text-align: center;
    margin: 32px 0;
    font-size: 0.9rem;
    color: #444;
}
.contact-privacy-agree a {
    color: #CC0000;
    text-decoration: none;
}
.contact-privacy-agree a:hover {
    text-decoration: underline;
}
.contact-privacy-agree label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.contact-privacy-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1A3A5C;
}
.cf-submit-wrap {
    text-align: center;
    margin: 32px 0 0;
}
.contact-submit-btn {
    display: inline-block;
    padding: 16px 60px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #CC0000;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.contact-submit-btn:hover {
    background: #a80000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
}
.contact-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === 送信完了画面 === */
.cf-complete-inner {
    text-align: center;
    padding: 48px 24px;
}
.cf-complete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2E7D32;
    margin-bottom: 24px;
}
.cf-complete-icon .material-symbols-outlined {
    font-size: 40px;
}
.cf-complete-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}
.cf-complete-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 32px;
}
.cf-complete-timerex {
    margin-bottom: 32px;
}
.cf-complete-timerex-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: #CC0000;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
}
.cf-complete-timerex-btn:hover {
    background: #a80000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
}
.cf-complete-timerex-btn .material-symbols-outlined {
    font-size: 22px;
}
.cf-complete-timerex-note {
    font-size: 0.78rem;
    color: #999;
    margin-top: 12px;
}
.cf-complete-sub {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
}

/* === 無料相談バナー === */
.cf-consultation-banner {
    background: #f0f7ff;
    border: 1px solid #b8d4f0;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 32px;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
}
.cf-consultation-banner a {
    color: #CC0000;
    font-weight: 700;
    text-decoration: none;
}
.cf-consultation-banner a:hover {
    text-decoration: underline;
}

/* === 相談フロー（consultation用） === */
.cf-consultation-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
}
.cf-consultation-flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.cf-consultation-flow-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #CC0000;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}
.cf-consultation-flow-text {
    font-size: 0.78rem;
    color: #666;
    line-height: 1.5;
}
.cf-consultation-flow-arrow {
    font-size: 1.2rem;
    color: #ccc;
    margin: 0 8px;
    margin-bottom: 28px;
}

/* === セクション区切り（consultation用） === */
.cf-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e8e8e8;
}
.cf-section:last-of-type {
    border-bottom: none;
}
.cf-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1A3A5C;
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 3px solid #CC0000;
}

/* === カレンダー入力 === */
.contact-form-input--half {
    width: calc(50% - 6px);
}
input[type="date"].contact-form-input {
    min-height: 44px;
}

/* === レスポンシブ === */
@media (max-width: 768px) {
    .cf-purpose-cards {
        grid-template-columns: 1fr;
    }
    .cf-datetime-row {
        flex-wrap: wrap;
    }
    .contact-form-select--half,
    .contact-form-input--half {
        width: 100%;
    }
    .cf-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    .contact-checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    .cf-progress-label {
        font-size: 0.7rem;
    }
    .cf-progress-step {
        min-width: 60px;
    }
    .cf-consultation-flow {
        flex-direction: column;
        gap: 16px;
    }
    .cf-consultation-flow-arrow {
        transform: rotate(90deg);
        margin: 0;
        margin-bottom: 0;
    }
}

/* ========================================
   CF7 バリデーションエラー表示
   CF7が出力する .wpcf7-not-valid-tip 等を
   フォームデザインに合わせてスタイリング
======================================== */

/* フィールド個別エラーメッセージ */
.wpcf7-not-valid-tip {
    display: block;
    color: #CC0000;
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 500;
}

/* エラー状態のフィールド枠線 */
.wpcf7-not-valid {
    border-color: #CC0000 !important;
    box-shadow: 0 0 0 1px #CC0000 !important;
}

/* フォーム全体のレスポンスメッセージ */
.wpcf7-response-output {
    margin: 20px 0 0 !important;
    padding: 14px 20px !important;
    border-radius: 6px !important;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* バリデーションエラー（黄枠） */
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.unaccepted .wpcf7-response-output {
    border-color: #ffc107 !important;
    background: #fff3cd;
    color: #856404;
}

/* 送信成功（緑枠） */
.wpcf7-form.sent .wpcf7-response-output {
    border-color: #28a745 !important;
    background: #d4edda;
    color: #155724;
}

/* 送信失敗（赤枠） */
.wpcf7-form.failed .wpcf7-response-output {
    border-color: #CC0000 !important;
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   確認画面モーダル
======================================== */
.cf-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cf-confirm-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 36px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cf-confirm-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 24px;
    text-align: center;
}

.cf-confirm-body {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #333;
}

.cf-confirm-body dl {
    margin: 0;
    padding: 0;
}

.cf-confirm-body dt {
    font-weight: 700;
    color: #1A3A5C;
    margin-top: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

.cf-confirm-body dt:first-child {
    margin-top: 0;
}

.cf-confirm-body dd {
    margin: 8px 0 0 0;
    padding: 0;
    white-space: pre-wrap;
}

.cf-confirm-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.cf-confirm-btn {
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.cf-confirm-btn:active {
    transform: scale(0.97);
}

.cf-confirm-btn--back {
    background: #e0e0e0;
    color: #333;
}
.cf-confirm-btn--back:hover {
    background: #d0d0d0;
}

.cf-confirm-btn--submit {
    background: #CC0000;
    color: #fff;
}
.cf-confirm-btn--submit:hover {
    background: #a50000;
}

/* 完了画面の無料相談リンク */
.cf-complete-sub {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}
.cf-complete-sub a {
    color: #CC0000;
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .cf-confirm-modal {
        padding: 24px 16px;
    }
    .cf-confirm-actions {
        flex-direction: column;
    }
    .cf-confirm-btn {
        width: 100%;
        text-align: center;
    }
}
