/* =============================================
   おすすめオプション カード（オプションセレクター）
   ============================================= */

.option-selector__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --- 各オプション行 --- */
.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  min-height: 56px;
}

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

/* カテゴリ名 */
.option-row__label {
  flex-shrink: 0;
  width: 9em;
  font-size: 13px;
  font-weight: bold;
}

/* 選択状態エリア */
.option-row__status {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.option-row__selected-name {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-row--selected .option-row__selected-name {
  color: #222;
  font-weight: bold;
}

.option-row__selected-price {
  font-size: 12px;
  color: #DF1219;
  font-weight: bold;
}

/* 選択・変更ボタン */
.option-row__btn {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: bold;
  color: #DF1219;
  background: #fff;
  border: 1px solid #DF1219;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.option-row__btn:hover,
.option-row--selected .option-row__btn {
  background: #DF1219;
  color: #fff;
}

/* =============================================
   モーダル内「選択しない」行
   ============================================= */

.option-modal__item--none {
  border-bottom: 1px solid #e8e8e8;
}

.option-modal__item-inner--none {
  align-items: center;
  padding: 4px 0;
}

.option-modal__none-label {
  font-size: 14px;
  color: #666;
}

/* =============================================
   レスポンシブ（カード行）
   ============================================= */

@media (max-width: 575px) {
  /* 1行目: ラベル（左）＋ボタン（右）、2行目: 選択状態 */
  .option-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 10px 12px;
  }

  .option-row__label {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .option-row__btn {
    flex-shrink: 0;
  }

  .option-row__status {
    flex-basis: 100%;
    width: 100%;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
  }

  .option-row__selected-name {
    white-space: normal;
    word-break: break-all;
  }

  /* フルメンテナンスパック・オプションパック無しを縦並びに */
  .year5_options,
  .year7_options,
  .year9_options {
    display: inline-flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  .year5_options label,
  .year7_options label,
  .year9_options label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
  }
}

/* =============================================
   モーダル ヘッダー
   ============================================= */

.option-modal .modal-header {
  background-color: #DF1219;
  border-bottom: none;
  padding: 14px 20px;
}

.option-modal .modal-title {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.option-modal .modal-header .close {
  color: #fff;
  opacity: 0.85;
  font-size: 24px;
  text-shadow: none;
}

.option-modal .modal-header .close:hover {
  opacity: 1;
}

/* =============================================
   モーダル ボディ
   ============================================= */

.option-modal .modal-body {
  padding: 0;
}

/* =============================================
   オプション アイテム
   ============================================= */

.option-modal__item {
  border-bottom: 1px solid #e8e8e8;
}

.option-modal__item:last-of-type {
  border-bottom: none;
}

.option-modal__label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  margin: 0;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.15s;
}

.option-modal__label:hover {
  background-color: #fff5f5;
}

.option-modal__label input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: #DF1219;
  cursor: pointer;
}

.option-modal__item-inner {
  display: flex;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

/* =============================================
   商品画像
   ============================================= */

.option-modal__image {
  flex-shrink: 0;
  width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f8f8;
  border: 1px solid #eee;
  padding: 6px;
}

.option-modal__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 90px;
}

/* =============================================
   商品情報
   ============================================= */

.option-modal__info {
  flex: 1;
  min-width: 0;
}

.option-modal__name {
  font-size: 13px;
  font-weight: bold;
  line-height: 1.65;
  margin-bottom: 10px;
  color: #333;
}

.option-modal__ref {
  color: #DF1219;
  font-size: 11px;
  font-weight: normal;
  margin-left: 2px;
}

/* =============================================
   価格テーブル
   ============================================= */

.option-modal__price-table {
  border-collapse: collapse;
  font-size: 13px;
  width: auto;
}

.option-modal__price-table th,
.option-modal__price-table td {
  padding: 4px 10px;
  text-align: left;
  line-height: 1.5;
}

.option-modal__price-table th {
  background-color: #DF1219;
  color: #fff;
  white-space: nowrap;
  font-weight: bold;
  min-width: 68px;
}

.option-modal__price-table td {
  color: #DF1219;
  font-weight: bold;
}

.option-modal__price-table tr + tr th,
.option-modal__price-table tr + tr td {
  border-top: 1px solid #fff4f4;
}

/* =============================================
   備考
   ============================================= */

.option-modal__remarks {
  margin: 0;
  padding: 14px 20px;
  background-color: #fdf5f5;
  border-top: 2px solid #DF1219;
}

.option-modal__remarks p {
  font-size: 11px;
  line-height: 1.7;
  color: #555;
  margin: 0 0 4px;
}

.option-modal__remarks p:last-child {
  margin-bottom: 0;
}

/* =============================================
   モーダル フッター
   ============================================= */

.option-modal .modal-footer {
  justify-content: center;
  border-top: 1px solid #e8e8e8;
  padding: 14px 20px;
}

.option-modal .modal-footer .btn-secondary {
  background-color: #DF1219;
  border-color: #DF1219;
  color: #fff;
  min-width: 120px;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.option-modal .modal-footer .btn-secondary:hover {
  background-color: #b50e14;
  border-color: #b50e14;
}

/* =============================================
   レスポンシブ
   ============================================= */

@media (max-width: 575px) {
  .option-modal__item-inner {
    flex-direction: column;
    gap: 10px;
  }

  .option-modal__image {
    width: 80px;
  }

  .option-modal__label {
    padding: 14px 12px;
  }

  .option-modal .modal-title {
    font-size: 16px;
  }
}

/* =============================================
   プランカラー：カード全体（タブペインで色分け）
   ============================================= */

/* カードの幅を制限 */
#plan01-estimate .cost__card,
#plan02-estimate .cost__card,
#plan03-estimate .cost__card {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* 5年プラン（緑） */
#plan01-estimate .cost__card {
  background-color: #d9f0c2;
}
#plan01-estimate .cost__card-header {
  background-color: #6FC247;
}
#plan01-estimate .option-row {
  border-bottom-color: rgba(111, 194, 71, 0.35);
}
#plan01-estimate .option-row__btn {
  color: #6FC247;
  border-color: #6FC247;
}
#plan01-estimate .option-row__btn:hover,
#plan01-estimate .option-row--selected .option-row__btn {
  background-color: #6FC247;
  border-color: #6FC247;
  color: #fff;
}
#plan01-estimate .option-row--selected .option-row__selected-price {
  color: #6FC247;
}

