/* 全体のスタイル */
body {
  font-family: "メイリオ", Meiryo, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 20px;
  color: #333;
}

/* フォーム内のセレクトボックス共通スタイル */
.form-input select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  background-color: #fff;
  cursor: pointer;
  width: 100%;
  max-width: 250px; /* 最大幅を設定 */
  box-sizing: border-box; /* paddingとborderを幅に含める */
  -webkit-appearance: none; /* ブラウザ標準の矢印を消す (Safari, Chrome) */
  -moz-appearance: none;    /* ブラウザ標準の矢印を消す (Firefox) */
  appearance: none;          /* ブラウザ標準の矢印を消す */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* 「選択しない」状態のスタイル */
select.not-selected {
  color: #757575; /* 薄いグレー */
}

/* シミュレーターコンテナ */
.simulator-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden; /* 角丸を有効にするため */
}

/* ヘッダー */
.simulator-header {
  background-color: #f7f7f7;
  padding: 12px;
  border-bottom: 1px solid #ccc;
}
/* ヘッダーロゴ */
.simulator-header .header-logo {
  display: block;
  margin: 0 auto;
  max-width: 250px;
}

/* --- パンくずリスト --- */
.breadcrumb-container {
  background-color: #f8f9fa;
  padding: 0.75rem 1rem; /* 左右の余白を調整 */
  border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 auto; /* 中央揃え */
  max-width: 800px; /* simulator-containerの幅と合わせる */
  font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '>';
  padding: 0 0.75rem;
  color: #6c757d;
}

.breadcrumb-item a {
  color: #00a0e9; /* シミュレーションページのテーマカラー */
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
}
/* --- /パンくずリスト --- */


/* メインコンテンツ */
.simulator-body {
  padding: 30px;
}
.simulator-body h1 {
  text-align: center;
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: bold;
}

/* ステップ表示 */
.step-indicator {
  background-color: #00a0e9;
  color: #fff;
  padding: 10px 20px;
  font-size: 14px;
  /* font-weight: bold; */
  border-radius: 5px;
  margin-bottom: 30px;
}

/* フォームの行 */
.form-row {
  display: flex;
  align-items: flex-start; /* ラベルと入力欄を上揃え */
  margin-bottom: 8px;
  /* border-bottom: 1px dotted #ccc; */
  padding-bottom: 20px;
}

.form-row:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

/* フォームのラベル */
.form-label {
  width: 200px;
  font-weight: bold;
  padding-top: 8px; /* 入力欄との垂直位置を調整 */
}

.form-label .required {
  background-color: #e60012;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  font-weight: normal;
}

/* フォームの入力エリア */
.form-input {
  flex: 1;
}

/* 性別選択ラジオボタン */
.gender-selection {
  display: flex;
  gap: 20px;
}

.gender-selection label {
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 2px solid #ccc;
  padding: 10px 20px;
  border-radius: 5px;
  transition: all 0.2s;
}

.gender-selection input[type="radio"] {
  display: none; /* 元のラジオボタンを非表示 */
}

.gender-selection input[type="radio"]:checked + label {
  background-color: #e3f4fd;
  border-color: #00a0e9;
}

/* 生年月日セレクトボックス */
.birthdate-selection {
  display: flex;
  align-items: center;
  gap: 10px;
}

