/* ==========================================================
   quick_pricing.css
   買取相場シュミレーター CTA セクション
   ========================================================== */

/* ---------- セクション外枠 ---------- */
.section.quick-pricing {
    width: 100%;
    background: #fff;            /* 左右の余白は白 */
    padding: 0;
}

/* ---------- 内側コンテナ（1140px・背景画像） ---------- */
.quick-pricing__inner {
    position: relative;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px;
    background-image: url('../images/quick-pricing/bg.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;

    /* 中身を縦並び・中央寄せ */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 背景ダークオーバーレイ */
.quick-pricing__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.45);
    z-index: 0;
}

/* ---------- 見出しテキスト ---------- */
.quick-pricing__heading {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
    margin-bottom: 16px;
}

.quick-pricing__heading-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 14px;
    line-height: 1.3;
}

.quick-pricing__heading-sub {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.8;
    margin: 0;
    opacity: 0.95;
}

/* ---------- CTA（バッジ＋カード） ---------- */
.quick-pricing-cta {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
}

/* ---------- 赤バッジ「今、いくらで売れる？」（吹き出し） ---------- */
.quick-pricing-cta__badge {
    position: relative;
    z-index: 2;
    display: block;
    width: fit-content;
    margin: 0 auto 14px;
    padding: 10px 28px;
    background: #d0021b;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 9999px;      /* 完全なピル型 */
    line-height: 1;
    white-space: nowrap;
}

/* 下向きの三角（吹き出しのしっぽ） */
.quick-pricing-cta__badge::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #d0021b;
}

/* ---------- 白カード ---------- */
.quick-pricing-cta__card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    text-align: center;
}

/* キャッチコピー */
.quick-pricing-cta__copy {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 26px;
    line-height: 1.5;
}

.quick-pricing-cta__copy em {
    color: #d0021b;
    font-style: normal;
    font-weight: 700;
}

/* ---------- セレクト風トリガーボタン ---------- */
.quick-pricing-cta__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 22px;
    background: #fff;
    border: 2px solid #d0021b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    font-family: inherit;
    transition: background 0.15s;
    text-align: left;
    line-height: 1.4;
}

.quick-pricing-cta__trigger:hover,
.quick-pricing-cta__trigger:focus-visible {
    background: #fff5f5;
    outline: none;
}

.quick-pricing-cta__trigger-text {
    flex: 1;
}

/* シェブロン（∨） */
.quick-pricing-cta__trigger-icon {
    flex-shrink: 0;
    margin-left: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-pricing-cta__trigger-icon svg {
    width: 16px;
    height: 16px;
    stroke: #1a1a1a;
    stroke-width: 2.5;
    fill: none;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 768px) {
    .quick-pricing__inner {
        padding: 20px;
    }

    .quick-pricing__heading-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .quick-pricing__inner {
        padding: 44px 16px;
    }

    .quick-pricing__heading-title {
        font-size: 1.2rem;
    }

    .quick-pricing-cta__card {
        padding: 28px 20px 32px;
    }

    .quick-pricing-cta__copy {
        font-size: 1.1rem;
    }

    .quick-pricing-cta__copy em {
        display: block;
    }

    .quick-pricing-cta__badge {
        font-size: 0.85rem;
        padding: 9px 22px;
    }
}

/* ==========================================================
   モーダル: パネル共通
   ========================================================== */

/* パネル共通の内側余白（全モーダル共通） */
.quick_pricing_modal__panel {
    padding: 48px 48px 52px;
}

/* ==========================================================
   モーダル: 入口選択パネル（quick-pricing-modal-chose）
   ========================================================== */

/* リード文 */
.qp-chose__lead {
    margin: 0 0 24px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* 2択グリッド */
.qp-chose__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 入口カード */
.qp-chose__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 32px 24px 40px;
    background: #fff;
    border: 2px solid #e3e3e3;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.qp-chose__card:hover,
.qp-chose__card:focus-visible {
    border-color: #d0021b;
    box-shadow: 0 6px 20px rgba(208, 2, 27, 0.15);
    transform: translateY(-2px);
    outline: none;
}

/* アイコン円 */
.qp-chose__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fdeaec;
    transition: background 0.18s;
}

.qp-chose__card:hover .qp-chose__icon,
.qp-chose__card:focus-visible .qp-chose__icon {
    background: #d0021b;
}

.qp-chose__icon svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: #d0021b;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.18s;
}

