/* -------------------------------------------------------------
 * 資産運用シミュレーション 共通スタイル (invest.css)
 * ------------------------------------------------------------- */

/* パンくずリスト */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--text-color);
}

.breadcrumbs li::after {
  content: '/';
  margin-left: 8px;
  color: var(--border-color);
}

.breadcrumbs li:last-child::after {
  content: '';
}

.breadcrumbs li:last-child {
  color: var(--text-color);
  font-weight: 600;
}

/* 注意書き（概要直下の警告枠） */
.invest-notice {
  background-color: var(--danger-light);
  border: 1px solid rgba(255, 59, 48, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.88rem;
  color: var(--danger-color);
  font-weight: 600;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* レイアウトグリッド（入力・出力） */
.invest-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .invest-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* 入力パネル */
.input-panel {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
}

.input-panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

/* フォームグループ */
.form-group {
  margin-bottom: 20px;
}

.form-group:last-of-type {
  margin-bottom: 24px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-label-optional {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--surface-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-unit {
  position: absolute;
  right: 14px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  pointer-events: none;
}

/* スイッチ（インフレON/OFF等） */
.switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.switch-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* 結果・グラフパネル */
.result-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 結果集計カード */
.results-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.result-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-card.highlight {
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--primary-light) 100%);
}

.result-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.result-card-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-color);
}

.result-card.highlight .result-card-value {
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* グラフコンテナ */
.chart-container-wrapper {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.chart-actions {
  display: flex;
  gap: 12px;
}

.chart-canvas-container {
  position: relative;
  width: 100%;
  height: 380px;
}

@media (max-width: 600px) {
  .chart-canvas-container {
    height: 280px;
  }
}
