/* =====================================================
   AI Overview — Web Styles
   /lib/ai-overview.css
   ===================================================== */

/* ── 區塊標題 ── */
.ai-section {
  margin: 32px 0 12px 0;
}
.ai-section h2 {
  font-size: 1.15rem;
  border-left: 4px solid #e36209;
  padding-left: 10px;
  margin-bottom: 6px;
}
.ai-section h3 {
  font-size: 1rem;
  color: #586069;
  margin: 18px 0 6px 0;
  padding-left: 4px;
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 4px;
}

/* ── section 說明文字 ── */
.section-note {
  font-size: 0.83rem;
  color: #586069;
  background: #f6f8fa;
  border-left: 3px solid #d1d5da;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
}

/* ── 比較表格 ── */
.ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.ai-table thead tr {
  background: #f6f8fa;
  color: #24292e;
  font-weight: 600;
  text-align: left;
}
.ai-table th, .ai-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e1e4e8;
  vertical-align: top;
}
.ai-table tbody tr:last-child td {
  border-bottom: none;
}
.ai-table tbody tr:hover {
  background: #f6f8fa;
}

/* ── 欄寬控制 ── */
.ai-table .col-tool   { width: 18%; font-weight: 600; }
.ai-table .col-plan   { width: 14%; }
.ai-table .col-feat   { width: 38%; }
.ai-table .col-use    { width: 18%; }
.ai-table .col-price  { width: 12%; text-align: center; }

/* ── 品牌色 badge ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-claude  { background: #fff3e0; color: #e36209; border: 1px solid #e36209; }
.badge-gemini  { background: #e8f0fe; color: #1a73e8; border: 1px solid #1a73e8; }
.badge-openai  { background: #e6f4f1; color: #10a37f; border: 1px solid #10a37f; }
.badge-cursor  { background: #f3e8ff; color: #7c3aed; border: 1px solid #7c3aed; }
.badge-local   { background: #fef3c7; color: #92400e; border: 1px solid #d97706; }
.badge-free    { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }

/* ── Extended Thinking 說明 ── */
.tool-note {
  font-size: 0.71rem;
  color: #7d4e00;
  font-style: italic;
  margin-top: 5px;
  padding: 3px 6px;
  border-top: 1px dashed #e36209;
  background: #fff8f0;
  border-radius: 0 0 3px 3px;
}

/* ── 功能 tag ── */
.tag {
  display: inline-block;
  background: #f1f3f5;
  color: #495057;
  border-radius: 4px;
  font-size: 0.73rem;
  padding: 1px 6px;
  margin: 2px 2px 2px 0;
}

/* ── 架構圖 ── */
.ai-arch {
  margin: 24px 0;
  font-size: 0.82rem;
}
.arch-layer {
  margin-bottom: 10px;
}
.arch-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b949e;
  margin-bottom: 5px;
  font-weight: 600;
}
.arch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.arch-box {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1.5px solid;
  text-align: center;
  min-width: 100px;
}
.arch-box.claude  { background:#fff3e0; border-color:#e36209; color:#b45309; }
.arch-box.gemini  { background:#e8f0fe; border-color:#1a73e8; color:#1558c0; }
.arch-box.openai  { background:#e6f4f1; border-color:#10a37f; color:#0a6c57; }
.arch-box.cursor  { background:#f3e8ff; border-color:#7c3aed; color:#5b21b6; }
.arch-box.local   { background:#fef3c7; border-color:#d97706; color:#92400e; }
.arch-box.infra   { background:#f1f5f9; border-color:#94a3b8; color:#475569; }

.arch-arrow {
  text-align: center;
  color: #8b949e;
  font-size: 1rem;
  margin: 4px 0;
  letter-spacing: 8px;
}
.arch-connector {
  border-left: 2px dashed #d0d7de;
  margin: 0 0 0 20px;
  padding-left: 14px;
}

/* ── 比較小結 ── */
.ai-summary {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.85rem;
  margin-top: 24px;
  line-height: 1.7;
}
.ai-summary strong { color: #24292e; }

/* ── Extended Thinking tag 特別標色 ── */
.tag-et {
  background: #fff3cd;
  color: #7d4e00;
  border: 1px solid #e36209;
  font-weight: 600;
}

/* ── RWD ── */
@media (max-width: 640px) {
  .ai-table { font-size: 0.78rem; }
  .ai-table th, .ai-table td { padding: 6px 8px; }
  .arch-box { font-size: 0.75rem; padding: 5px 10px; min-width: 80px; }
}