/* 7年プラン（赤） */
#plan02-estimate .cost__card {
  background-color: #fac8ca;
}
#plan02-estimate .cost__card-header {
  background-color: #DF1219;
}
#plan02-estimate .option-row {
  border-bottom-color: rgba(223, 18, 25, 0.2);
}

/* 9年プラン（オレンジ） */
#plan03-estimate .cost__card {
  background-color: #fde4b0;
}
#plan03-estimate .cost__card-header {
  background-color: #F29D0A;
}
#plan03-estimate .option-row {
  border-bottom-color: rgba(242, 157, 10, 0.35);
}
#plan03-estimate .option-row__btn {
  color: #F29D0A;
  border-color: #F29D0A;
}
#plan03-estimate .option-row__btn:hover,
#plan03-estimate .option-row--selected .option-row__btn {
  background-color: #F29D0A;
  border-color: #F29D0A;
  color: #fff;
}
#plan03-estimate .option-row--selected .option-row__selected-price {
  color: #F29D0A;
}

/* =============================================
   プランカラー：モーダル（JSクラスで切替）
   ============================================= */

/* --- 5年（緑） --- */
.option-modal.plan-five .modal-header {
  background-color: #6FC247;
}
.option-modal.plan-five .modal-header .close {
  color: #fff;
}
.option-modal.plan-five .option-modal__label input[type="radio"] {
  accent-color: #6FC247;
}
.option-modal.plan-five .option-modal__price-table th {
  background-color: #6FC247;
}
.option-modal.plan-five .option-modal__price-table td {
  color: #6FC247;
}
.option-modal.plan-five .option-modal__ref {
  color: #6FC247;
}
.option-modal.plan-five .option-modal__remarks {
  border-top-color: #6FC247;
  background-color: #f6fdf0;
}
.option-modal.plan-five .modal-footer .btn-secondary {
  background-color: #6FC247;
  border-color: #6FC247;
}
.option-modal.plan-five .modal-footer .btn-secondary:hover {
  background-color: #5aaa36;
  border-color: #5aaa36;
}

/* --- 7年（赤）：デフォルト色のため追記不要 --- */
.option-modal.plan-seven .modal-header {
  background-color: #DF1219;
}

/* --- 9年（オレンジ） --- */
.option-modal.plan-nine .modal-header {
  background-color: #F29D0A;
}
.option-modal.plan-nine .modal-header .close {
  color: #fff;
}
.option-modal.plan-nine .option-modal__label input[type="radio"] {
  accent-color: #F29D0A;
}
.option-modal.plan-nine .option-modal__price-table th {
  background-color: #F29D0A;
}
.option-modal.plan-nine .option-modal__price-table td {
  color: #F29D0A;
}
.option-modal.plan-nine .option-modal__ref {
  color: #F29D0A;
}
.option-modal.plan-nine .option-modal__remarks {
  border-top-color: #F29D0A;
  background-color: #fffbf0;
}
.option-modal.plan-nine .modal-footer .btn-secondary {
  background-color: #F29D0A;
  border-color: #F29D0A;
}
.option-modal.plan-nine .modal-footer .btn-secondary:hover {
  background-color: #d4880a;
  border-color: #d4880a;
}

/* =============================================
   ボーナス支払ラジオ グリッドレイアウト
   ============================================= */

.bonus-option-grid {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 30px;
  row-gap: 6px;
  text-align: left;
  border: 1px solid #ccc;
  padding: 12px 20px;
  border-radius: 8px;
}

.bonus-option-grid .bonus-divider {
  grid-column: 1 / -1;
  margin: 4px 0;
  width: 100%;
}

@media (max-width: 767px) {
  .bonus-option-grid {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
