/* 強化されたビジュアル表示用スタイル */

/* 結果ヘッダー */
.results-header {
  border-radius: 8px;
  transition: all 0.3s ease;
}

.framework-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* 概要ハイライト */
.summary-highlights {
  border-left: 4px solid var(--bs-primary);
}

.score-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.score-display {
  position: relative;
}

.score-display::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--bs-primary);
}

/* SWOT分析 */
.card .card-header.bg-white {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ステップ表示 */
.step-item .step-number {
  font-size: 0.85rem;
  font-weight: 600;
}

/* チャート関連 */
.chart-container {
  transition: all 0.3s ease;
}

.chart-container:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-insights, .marketing-recommendations {
  font-size: 0.9rem;
}

.chart-insights .insights-list,
.marketing-recommendations .recommendations-list {
  list-style: none;
}

/* 市場調査タブ */
.market-metrics {
  transition: all 0.3s ease;
}

.market-metrics:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.competitor-matrix th,
.competitor-matrix td {
  font-size: 0.85rem;
  padding: 0.5rem;
}

.pricing-tiers .price-range {
  font-size: 0.85rem;
}

.channels-overview .progress {
  height: 18px;
  border-radius: 4px;
}

.barriers-overview .barrier-item {
  margin-bottom: 0.5rem;
}

.search-keywords {
  font-size: 0.85rem;
}

/* マーケティング戦略タブ */
.strategy-metrics {
  transition: all 0.3s ease;
}

.strategy-metrics:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.persona {
  transition: all 0.3s ease;
}

.persona:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.persona-attributes {
  line-height: 1.6;
}

.positioning-map {
  background-color: rgba(var(--bs-light-rgb), 0.5);
}

.channel-allocation .progress {
  height: 12px;
  border-radius: 4px;
}

.allocation-item {
  font-size: 0.85rem;
}

.funnel-content .funnel-stage {
  transition: all 0.2s ease;
}

.funnel-content .funnel-stage:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}

.content-tags .badge {
  font-weight: normal;
}

.kpi-metrics .table {
  font-size: 0.85rem;
}

.timeline-item {
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 6px;
  width: 1px;
  height: calc(100% + 8px);
  background-color: rgba(var(--bs-primary-rgb), 0.3);
}

.timeline-date {
  font-weight: 600;
}

/* アニメーション効果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.tab-pane.fade.show.active {
  animation: fadeInUp 0.5s ease;
}

/* ダークモード対応 */
[data-theme="dark"] .card-header.bg-white {
  background-color: var(--card-header-bg) !important;
}

[data-theme="dark"] .bg-white {
  background-color: var(--card-bg) !important;
}

[data-theme="dark"] .bg-light {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] .border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .border-end,
[data-theme="dark"] .border-bottom {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* レスポンシブ調整 */
@media (max-width: 767.98px) {
  .framework-icon {
    width: 48px;
    height: 48px;
  }
  
  .chart-container {
    height: 220px !important;
  }
  
  .progress {
    height: 14px !important;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .summary-highlights,
  .market-summary,
  .strategy-summary {
    padding: 0.75rem !important;
  }
  
  .score-display .display-4 {
    font-size: 2rem;
  }
  
  .market-metrics,
  .strategy-metrics {
    padding: 0.75rem !important;
  }
}

/* 新しい印刷スタイル */
@media print {
  .results-container {
    padding: 0;
    margin: 0;
  }
  
  .btn, nav, button {
    display: none !important;
  }
  
  .card {
    break-inside: avoid;
    border: 1px solid #ddd;
    box-shadow: none;
  }
  
  .chart-container {
    page-break-inside: avoid;
    break-inside: avoid;
    height: 300px !important;
  }
  
  .tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .tab-content > .tab-pane {
    page-break-after: always;
  }
}
/* 競合調査タブ関連のスタイル */
.competitor-tab {
  position: relative;
}

/* NEWバッジのスタイル */
.badge-new {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

/* 競合調査コンテンツ */
#competitor-content {
  min-height: 400px;
}

.competitor-analysis-content {
  animation: fadeInUp 0.5s ease;
}

/* 競合比較セクション */
.competitor-comparison .competitor-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.competitor-comparison .competitor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left-color: var(--bs-primary);
}

.competitor-comparison h5 {
  color: var(--bs-primary);
  font-weight: 600;
}

/* 差別化戦略セクション */
.differentiation-strategy {
  background-color: rgba(var(--bs-info-rgb), 0.05);
  border-left: 4px solid var(--bs-info);
}

.differentiation-strategy h4 {
  color: var(--bs-info);
}

/* 引用表示のスタイル */
.citation-source {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--bs-secondary);
  font-style: italic;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background-color: rgba(var(--bs-secondary-rgb), 0.1);
  border-radius: 0.25rem;
  white-space: nowrap;
}