.birthdate-selection select {
  padding: 15px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.birthdate-selection .year-label {
  margin-left: 5px;
}


/* シミュレーションボタン */
.submit-area {
  text-align: center;
  margin-top: 12px;
}

.submit-button {
  background: linear-gradient(to bottom, #ff9a00, #ff7f00);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 20px 24px;
  border: none;
  border-radius: 45px;
  cursor: pointer;
  box-shadow: 0 4px 0 #c86400;
  transition: all 0.2s;
  text-decoration: none; /* aタグの場合 */
  display: inline-block;
}

/* --- オプション選択用のスタイル --- */
.option-note {
  font-size: 12px;
  color: #666;
  margin: 5px 0 0 0;
}

.option-checkbox {
  margin-bottom: 15px;
}

.option-checkbox:last-child {
  margin-bottom: 0;
}

.option-checkbox label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
}

.option-checkbox input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

.option-checkbox .option-price {
  margin-left: 15px;
  font-weight: bold;
  color: #00a0e9;
}

.option-checkbox.indented {
  margin-left: 30px;
}

/* --- /オプション選択用のスタイル --- */


.submit-button:hover {
  opacity: 0.8;
}

.submit-button:active {
  box-shadow: none;
  transform: translateY(4px);
}

.submit-button:disabled {
  background: #ccc; /* グレーの背景 */
  box-shadow: none;
  cursor: not-allowed;
}

/* 注意書き */
.notes {
  margin-top: 30px;
  color: #666;
  text-align: left;
}

.notes p {
  font-size: 10px;
  margin-top: 0px;
  margin-bottom: 0px;
  line-height: 1.5;
}

.notes a {
  color: #00a0e9;
  text-decoration: underline;
}

/* スマホでのみ表示する要素（PCでは非表示） */
.sp-only {
  display: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  body {
    padding: 0;
    background-color: #fff;
  }
  .simulator-container {
    border: none;
    border-radius: 0;
  }
  .simulator-body {
    padding: 20px;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-label {
    width: auto;
    margin-bottom: 10px;
    padding-top: 0;
  }
  .gender-selection {
    justify-content: space-between;
  }
  .gender-selection label {
    flex: 1;
    justify-content: center;
  }
  .birthdate-selection {
    flex-wrap: wrap;
    gap: 10px 0; /* 上下のgapは10px、左右のgapは0に */
  }
  .birthdate-selection select[name="birth_year"] {
    width: 100%; /* 年セレクタを100%幅に */

  }
  .birthdate-selection select[name="birth_month"],
  .birthdate-selection select[name="birth_day"] {
    width: calc(50% - 50px); /* 月と日のセレクタをgapを考慮して調整 */
  }
  .birthdate-selection span {
    width: 40px; /* 「月」「日」テキストの幅を固定 */
    text-align: left;
    margin-left: 7px;
  }

  /* スマホでのみ表示する要素を有効化 */
  .sp-only {
    display: initial; /* brタグのデフォルトの表示に戻す */
  }
}

/* --- 結果ページ用のスタイル --- */

/* プラン選択エリア */
.plan-selection-area {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

/* プランカード */
.plan-card {
  flex: 1;
  border: 2px solid #ccc;
  border-radius: 8px;
  text-align: center;
  overflow: hidden; /* 角丸を有効にするため */
  display: flex;
  flex-direction: column;
}

.plan-card.selected {
  border-color: #00a0e9;
  box-shadow: 0 0 10px rgba(0, 160, 233, 0.3);
}

.plan-header {
  background-color: #f7f7f7;
  padding: 15px;
  border-bottom: 1px solid #ccc;
}

.plan-header.recommended {
  background-color: #00a0e9;
  color: #fff;
  border-bottom: 1px solid #00a0e9;
}

.plan-name {
  margin: 0;
  font-size: 22px;
}

.plan-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.plan-price-label {
  margin: 0;
  font-size: 14px;
}

.plan-price {
  font-size: 48px;
  font-weight: bold;
  color: #e60012;
  margin: 0 0 20px 0;
}

.plan-price span {
  font-size: 20px;
  font-weight: normal;
  margin-left: 5px;
}

/* 保障内容リスト */
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
  flex-grow: 1;
}

.plan-features li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.check-icon {
  color: #00a0e9;
  font-weight: bold;
  margin-right: 8px;
}

.plan-button {
  padding: 12px 30px;
  font-size: 18px;
}

/* 詳細説明（アコーディオン） */
.plan-details {
  margin-top: 30px;
}

.plan-details summary {
  cursor: pointer;
  font-weight: bold;
  padding: 10px;
  background-color: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.plan-details .details-content {
  padding: 20px;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 5px 5px;
}

.plan-details table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.plan-details th, .plan-details td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
}

.plan-details th {
  background-color: #f2f2f2;
}

/* 戻るボタン */
.back-button-area {
  text-align: center;
  margin-top: 30px;
}

.back-button {
  color: #00a0e9;
  text-decoration: underline;
}

/* 結果ページのレスポンシブ対応 */
@media (max-width: 768px) {
  .plan-selection-area {
    flex-direction: column;
  }

  .breadcrumb-container {
    padding: 0.75rem 1.25rem; /* スマホ表示では左右の余白を少し広げる */
  }

}

/* --- エラー表示用のスタイル --- */
.error-box {
  border: 2px solid #e60012;
  background-color: #fff0f0;
  padding: 20px;
  margin: 30px 0;
  text-align: center;
}

/* --- 結果ページの再計算フォーム --- */
.recalc-form-container {
  background-color: #fdfdfd;
  border: 1px solid #eee;
  padding: 20px 0;
  margin-bottom: 30px;
}

/* --- 結果ページ：条件サマリー --- */
.condition-summary-container {
  background-color: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin: 30px 0;
  padding: 18px;
}

.condition-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.condition-summary-header h2 {
  margin: 0;
  font-size: 18px;
}

.change-button {
  background-color: #fff;
  border: 1px solid #00a0e9;
  color: #00a0e9;
  padding: 8px 24px;
  font-size: 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

.change-button:hover {
  background-color: #e3f4fd;
}

.condition-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.condition-list dt {
  font-weight: bold;
  color: #555;
}

.condition-list dd {
  margin: 0;
}
