@charset "UTF-8";
/**
 * 交通事故治療 診断フォーム (sen-ltd/iput-management#94)
 * Figma: 事故治療ナビ「202607-3(診断フォーム)」 node-id=9767-15581
 *
 * PC は 1 行 5 枚の結果カード、SP は縦積み。
 * ステップの表示切り替えは js/shindan-form.js が .is-active を付け替える。
 */

.p-shindan {
    /* 親 (.p-clinic-fv) が align-items:center の flex なので、
       指定しないと内容幅まで縮んでデザインより細くなる */
    width: 100%;
    margin: 16px 0 24px;
    font-family: "Noto Sans JP", sans-serif;
}

/* ---------- ステップの箱 ---------- */

.p-shindan__step {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border: 2px solid #666;
    border-radius: 5px;
    background: #fbf9f7;
}

.p-shindan__step.is-active {
    display: flex;
}

/* エリア以降のステップは寒色寄りの背景 (Figma 準拠) */
.p-shindan__step[data-step="q5"],
.p-shindan__step[data-step="q6"],
.p-shindan__step[data-step="q7"],
.p-shindan__step[data-step="result"] {
    background: #f7fbf7;
}

.p-shindan__catch {
    margin: 0;
    color: #ff8601;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}

/* 折り返しは句の切れ目だけに限定する (語中で「1分でわか/る！」と切れるのを防ぐ) */
.p-shindan__catch span {
    display: inline-block;
}

/* 質問文は Figma より4px大きくする（先方要望 2026-07-31） */
.p-shindan__q {
    margin: 0;
    padding: 0;
    border: 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}

/* 予約フォームの見出しはオレンジ (Figma 9767-15988) */
.p-shindan__q--accent {
    color: #ff8601;
}

/* ---------- 選択肢 ---------- */

.p-shindan__choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 24px;
    margin: 0;
    padding: 0 12px;
    list-style: none;
}

/* 質問4は選択肢が長文のため、PCでも縦並び・左寄せにする (Figma 9769-17754) */
.p-shindan__choices--column {
    flex-direction: column;
    align-items: flex-start;
}

.p-shindan__choice {
    margin: 0;
    padding: 0;
    list-style: none;
}

.p-shindan__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.p-shindan__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #000;
    font-size: 16px;
    line-height: 1.4;
    cursor: pointer;
}

.p-shindan__label::before {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #666;
    border-radius: 100px;
    background: #fff;
    box-sizing: border-box;
}

.p-shindan__input:checked + .p-shindan__label::before {
    border-color: #ff8601;
    background:
        radial-gradient(circle at 50% 50%, #ff8601 0, #ff8601 5px, transparent 5px);
}

.p-shindan__input:focus-visible + .p-shindan__label::before {
    outline: 2px solid #ff8601;
    outline-offset: 2px;
}

/* ---------- セレクト / 入力欄 ---------- */

.p-shindan__selects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.p-shindan__select,
.p-shindan__text {
    padding: 8px 18px;
    border: 1px solid #666;
    border-radius: 100px;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
}

.p-shindan__select:disabled {
    color: #999;
    background: #f2f2f2;
}

.p-shindan__fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 624px;
}

/* PC はラベル左列・入力右列の横並び (Figma 9767-15987)。SP は縦積みに戻す。 */
.p-shindan__field {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 4px 23px;
}

/* Figma のラベル列は 138px だが「メールアドレス*必須」が折り返すため 150px に広げる */
.p-shindan__field-label {
    color: #000;
    font-size: 16px;
    white-space: nowrap;
}

/* エラー文は入力欄の下（右列）に出す */
.p-shindan__field [data-error-for] {
    grid-column: 2;
    text-align: left;
}

.p-shindan__field-label .is-required {
    margin-left: 2px;
    color: #dc2a2a;
    font-size: 10px;
    font-weight: 700;
}

.p-shindan__text {
    width: 100%;
}

.p-shindan__text::placeholder {
    color: #666;
}

/* ---------- ボタン ---------- */

