/* insights-feed.css — 📚 การ์ด "อ่าน" (บทวิเคราะห์ + รีวิวรายวัน + ทางเข้า Gems)
   08-23: ย้ายมาจาก market.css พร้อมกับตัวฟีเจอร์ (หน้า /market → แท็บอ่านใน /transcripts)
   คู่กับ insights-feed.js — หน้าไหนโหลด js ต้องโหลดไฟล์นี้ด้วย
   ⚠️ .ins-badge ไม่ได้อยู่ที่นี่ — คนละตัวกัน (ป้ายซื้อ/ขายในตาราง Form 4) ยังอยู่ใน market.css */

/* ── Insights Tab ──────────────────────────────────────────── */
.ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 4px 0 24px;
}
.ins-card {
  display: flex;
  gap: 16px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.ins-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.ins-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: #f0f7f5;
}
.ins-thumb--space { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.ins-thumb--review { background: #fff; border: 1px solid var(--border, #E5E7EB); overflow: hidden; }
.ins-thumb--review img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.ins-subhead {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-primary, #111827);
  margin: 18px 0 4px;
}
.ins-gem-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2, #f9fafb);
  border: 1px solid var(--border, #E5E7EB);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.ins-gem-promo:hover { border-color: var(--green, #2f7668); transform: translateY(-2px); }
.ins-gem-promo-icon { font-size: 1.6rem; flex: none; }
.ins-gem-promo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ins-gem-promo-text b { font-size: 0.92rem; color: var(--ink-primary, #111827); }
.ins-gem-promo-text small { font-size: 0.76rem; color: var(--ink-secondary, #4B5563); line-height: 1.5; }
.ins-gem-promo-arrow { font-size: 1.2rem; color: var(--green, #2f7668); flex: none; font-weight: 700; }
.ins-body { flex: 1; min-width: 0; }
.ins-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  background: rgba(47,118,104,.1);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.ins-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-primary, #111827);
  margin: 0 0 6px;
  line-height: 1.35;
}
.ins-desc {
  font-size: 0.8rem;
  color: var(--ink-secondary, #4B5563);
  line-height: 1.5;
  margin: 0 0 10px;
}
.ins-meta {
  font-size: 0.72rem;
  color: var(--ink-muted, #9CA3AF);
}
@media (max-width: 600px) {
  .ins-grid { grid-template-columns: 1fr; }
  .ins-card { flex-direction: column; }
  .ins-thumb { width: 48px; height: 48px; font-size: 1.4rem; }
}

/* หัวข้อของแท็บ "อ่าน" ในหน้าวิเคราะห์ (08-23) — เดิมใช้ .mkt-section-head/.mkt-title
   ซึ่งอยู่ใน market.css · หน้านี้ไม่ได้โหลดไฟล์นั้น จึงมีคลาสของตัวเองไปเลย */
.ins-section { padding: 0 16px; }
.ins-head {
  margin: 4px 0 2px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-primary, #111827);
}
.ins-head-sub {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--ink-secondary, #4B5563);
}

/* ── 🔍 ชั้น "หา" (09-05 — owner: เลื่อนหา 48 ชิ้นยาก) ─────────────────────
   toolbar sticky ใต้ .tr-page-tabs (top ตั้งจาก JS: placeToolbar) · ชิป = soft-green pill ตาม ui-design-system §2
   การ์ดย่อ: title/desc clamp + มือถือคงแนวนอน (เดิม column = การ์ดสูง ~400px × 48 ใบ) */
.ins-toolbar {
  position: sticky;
  top: 120px;                       /* fallback — JS วัดจริงจาก .tr-page-tabs แล้วทับ */
  z-index: 15;                      /* ใต้ .tr-page-tabs (20) และ header (100) */
  margin: 0 -16px 10px;             /* ยืดชนขอบ gutter ให้พื้นทึบคลุมเต็มตอนติดขอบ */
  padding: 8px 16px 10px;
  background: var(--bg, #f7f8fa);
}
.ins-search {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line, #E5E7EB);
  border-radius: 12px;
  background: var(--panel, #fff);
  color: var(--ink, #111827);
  padding: 0 16px;
  font-size: 0.92rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.ins-search::placeholder { color: var(--muted, #9CA3AF); }
.ins-search:focus {
  outline: none;
  border-color: var(--green, #2f7668);
  box-shadow: 0 0 0 3px rgba(47, 118, 104, 0.13);
}
.ins-chips {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.ins-chips::-webkit-scrollbar { display: none; }
.ins-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line, #E5E7EB);
  border-radius: 999px;
  background: var(--panel, #fff);
  color: var(--muted, #6b7280);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ins-chip:hover:not(.active) { border-color: var(--green, #2f7668); color: var(--ink, #111827); }
.ins-chip.active {
  background: var(--green-soft, #e4f1ec);
  color: var(--green, #2f7668);
  border-color: var(--green, #2f7668);
}
.ins-chip-n { font-size: 0.7rem; font-weight: 700; opacity: .75; }
.ins-status {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--muted, #6b7280);
}
.ins-status b { color: var(--ink, #111827); }
.ins-clear {
  border: none;
  background: none;
  padding: 0;
  color: var(--green, #2f7668);
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ins-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 20px;
  padding: 18px 16px;
  border: 1px dashed var(--line, #E5E7EB);
  border-radius: 14px;
  background: var(--panel, #fff);
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
}
.ins-empty b { color: var(--ink, #111827); }
.ins-empty .ins-clear { font-size: 0.85rem; }
.ins-more {
  grid-column: 1 / -1;
  min-height: 42px;
  border: 1px solid var(--line, #E5E7EB);
  border-radius: 12px;
  background: var(--panel, #fff);
  color: var(--green, #2f7668);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ins-more:hover { border-color: var(--green, #2f7668); background: var(--green-soft, #e4f1ec); }

/* แถว icon + พาดหัว (09-05 owner: "จะได้เห็นทีละหลายบทความ") — ~64px/แถว ≈ 10-12 แถวต่อจอมือถือ
   ทับ .ins-card/.ins-grid ด้านบน (ของเดิมเป็นการ์ดเต็มมีเนื้อย่อ) · จอกว้าง 2 คอลัมน์ */
.ins-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px;
  padding: 2px 0 18px;
}
.ins-card.ins-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}
.ins-card.ins-row:hover { transform: none; border-color: var(--green, #2f7668); box-shadow: none; }
.ins-row .ins-thumb { width: 40px; height: 40px; border-radius: 10px; font-size: 1.25rem; }
.ins-row .ins-thumb--review img { padding: 5px; }
.ins-row .ins-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0 0 3px;
}
.ins-row .ins-meta {
  font-size: 0.7rem;
  color: var(--muted, #9CA3AF);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ins-meta-tag { color: var(--green, #2f7668); font-weight: 700; }
@media (max-width: 600px) {
  .ins-grid { grid-template-columns: 1fr; gap: 6px; padding-bottom: 14px; }
  .ins-toolbar { margin-bottom: 8px; }
}
