@charset "UTF-8";

/*
 * スマホ向け改善 第4段: 申込の入力を助ける(C1・C2。2026-10-18)
 *
 *  - .flow-sticky … 入力画面の下に固定の「確認へ進む」(部品は components/member/FlowStickyBar.tsx)。
 *                   下のナビのすぐ上。元のボタンが見えているあいだと、画面のキーボードが出ているあいだは隠す
 *  - .flow-row / .flow-fix … 確認画面の行ごとの「修正」(lib/member/request-flow.tsx)
 *
 * 【下の固定の帯はスマホの幅(834px 以下)だけ】PC はスタッフの代理表示用なので、元のボタンだけのまま。
 * 「修正」は PC でも出す(押すと入力画面のその欄へ戻るだけ)。
 * 【自分の接頭辞(.flow-)の下だけを飾る】style.css には手を触れない。
 * 【戻し方】app/(member)/layout.tsx の /css/flow-mobile.css の1行を消すと、帯は出なくなり(下の display:none)、
 *   「修正」は飾りの無いボタンになる。
 */

.flow-sticky {
  display: none;
}

/* ── 確認画面の行ごとの「修正」 ───────────────────── */
.flow-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-row-value {
  flex: 1;
  min-width: 0;
}
.flow-fix {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-interaction-ink, #00796b);
  cursor: pointer;
  background: #fff;
  border: 1.5px solid #bfe3dd;
  border-radius: 999px;
}
.flow-fix:hover {
  background: #eef6f5;
}

@media screen and (max-width: 834px) {
  /* ── 下に固定の「確認へ進む」 ───────────────────── */
  .flow-sticky {
    position: fixed;
    right: 0;
    /* 下のナビ(高さ 58px + 上の線 1px)のすぐ上 */
    bottom: calc(59px + env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 850;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #e3e8ef;
    box-shadow: 0 -8px 24px -18px rgba(39, 51, 67, 0.55);
    visibility: hidden;
    transform: translateY(calc(100% + 60px));
    transition:
      transform 0.2s ease,
      visibility 0.2s;
  }
  .flow-sticky.is-shown {
    visibility: visible;
    transform: none;
  }
  /* ナビが無い画面(ログイン前など)では、画面の下端に */
  body:not(:has(.mtab)) .flow-sticky {
    bottom: 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  /* 帯が出ているあいだは、欄へ運ぶとき(入力の誤り・「修正」)に帯とナビの両方の上へ運ぶ
     (ナビ 59px + 帯 69px + 同意の文字の高さ。mobile-nav.css の 170px と同じ考え方) */
  html:has(.flow-sticky.is-shown) {
    scroll-padding-bottom: calc(240px + env(safe-area-inset-bottom, 0px));
  }

  .flow-sticky-sum {
    display: flex;
    flex: none;
    flex-direction: column;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: #5f6b7a;
  }
  .flow-sticky-sum b {
    font-size: 13px;
    font-weight: 700;
    color: #273343;
    white-space: nowrap;
  }
  /* 金額の数字(各画面の <span class="pink bold">)は大きく、読める濃さで */
  .flow-sticky-sum b span {
    font-family: "Roboto", sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #273343;
  }

  .flow-sticky-btn {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: #fff;
    cursor: pointer;
    background: var(--c-primary, #00796b);
    border: 0;
    border-radius: 14px;
  }
  .flow-sticky-btn:disabled {
    cursor: not-allowed;
    background: #9aa4b2;
  }
  .flow-sticky-btn svg {
    flex: none;
    width: 18px;
    height: 18px;
  }

  /* 画面のキーボードが出ているあいだは隠す(下のナビと同じ。kb-open は lib/member/keyboard.ts が付ける) */
  html.kb-open .flow-sticky {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-sticky {
    transition: none;
  }
}