.qp-chose__card:hover .qp-chose__icon svg,
.qp-chose__card:focus-visible .qp-chose__icon svg {
    stroke: #fff;
}

/* タイトル */
.qp-chose__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
}

/* 補足説明 */
.qp-chose__desc {
    font-size: 0.85rem;
    font-weight: 400;
    color: #777;
    line-height: 1.5;
}

/* 右下の矢印 */
.qp-chose__arrow {
    position: absolute;
    right: 16px;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d0021b;
    transition: transform 0.18s;
}

.qp-chose__card:hover .qp-chose__arrow {
    transform: translateX(3px);
}

.qp-chose__arrow svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* レスポンシブ：縦積み */
@media (max-width: 560px) {
    .qp-chose__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .qp-chose__card {
        padding: 24px 20px 32px;
    }

    .qp-chose__icon {
        width: 60px;
        height: 60px;
    }

    .qp-chose__icon svg {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================
   モーダル: コンテナの縦スクロール
   ========================================================== */
.modal--SelectCar202601 .modal-container {
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================
   モーダル: 共通タイトル
   （メーカー / 車種 / グレード / 型式入力 で共用）
   ========================================================== */
.qp-panel__title {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
}

/* ==========================================================
   モーダル: 型式指定・類別区分 入力フォーム
   ========================================================== */
.qp-katashiki {
    max-width: 480px;
    margin: 0 auto;
}

.qp-katashiki__field {
    margin-bottom: 20px;
}

.qp-katashiki__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

/* 入力欄 */
.qp-input {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.qp-input::placeholder {
    color: #bbb;
}

.qp-input:focus {
    border-color: #d0021b;
    box-shadow: 0 0 0 3px rgba(208, 2, 27, 0.12);
    outline: none;
}

/* 検索ボタン（赤） */
.qp-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 15px 24px;
    background: #d0021b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.qp-btn:hover,
.qp-btn:focus-visible {
    background: #b00217;
    outline: none;
}

.qp-btn:active {
    transform: translateY(1px);
}

/* 検索結果の差し込み先 */
.qp-katashiki__result {
    margin-top: 20px;
}

.qp-katashiki__result:empty {
    margin-top: 0;
}

/* ==========================================================
   モーダル: 詳細入力フォーム（quick-pricing-modal-car-form）
   ========================================================== */
.qp-devform {
    max-width: 720px;
    margin: 0 auto;
}

/* 入力欄を横2列のグリッドに */
.qp-devform__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

/* 1項目（ラベル＋入力欄）の縦組み */
.qp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qp-field:nth-child(1),
.qp-field:nth-child(2),
.qp-field:nth-child(3),
.qp-field:nth-child(4),
.qp-field:nth-child(5),
.qp-field:nth-child(6) {
    display: none;
}

/* 1列ぶち抜き（ボディカラーなど） */
.qp-field--full {
    grid-column: 1 / -1;
}

.qp-devform label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}

.qp-devform .c-list-form__input,
.qp-devform select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

.qp-devform .c-list-form__input:focus,
.qp-devform select:focus {
    border-color: #d0021b;
    outline: none;
}

.qp-devform button[type="submit"] {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 15px 24px;
    background: #d0021b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s;
}

.qp-devform button[type="submit"]:hover {
    background: #b00217;
}

/* スマホでは1列に */
@media (max-width: 560px) {
    .qp-devform__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   モーダル: グレード選択リスト
   （JS が #...-selector-root に <ul><li class="btn-transition"> を生成）
   ========================================================== */
#quick-pricing-modal-car-grade-selector-root ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

#quick-pricing-modal-car-grade-selector-root li.btn-transition {
    position: relative;
    padding: 14px 38px 14px 18px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    line-height: 1.45;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* 右端の矢印（>） */
#quick-pricing-modal-car-grade-selector-root li.btn-transition::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #d0021b;
    border-right: 2px solid #d0021b;
    transform: translateY(-50%) rotate(45deg);
    transition: right 0.15s;
}

#quick-pricing-modal-car-grade-selector-root li.btn-transition:hover {
    background: #fdeaec;
    border-color: #d0021b;
    box-shadow: 0 2px 8px rgba(208, 2, 27, 0.12);
}

#quick-pricing-modal-car-grade-selector-root li.btn-transition:hover::after {
    right: 13px;
}

/* レスポンシブ：1カラム */
@media (max-width: 560px) {
    #quick-pricing-modal-car-grade-selector-root ul {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   モーダル: 型式選択リスト
   （JS が #...-katashiki-selector-root に <a class="btn-transition"> を生成）
   ========================================================== */
#quick-pricing-modal-katashiki-selector-root,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

/* JS出力の <br> は無効化（gapで間隔を取る） */
#quick-pricing-modal-katashiki-selector-root br,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root br {
    display: none;
}

#quick-pricing-modal-katashiki-selector-root a.btn-transition,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root a.btn-transition {
    position: relative;
    display: block;
    padding: 14px 40px 14px 18px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* 右端の矢印（>） */
#quick-pricing-modal-katashiki-selector-root a.btn-transition::after,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root a.btn-transition::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #d0021b;
    border-right: 2px solid #d0021b;
    transform: translateY(-50%) rotate(45deg);
    transition: right 0.15s;
}

