/*
 * 南部信用組合 個人ローンページのローンシミュレータ用スタイル。
 * - style_2023.css の後に読み込む（このページ限定）。
 * - 既存のデザイン体系に合わせ、緑 #04a458 / 文字 #505050 / 見出し橙 #f08200 を基調とする。
 */

/* ============================================================
   シミュレータへの遷移リンク（商品一覧の上部）
   ============================================================ */
.bl_loanSimJump {
  text-align: center;
  margin: 0 0 64px;
}
.bl_loanSimJump_a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background-color: #04a458;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.25rem;
  padding: 14px 32px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: opacity 0.2s ease;
}
.bl_loanSimJump_a:hover {
  opacity: 0.85;
}
.bl_loanSimJump_a .fa {
  font-size: 0.9em;
}

/* ============================================================
   シミュレータ見出し
   ============================================================ */
.bl_cmnHeadline_subline.bl_cmnHeadline_subline__loansimulater {
  text-transform: capitalize;
}

/* ============================================================
   シミュレータ本体
   ============================================================ */
.ly_cmnConts_wrapper__simulator {
  background-color: #fafafa;
  scroll-margin-top: 20px;
}

.bl_loanSim {
  max-width: 760px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 40px;
  color: #505050;
}
@media screen and (max-width: 960px) {
  .bl_loanSim {
    padding: 24px 16px;
  }
}

.bl_loanSim_note {
  font-size: 93%;
  line-height: 1.7;
  margin: 0 0 28px;
}

/* ----- 入力項目（見出し＋入力欄を1行に、解説は横並び→必要なら下へ折返し） ----- */
/* .bl_loanSim_table は結果テーブルで使用するため維持 */
.bl_loanSim_table {
  width: 100%;
  border-collapse: collapse;
}

.bl_loanSim_field {
  margin-bottom: 20px;
}
.bl_loanSim_field_row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 14px;
  row-gap: 6px;
}
/* 見出し＋入力欄は離さない・縮めない（1つのまとまり） */
.bl_loanSim_field_main {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  column-gap: 12px;
}
/* 見出し列：固定幅で全項目をそろえる */
.bl_loanSim_field_label {
  flex: 0 0 11em;
  font-weight: bold;
  border-left: 4px solid #04a458;
  padding-left: 10px;
}
/* 解説：入力欄の横に置き、残り幅が足りなければ下へ全幅で折り返す */
.bl_loanSim_field_desc {
  flex: 1 1 14em;
  min-width: 12em;
  color: #777;
  font-size: 88%;
  line-height: 1.6;
}

.bl_loanSim_input {
  font-size: 100%;
  color: #505050;
  background-color: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  padding: 10px 12px;
}
/* 数値欄の幅をそろえて入力列を整える */
.bl_loanSim_input__number {
  width: 8em;
  text-align: right;
}

.el_loanSim_bonusAmount_max {
  font-weight: bold;
  color: #04a458;
}

/* 狭幅では 見出し／入力欄／解説 を縦積みにして はみ出しを防ぐ */
@media screen and (max-width: 480px) {
  /* .bl_loanSim_field_main {
    flex: 1 1 100%;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .bl_loanSim_field_label {
    flex: 1 1 100%;
  }
  .bl_loanSim_field_desc {
    flex: 1 1 100%;
    min-width: 0;
  } */
}
.bl_loanSim_input:focus {
  outline: none;
  border-color: #04a458;
  box-shadow: 0 0 0 3px rgba(4, 164, 88, 0.15);
}
.bl_loanSim_input.is_invalid {
  border-color: #ff0000;
  background-color: #fff5f5;
}

.bl_loanSim_unit {
  font-size: 88%;
  color: #777;
}

.bl_loanSim_error {
  color: #ff0000;
  font-size: 88%;
  margin: 8px 0 0;
  display: none;
}
.bl_loanSim_error.is_visible {
  display: block;
}

/* ----- ボタン ----- */
.bl_loanSim_btns {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
  padding: 0;
}
.bl_loanSim_btn {
  cursor: pointer;
  font-size: 106%;
  font-weight: bold;
  padding: 14px 36px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.bl_loanSim_btn__calc {
  background-color: #04a458;
  color: #fff;
}
.bl_loanSim_btn__calc:hover {
  opacity: 0.85;
}
.bl_loanSim_btn__reset {
  background-color: #fff;
  color: #505050;
  border-color: #cfcfcf;
}
.bl_loanSim_btn__reset:hover {
  background-color: #f2f2f2;
}
@media screen and (max-width: 600px) {
  .bl_loanSim_btns {
    flex-direction: column;
  }
  .bl_loanSim_btn {
    width: 100%;
  }
}

/* ----- 計算結果 ----- */
.bl_loanSim_resultHeading {
  text-align: center;
  font-size: 118%;
  font-weight: bold;
  color: #04a458;
  margin: 8px 0 20px;
}
.bl_loanSim_table__result {
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  overflow: hidden;
  scroll-margin-bottom: 120px; /* 計算ボタンで下端そろえスクロールした際の余白 */
}
.bl_loanSim_table__result tr {
  border-bottom: 1px solid #e8e8e8;
}
.bl_loanSim_table__result tr:last-child {
  border-bottom: none;
}
.bl_loanSim_table__result th,
.bl_loanSim_table__result td {
  padding: 16px 18px;
  vertical-align: middle;
}
.bl_loanSim_table__result th {
  width: 50%;
  text-align: left;
  background-color: #f6f6f6;
  font-weight: bold;
}
.bl_loanSim_table__result td {
  text-align: right;
}
/* 総返済額（最終行）を緑系で強調 */
.bl_loanSim_table__result tr:last-child th {
  background-color: #ebf8f2;
}
.bl_loanSim_table__result tr:last-child td {
  background-color: #ebf8f2;
}

.bl_loanSim_output {
  font-size: 128%;
  font-weight: bold;
  color: #04a458;
}
.bl_loanSim_table__result .bl_loanSim_unit {
  margin-left: 4px;
  color: #505050;
}
@media screen and (max-width: 480px) {
  .bl_loanSim_table__result th,
  .bl_loanSim_table__result td {
    padding: 12px 10px;
  }
  .bl_loanSim_output {
    font-size: 115%;
  }
}
