/* =============================================
   補助金ナビ ツール共通CSS
   ============================================= */

.tool-hero {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
  color: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.tool-hero h1 {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}
.tool-hero p {
  font-size: .9rem;
  opacity: .9;
}

/* === フォーム共通 === */
.tool-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.tool-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.tool-section h2 .step-num {
  background: var(--accent-primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

/* === ラジオ・チェックボックスグループ === */
.option-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.option-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: .95rem;
}
.option-card:hover {
  border-color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), .04);
}
.option-card input {
  accent-color: var(--accent-primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.option-card.selected {
  border-color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), .06);
}

/* === 金額入力 === */
.amount-input-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}
.amount-input-wrap input {
  flex: 1;
  padding: .65rem .75rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-family: var(--font-sans);
  text-align: right;
  transition: var(--transition);
}
.amount-input-wrap input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), .15);
}
.amount-input-wrap .unit {
  font-weight: 600;
  color: var(--text-secondary);
}
.amount-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* === 試算ボタン === */
.calc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: 1rem;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}
.calc-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.calc-btn:active {
  transform: translateY(0);
}

/* === 結果エリア === */
.result-area {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 2px solid #86efac;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
}
[data-theme="dark"] .result-area {
  background: linear-gradient(135deg, #052e16, #064e3b);
  border-color: #166534;
}
.result-area.error {
  background: linear-gradient(135deg, #fef2f2, #fff1f2);
  border-color: #fca5a5;
}
[data-theme="dark"] .result-area.error {
  background: linear-gradient(135deg, #450a0a, #7f1d1d);
  border-color: #991b1b;
}
.result-label {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: .25rem;
}
.result-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-secondary);
}
.result-amount .yen {
  font-size: 1.2rem;
}
.result-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .5rem;
}

/* === 結果内訳テーブル === */
.result-breakdown {
  margin-top: 1rem;
  width: 100%;
  border-collapse: collapse;
}
.result-breakdown th,
.result-breakdown td {
  padding: .5rem .75rem;
  text-align: center;
  font-size: .85rem;
  border-bottom: 1px solid var(--border-color);
}
.result-breakdown th {
  background: var(--bg-surface);
  font-weight: 600;
  color: var(--text-secondary);
}
.result-breakdown td {
  color: var(--text-primary);
}

/* === 対象者チェッカー結果 === */
.eligibility-result {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  margin-top: 1.5rem;
}
.eligibility-result.eligible {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 2px solid #86efac;
}
.eligibility-result.eligible h3 {
  color: var(--accent-secondary);
}
.eligibility-result .requirement {
  font-size: 1.1rem;
  font-weight: 700;
  margin: .75rem 0;
  line-height: 1.6;
}
.eligibility-result .requirement em {
  font-style: normal;
  color: var(--accent-primary);
  font-size: 1.3rem;
}

/* === タブ切替 === */
.tool-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tool-tab {
  flex: 1;
  min-width: 0;
  padding: .6rem .5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
  color: var(--text-secondary);
  line-height: 1.3;
}
.tool-tab:hover {
  border-color: var(--accent-primary);
}
.tool-tab.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === 注意書き === */
.tool-disclaimer {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1.5rem;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === 非表示ユーティリティ === */
.hidden { display: none !important; }

/* === レスポンシブ === */
@media (max-width: 768px) {
  .tool-hero h1 { font-size: 1.25rem; }
  .tool-tabs { gap: 2px; }
  .tool-tab { font-size: .72rem; padding: .5rem .3rem; }
  .result-amount { font-size: 1.6rem; }
}