#quick-pricing-modal-katashiki-selector-root a.btn-transition:hover,
#quick-pricing-modal-katashiki-selector-root a.btn-transition.selected,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root a.btn-transition:hover,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root a.btn-transition.selected {
    background: #fdeaec;
    border-color: #d0021b;
    box-shadow: 0 2px 8px rgba(208, 2, 27, 0.12);
}

#quick-pricing-modal-katashiki-selector-root a.btn-transition:hover::after,
#quick-pricing-modal-katashiki-selector-root a.btn-transition.selected::after,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root a.btn-transition:hover::after,
#quick-pricing-modal-katashiki-ruibetsu-search-result-root a.btn-transition.selected::after {
    right: 13px;
}

/* ==========================================================
   モーダル: 型式リスト 1件の2行レイアウト
   （JS の qpBuildKatashikiItemHtml が生成）
   ========================================================== */
.qp-spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qp-spec__main {
    font-size: 0.98rem;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
}

.qp-spec__main b {
    font-weight: 700;
}

.qp-spec__meta {
    font-size: 0.82rem;
    color: #777;
    line-height: 1.4;
}

/* ==========================================================
   買取シミュレーション 結果画面（#chart-section / .qp-result）
   ========================================================== */
.qp-result {
    padding: 0 0 80px;
}

/* ---------- ヒーロー（背景画像） ---------- */
.qp-result__hero {
    position: relative;
    padding: 64px 16px 0;
}

/* 背景画像は上部のみ。カードがこの下端をまたいで白背景へはみ出す */
.qp-result__hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* カード下半分がはみ出すよう、背景の高さを内側より低く設定 */
    bottom: 150px;
    background-image: url('../images/quick-pricing/bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* 背景画像上のダークオーバーレイ */
.qp-result__hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 150px;
    background: rgba(20, 20, 20, 0.45);
    z-index: 0;
}

.qp-result__hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
}

.qp-result__hero-head {
    text-align: center;
    color: #fff;
    margin-bottom: 32px;
}

.qp-result__hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
    line-height: 1.3;
}

.qp-result__hero-sub {
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
}

