/* ============================================================
   custom.css — 相続不動産DDツール カスタムスタイル
   ============================================================ */

/* ===== ステップボタン ===== */
.step-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: #94a3b8;
  background: #1e293b;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.15s;
}
.step-btn:hover { color: #e2e8f0; background: #334155; }
.step-btn.active { color: #fff; background: #3b82f6; border-color: #3b82f6; }

/* ===== 共通ボタン ===== */
.btn-primary {
  padding: 0.625rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
}
.btn-primary:hover    { background: #2563eb; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  padding: 0.625rem 1.5rem;
  background: #1e293b;
  color: #94a3b8;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid #334155;
}
.btn-secondary:hover    { background: #334155; color: #e2e8f0; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 利回りカラーバー ===== */
.yield-excellent { background: linear-gradient(90deg, #22c55e, #16a34a); }
.yield-good      { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.yield-caution   { background: linear-gradient(90deg, #f59e0b, #d97706); }
.yield-danger    { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* ===== 目利きグレードバッジ ===== */
.grade-s { background: #f59e0b; color: #000; padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.75rem; }
.grade-a { background: #22c55e; color: #fff; padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.75rem; }
.grade-b { background: #3b82f6; color: #fff; padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.75rem; }
.grade-c { background: #6b7280; color: #fff; padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.75rem; }
.grade-d { background: #ef4444; color: #fff; padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.75rem; }

/* ===== 出口戦略タブ ===== */
.exit-tab-btn {
  padding: 0.4rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  background: #1e293b;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.15s;
}
.exit-tab-btn:hover  { color: #e2e8f0; }
.exit-tab-btn.active { background: #0f172a; color: #f59e0b; border-color: #f59e0b; }

/* ===== チェックリストボタン ===== */
.check-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  background: #0f172a;
  border: 1.5px solid #334155;
  cursor: pointer;
  transition: all 0.15s;
}
.check-btn:hover    { border-color: #64748b; color: #e2e8f0; }
.check-btn.selected { background: #f59e0b; color: #000; border-color: #f59e0b; }

/* ===== 入力フィールド共通 ===== */
.form-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}
.form-input:focus       { outline: none; border-color: #3b82f6; }
.form-input::placeholder { color: #475569; }

/* select 特有スタイル調整 */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
  padding-right: 2rem;
}

/* ===== カード ===== */
.dd-card {
  background: #1e293b;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  padding: 1.25rem;
}

/* ===== トースト ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #22c55e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  z-index: 9999;
  animation: fadeInUp 0.2s ease;
}
.toast-error {
  background: #ef4444;
}

@keyframes fadeInUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ===== グローバルツールチップ ===== */
.dd-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  max-width: 320px;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  pointer-events: none;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.6;
}
.dd-tooltip.visible { display: block; }
.dd-tooltip-title {
  color: #f59e0b;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #334155;
}
.dd-tooltip-body { color: #cbd5e1; margin-bottom: 2px; }
.dd-tooltip-formula {
  background: #0f172a;
  border-left: 2px solid #3b82f6;
  border-radius: 0 4px 4px 0;
  padding: 5px 8px;
  margin-top: 6px;
  color: #93c5fd;
  font-size: 11px;
}
.dd-tooltip-guide {
  margin-top: 6px;
  color: #4ade80;
  font-size: 11px;
}

/* ===== モバイル対応 ===== */
@media (max-width: 640px) {
  .step-btn     { padding: 0.375rem 0.625rem; font-size: 0.65rem; }
  .btn-primary  { padding: 0.5rem 1rem; font-size: 0.8rem; }
  .btn-secondary { padding: 0.5rem 1rem; font-size: 0.8rem; }
}
