/* =============================================================================
 * パスワードの設定(確認コード方式)— 2026-10-28 パスワード再設定の作り直し 第2段
 * 部品は components/member/PasswordResetFlow.tsx・OneTimeCodeField.tsx。main.pwr の下と .pwr- だけを飾る。
 * 入力欄・見出し・注意事項・ボタンは会員フォームの共通部品(forms.css の .fc-)をそのまま使う。
 * 【戻し方】app/(member)/layout.tsx のこのファイルの1行を消すと、部品は残るが飾りの無い素の表示になる。
 * ============================================================================= */

/* ── 全体の一言(回数の上限・通信の失敗)。白い区画の先頭 ── */
#main-content main.pwr p.pwr-form-error {
  margin: 0 0 16px;
  font-weight: 700;
}

/* ── 読み込み中 ── */
#main-content main.pwr p.pwr-loading {
  margin: 24px 0;
  font-size: 14px;
  text-align: center;
  color: var(--n-500, #666);
}

/* ── 知らせ(有効期限が切れた・もう一度)のすぐ下の見出し ── */
#main-content main.pwr .fc-notice + h2 {
  margin-top: 20px;
}

/* 段が変わったときに見出しへ移すのは読み上げのためだけなので、枠は出さない(申込の画面の flow.css と同じ作法。
   見出しは押せる部品ではなく、Tab では止まらない) */
#main-content main.pwr h2[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}

/* ── 送り先のメールアドレス(長いアドレスでも画面からはみ出さない。入りきらないときだけ途中で折る) ── */
#main-content main.pwr strong.pwr-email {
  margin: 0 0.2em;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ── 確認コードの欄: 大きな数字を、字の間をあけて(6桁を見比べやすく) ── */
#main-content main.pwr .pwr-code {
  margin-top: 8px;
}

#main-content main.pwr div.area .pwr-code input.pwr-code-input {
  display: block;
  width: 100%;
  max-width: 300px;
  height: 64px;
  /* 字の間は最後の字の後ろにも付くので、その分だけ左をあけて真ん中に見せる */
  padding: 0 12px 0 calc(12px + 0.4em);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 64px;
  letter-spacing: 0.4em;
  text-align: center;
  color: var(--c-slate, #273343);
  background: var(--n-0, #fff);
  border: 1px solid var(--n-300, #ccc);
  border-radius: 8px;
}

#main-content main.pwr div.area .pwr-code input.pwr-code-input:focus {
  border-color: var(--c-interaction, #00b19f);
  outline: 2px solid var(--c-interaction, #00b19f);
  outline-offset: 0;
}

#main-content main.pwr div.area .pwr-code input.pwr-code-input[aria-invalid="true"] {
  border-color: var(--c-error-ink, #d81b60);
}

#main-content main.pwr div.area .pwr-code input.pwr-code-input:disabled {
  color: var(--n-500, #666);
  background: var(--n-100, #f2f2f2);
}

/* ── 確認コードの段の、もう一度送る・入れ直す ── */
#main-content main.pwr .pwr-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
}

#main-content main.pwr .pwr-actions > .button {
  margin-top: 0;
}

/* 「もう一度送る」は戻る操作ではないので、.button.back の左向きの矢印(style.css)を出さない */
#main-content main.pwr .button.pwr-resend::after {
  display: none;
}

/* 文字だけのボタン(押せる大きさは 44px) */
#main-content main.pwr button.pwr-text-button {
  min-height: 44px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-interaction-ink, #00796b);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}

#main-content main.pwr .pwr-actions + .fc-consent {
  margin-top: 20px;
}

/* ── ログインに使う電話番号(見せるだけ)と、その下のパスワードの欄 ── */
#main-content main.pwr .pwr-account + input + .fc-pw,
#main-content main.pwr .pwr-account + .fc-pw {
  margin-top: 20px;
}

/* ── 二段階認証の確認コード(第3段・C4)。パスワードの欄の下 ── */
#main-content main.pwr .pwr-mfa {
  margin-top: 20px;
}

#main-content main.pwr .pwr-mfa button.pwr-text-button {
  margin-top: 4px;
  padding-left: 0;
}

/* ── ログイン画面に戻る ── */
#main-content main.pwr p.pwr-back-link {
  margin-top: 12px;
  text-align: center;
}

#main-content main.pwr p.pwr-back-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-interaction-ink, #00796b);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 完了: 短い文なので真ん中にそろえる(.center は style.css では一部の場所にしか効かない) ── */
#main-content main.pwr div.flow-complete p.center {
  text-align: center;
}