/* ---------- 価格カード ---------- */
.qp-result__price {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.qp-result__price-badge {
    position: relative;
    z-index: 2;
    display: block;
    width: fit-content;
    /* カード上端に食い込ませて重ねる */
    margin: 0 auto -19px;
    padding: 11px 36px;
    background: #d0021b;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 9999px;
    line-height: 1;
    white-space: nowrap;
}

.qp-result__price-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    background: #fff;
    border: 3px solid #d0021b;
    border-radius: 16px;
    padding: 32px 36px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

.qp-result__price-photo {
    flex-shrink: 0;
    width: 300px;
}

.qp-result__price-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.qp-result__price-body {
    flex: 1;
    min-width: 0;
}

.qp-result__price-caption {
    background: #f0f0f0;
    color: #333;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    padding: 6px;
    border-radius: 4px;
    margin-bottom: 14px;
}

/* 価格1行（タグ＋金額） */
.qp-result__price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.qp-result__price-row:last-child {
    border-bottom: none;
}

/* 左の吹き出しタグ（下向き三角つき） */
.qp-result__price-tag {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 32px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 4px;
}

.qp-result__price-tag::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid currentColor;
}

/* 金額 */
.qp-result__price-value {
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.qp-result__price-unit {
    font-size: 0.95rem;
    font-weight: 700;
    margin-left: 4px;
}

/* 現在（最も濃く・大きく） */
.qp-result__price-row--now .qp-result__price-tag { background: #d0021b; color: #fff; }
.qp-result__price-row--now .qp-result__price-tag::after { border-top-color: #d0021b; }
.qp-result__price-row--now .qp-result__price-value { color: #d0021b; font-size: 2.4rem; }
.qp-result__price-row--now .qp-result__price-unit { color: #d0021b; }

/* 2年後（中） */
.qp-result__price-row--2y .qp-result__price-tag { background: #e0556a; }
.qp-result__price-row--2y .qp-result__price-tag::after { border-top-color: #e0556a; }
.qp-result__price-row--2y .qp-result__price-value { color: #d0021b; font-size: 1.7rem; }

/* 3年後（淡） */
.qp-result__price-row--3y .qp-result__price-tag { background: #eda4af; }
.qp-result__price-row--3y .qp-result__price-tag::after { border-top-color: #eda4af; }
.qp-result__price-row--3y .qp-result__price-value { color: #eda4af; font-size: 1.5rem; }

/* ---------- セクション共通 ---------- */
.qp-result__section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    margin-top: 56px;
}

.qp-result__heading {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 32px;
}

/* ---------- 車両情報テーブル ---------- */
.qp-result__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
    align-items: start;
}

.qp-result__table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e6e6e6;
}

.qp-result__table th,
.qp-result__table td {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

.qp-result__table tr:last-child th,
.qp-result__table tr:last-child td {
    border-bottom: none;
}

.qp-result__table th {
    width: 42%;
    font-weight: 700;
    color: #333;
    background: #f7f7f7;
}

.qp-result__table td {
    color: #555;
    background: #fff;
}

/* ---------- グラフ ---------- */
.qp-result__chart {
    position: relative;
    width: 100%;
    /* canvasの高さ確保 */
    height: 420px;
}

.qp-result__chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 768px) {
    .qp-result__price-card {
        flex-direction: column;
        gap: 20px;
        padding: 24px 20px;
    }

    .qp-result__price-photo {
        width: 100%;
        max-width: 320px;
    }

    .qp-result__price-body {
        width: 100%;
    }

    .qp-result__hero-title {
        font-size: 1.4rem;
    }

    .qp-result__price-row--now .qp-result__price-value {
        font-size: 2rem;
    }

    .qp-result__info {
        grid-template-columns: 1fr;
    }

    .qp-result__heading {
        font-size: 1.35rem;
    }

    .qp-result__chart {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .qp-result__price-badge {
        font-size: 0.85rem;
        padding: 9px 20px;
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
}

.quick-pricing-form-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-pricing-form-group span {
    font-size: 14px;
    white-space: nowrap;
}