.p-shindan__next {
    padding: 12px 52px;
    border: 2px solid rgba(250, 162, 104, .72);
    border-radius: 50px;
    background: #fff7ee;
    box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
    color: #333;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.p-shindan__next:hover {
    background: #ffefdd;
}

.p-shindan__back {
    padding: 0;
    border: 0;
    background: none;
    color: #000;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.p-shindan__submit {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 12px 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(to top, #ff4000 37.5%, rgba(255, 81, 0, .6));
    box-shadow: 0 2px 0 #bbb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.p-shindan__submit-ico {
    display: block;
    width: 12px;
    height: 12px;
}

.p-shindan__submit:disabled {
    opacity: .6;
    cursor: default;
}

.p-shindan__privacy {
    margin: 0;
    padding: 8px 24px;
    border-radius: 10px;
    background: #eee;
    color: #000;
    font-size: 12px;
    text-align: center;
    line-height: 1.6;
}

.p-shindan__error {
    margin: 0;
    color: #dc2a2a;
    font-size: 13px;
    text-align: center;
}

.p-shindan__reserve-clinic {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* ---------- バナー ---------- */

/* 本文パネルは Figma からの書き出し画像 (images/shindan/banner-a.png / banner-b.png)。
   PC は [画像] と [電話/LINEボタン] の横2カラム、SP は縦積み。
   幅の比率はデザイン (パネル414px : ボタン293px / 全体714px) に合わせる。 */

.p-shindan__banner {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    gap: 12px;
}

.p-shindan__banner-frame {
    display: flex;
    align-items: center;
    width: 100%;
    border: 3px solid #0584dc;
    background: #fffeed;
    box-sizing: border-box;
}

.p-shindan__banner-img {
    display: block;
    flex: none;
    width: 58%;
    height: auto;
}

/* --- 電話 / LINE ボタン (tmp/cta-soudan.php を流用) --- */

.p-shindan__banner-cta {
    display: flex;
    flex: none;
    align-items: center;
    width: 42%;
    padding: 6px;
    box-sizing: border-box;
}

/* cta-soudan は PC 既定が横並び。バナーは細い縦カラムなので縦積みに戻す
   (地域記事カード・都道府県ページと同じ扱い) */
.p-shindan__banner-cta .c-cta {
    max-width: none;
}

.p-shindan__banner-cta .c-cta__btns {
    flex-direction: column;
    padding: 0;
}

.p-shindan__banner-cta .c-cta__btn {
    flex: none;
}

/* ---------- 結果 ---------- */

.p-shindan__result-head {
    margin: 0;
    padding: 0;
    border: 0;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.p-shindan__gift {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.p-shindan__gift-deco {
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.p-shindan__gift-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.p-shindan__gift-lead {
    color: #dc2a2a;
    font-size: 16px;
    font-weight: 600;
}

.p-shindan__gift-amount {
    white-space: nowrap;
}

.p-shindan__gift-amount .is-pre {
    color: #333;
    font-size: 20px;
}

.p-shindan__gift-amount .is-yen {
    color: #dc2a2a;
    font-size: 27px;
    font-weight: 700;
}

.p-shindan__gift-amount .is-suf {
    color: #333;
    font-size: 19px;
}

.p-shindan__gift-note {
    color: #333;
    font-size: 12px;
}

.p-shindan__results {
    width: 100%;
}

.p-shindan__loading,
.p-shindan__empty {
    margin: 0;
    padding: 16px 0;
    color: #333;
    font-size: 14px;
    text-align: center;
    line-height: 1.7;
}

/* Figma は 153px のカードを5枚横並び(672px想定)。地域記事のFV枠は実際には
   これより狭いため、収まらない場合は折り返して1枚あたりの幅を確保する。 */
.p-shindan__cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 3px 0;
    list-style: none;
}

/* 常に5列分の幅で固定する。伸ばす指定にすると、該当院が5件未満のときに
   残り幅を分け合って1枚が異常に大きくなる。gap は 10px × 4 で 40px。
   枠が狭くて 140px を割る場合は min-width が効いて折り返す。 */
.p-shindan__card {
    display: flex;
    flex: 0 1 calc((100% - 40px) / 5);
    min-width: 140px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid #faa268;
    border-radius: 5px;
    background: #fff;
    list-style: none;
    box-sizing: border-box;
}

/* PC は写真→院名→区切り線→アクセス の縦積み (9769-17983) */
.p-shindan__card-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.p-shindan__card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.p-shindan__card-photo {
    width: 100%;
    aspect-ratio: 130 / 84;
    overflow: hidden;
}

.p-shindan__card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-shindan__card-name {
    width: 100%;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.p-shindan__card-station {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    color: #000;
    font-size: 14px;
    line-height: 1.4;
}

.p-shindan__card-station-ico {
    flex-shrink: 0;
    width: 14px;
    height: 17px;
}

.p-shindan__card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.p-shindan__card-reserve,
.p-shindan__card-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 6px 20px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
}

.p-shindan__card-reserve {
    background: linear-gradient(to top, #ff4000 37.5%, rgba(255, 81, 0, .6));
    box-shadow: 0 2px 0 #bbb;
}

.p-shindan__card-detail {
    background: #36c7af;
    box-shadow: 0 2px 0 #bbb;
}

.p-shindan__card-btn-ico,
.p-shindan__card-btn-arrow,
.p-shindan__card-btn-send {
    display: block;
    flex-shrink: 0;
}

.p-shindan__card-btn-send {
    display: none;
}

.p-shindan__card-detail:hover,
.p-shindan__card-reserve:hover {
    opacity: .85;
}

/* ---------- 結果画面の相談CTA (9814-27422 / 9814-27429) ---------- */

/* デザインは白いカードの中にリード2行＋ボタン2つ。カード幅は枠の約93% (624/672)。 */
.p-shindan__soudan {
    width: 100%;
    max-width: 624px;
    margin: 0 auto;
    padding: 12px 4px;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.p-shindan__soudan-lead {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin: 0 0 10px;
}

.p-shindan__soudan-lead-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.p-shindan__soudan-lead-top {
    color: #dc2a2a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.p-shindan__soudan-lead-main {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}

.p-shindan__soudan-deco {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

/* 左側は同じ「／」を反転して「＼」にする (Figma も同一グリフの反転) */
.p-shindan__soudan-deco.is-left {
    transform: scaleX(-1);
}

/* ボタンは304px×2の横並び。cta-soudan の PC 既定(最大728px)より狭い。 */
.p-shindan__soudan .c-cta {
    max-width: 616px;
}

.p-shindan__soudan .c-cta__btns {
    gap: 8px;
}

/* ---------- 送信後 ---------- */

.p-shindan__done-head {
    margin: 0;
    padding: 0;
    border: 0;
    color: #ff8601;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.p-shindan__done-text {
    margin: 0;
    color: #333;
    font-size: 14px;
    text-align: center;
    line-height: 1.7;
}

/* ボタンは Figma からの書き出し画像 (9769-18358 / 9770-18434) */
.p-shindan__done-line {
    display: block;
    width: 100%;
    max-width: 375px;
    line-height: 0;
    text-decoration: none;
}

.p-shindan__done-line-img {
    display: block;
    width: 100%;
    height: auto;
}

.p-shindan__done-line-img.is-sp {
    display: none;
}

/* ---------- SP ---------- */

@media (max-width: 767px) {
    .p-shindan__step {
        gap: 18px;
        padding: 24px 16px 12px;
    }

    .p-shindan__catch {
        font-size: 16px;
    }

    .p-shindan__label,
    .p-shindan__select,
    .p-shindan__text,
    .p-shindan__field-label {
        font-size: 14px;
    }

    /* 質問文だけ4px大きくする（先方要望 2026-07-31） */
    .p-shindan__q {
        font-size: 18px;
    }

    /* SP の選択肢は質問によって並びが違う。
       質問4 (9787-21551) と質問7 (9807-22840) は左寄せの縦並び。 */
    .p-shindan__choices {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }

    /* 質問1〜3 は選択肢が短いため SP でも中央寄せの横並び（折り返し）。
       (9770-18442 / 9770-18465 / 9770-18707)
       列間隔28pxで、デザインと同じ折り返し（質問1は3+2 / 質問2は3+3 / 質問3は2+2）になる。
       16pxだと質問1に4個入って 4+1 になってしまう。 */
    .p-shindan__step[data-step="q1"] .p-shindan__choices,
    .p-shindan__step[data-step="q2"] .p-shindan__choices,
    .p-shindan__step[data-step="q3"] .p-shindan__choices {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 12px 28px;
    }

    .p-shindan__selects {
        flex-direction: column;
    }

    .p-shindan__select {
        width: 100%;
    }

    /* SP はラベルと入力欄を縦積みにする (Figma 9770-18406) */
    .p-shindan__field {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .p-shindan__field [data-error-for] {
        grid-column: 1;
    }

    .p-shindan__result-head {
        font-size: 18px;
    }

    /* SPは枠が331pxとデザイン(351px)より狭く「お見舞金最大¥20,000贈呈」が
       3px はみ出して折り返すため、比率を保ったまま約6%縮める (9814-27266) */
    .p-shindan__gift-lead {
        font-size: 15px;
    }

    .p-shindan__gift-amount .is-pre {
        font-size: 18px;
    }

    .p-shindan__gift-amount .is-yen {
        font-size: 25px;
    }

    .p-shindan__gift-amount .is-suf {
        font-size: 17px;
    }

    .p-shindan__gift-note {
        font-size: 11px;
    }

    .p-shindan__gift-deco {
        font-size: 20px;
    }

    .p-shindan__done-line-img.is-pc {
        display: none;
    }

    .p-shindan__done-line-img.is-sp {
        display: block;
    }

    .p-shindan__soudan-lead-top {
        font-size: 15px;
    }

    .p-shindan__soudan-lead-main {
        font-size: 13px;
    }

    .p-shindan__soudan-deco {
        font-size: 18px;
    }

    /* SP のカードは PC と構造が違う (Figma 9814-27277):
       写真(85x55)と院名・アクセスが横並び → 区切り線 → ボタン2つ横並び。
       PC の flex:1 1 0 のままだと縦並びで flex-basis:0 が高さに効き潰れるため戻す。 */
    .p-shindan__cards {
        flex-direction: column;
        gap: 12px;
    }

    .p-shindan__card {
        flex: 0 0 auto;
        min-width: 0;
        gap: 8px;
        padding: 8px 10px;
    }

    .p-shindan__card-info {
        flex-direction: row;
        align-items: center;
        gap: 7px;
    }

    .p-shindan__card-photo {
        flex: none;
        width: 85px;
        aspect-ratio: 85 / 55;
    }

    .p-shindan__card-text {
        gap: 4px;
        padding: 0 5px;
    }

    /* SP の区切り線は院名の下ではなくボタンの上 */
    .p-shindan__card-name {
        padding-bottom: 0;
        border-bottom: 0;
        font-size: 14px;
    }

    .p-shindan__card-station {
        font-size: 12px;
    }

    .p-shindan__card-actions {
        flex-direction: row;
        gap: 7px;
        padding-top: 8px;
        border-top: 1px solid #ddd;
    }

    .p-shindan__card-reserve,
    .p-shindan__card-detail {
        flex: 1 1 0;
        min-width: 0;
        padding: 6px 12px;
    }

    /* SP の「予約する」はアイコン＋矢印ではなく送信アイコンのみ (9770-18825) */
    .p-shindan__card-reserve .is-pc {
        display: none;
    }

    .p-shindan__card-btn-send {
        display: block;
    }

    /* SP は画像とボタンを縦積みにする (Figma 9787-21447 / 9787-21670) */
    .p-shindan__banner-frame {
        flex-direction: column;
    }

    .p-shindan__banner-img {
        width: 100%;
    }

    .p-shindan__banner-cta {
        width: 100%;
        padding: 8px 6px;
    }
}