.citation-source::before {
  content: "📚 ";
}

/* 引用ソースのホバー効果 */
.citation-source:hover {
  background-color: rgba(var(--bs-secondary-rgb), 0.2);
  cursor: help;
}

/* 分析ポイントリスト */
.analysis-points li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.analysis-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--bs-primary);
  font-weight: bold;
}

/* プレースホルダーのスタイル */
.competitor-placeholder {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.competitor-placeholder i {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

/* アクションボタン */
.competitor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.competitor-actions .btn {
  font-size: 0.875rem;
}

/* ユーザー情報表示のスタイル */
.user-info {
    padding: 10px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
}

.user-info .badge {
    font-size: 0.9rem;
    padding: 6px 12px;
}

/* 分析フォームコンテナのスタイル */
.analysis-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.1) 100%);
    border-radius: 12px;
    padding: 1.5rem;
}

/* レスポンシブ対応 */
@media (max-width: 767.98px) {
  .competitor-comparison .competitor-card {
    margin-bottom: 1rem;
  }
  
  .citation-source {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
  }
  
  .competitor-actions {
    justify-content: center;
  }
  
  .competitor-actions .btn {
    flex: 1 1 45%;
  }
}

/* ダークモード対応 */
[data-theme="dark"] .competitor-comparison .competitor-card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .differentiation-strategy {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .citation-source {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .citation-source:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 印刷対応 */
@media print {
  .competitor-actions {
    display: none !important;
  }
  
  .badge-new {
    display: none !important;
  }
  
  .citation-source {
    border: 1px solid #ddd;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
  }
}
/* ===== 競合調査の追加スタイル（改善版） ===== */

/* 競合調査結果のコンテナ */
.competitor-research-results {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.competitor-research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.competitor-research-header h3 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.competitor-research-content {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.competitor-analysis-text {
    color: #495057;
    line-height: 1.8;
    font-size: 0.95rem;
}

.competitor-analysis-text p {
    margin-bottom: 1rem;
}

/* 引用ソースリストの改善 */
.citation-sources {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.citation-sources h4 {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.source-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    transition: all 0.2s ease;
}

.source-item:hover {
    background-color: #e9ecef;
    transform: translateX(2px);
}

.source-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.source-text {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 引用インライン表示の改善 */
.citation-inline {
    color: #007bff;
    font-weight: 500;
    cursor: help;
    border-bottom: 1px dotted #007bff;
    text-decoration: none;
}

.citation-inline:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* プレースホルダーの改善 */
.competitor-research-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.placeholder-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.placeholder-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* 再分析ボタン */
.btn-reanalyze {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-reanalyze:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

/* ローディング状態 */
.competitor-research-loading {
    text-align: center;
    padding: 3rem;
}

.competitor-research-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.loading-text {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 1rem;
}

/* レスポンシブ対応（競合調査専用） */
@media (max-width: 768px) {
    .competitor-research-results {
        padding: 1.5rem;
    }
    
    .competitor-research-content {
        padding: 1rem;
    }
    
    .competitor-research-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .competitor-research-header .btn {
        margin-top: 1rem;
    }
    
    .source-item {
        padding: 0.5rem;
    }
    
    .source-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

/* ダークモード対応（競合調査専用） */
[data-theme="dark"] .competitor-research-results {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .competitor-research-content {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .competitor-research-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .citation-sources {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .source-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--bs-primary);
}

[data-theme="dark"] .source-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .competitor-analysis-text,
[data-theme="dark"] .source-text {
    color: rgba(255, 255, 255, 0.8);
}

/* 印刷対応（競合調査専用） */
@media print {
    .competitor-research-header .btn {
        display: none !important;
    }
    
    .competitor-research-results {
        background-color: white !important;
        padding: 1rem;
    }
    
    .source-item {
        background-color: #f8f9fa !important;
        border: 1px solid #dee2e6;
    }
}