/* Premium AI Chat UI Styles */
.market-analysis-dashboard .ai-chat-container {
  max-width: 1000px;
  margin: 30px auto;
  background: #f8fafc;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 570px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  transition: all 0.3s ease;
}

.market-analysis-dashboard .ai-chat-header {
  padding: 24px 30px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 10;
  text-align: start;
}

html[dir="rtl"] .market-analysis-dashboard .ai-chat-header {
  flex-direction: row;
}

.market-analysis-dashboard .ai-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a7803d;
  font-size: 1.4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.market-analysis-dashboard .ai-chat-title-wrap h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.market-analysis-dashboard .ai-chat-title-wrap p {
  margin: 0;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

.market-analysis-dashboard .ai-chat-back-btn {
  background: #1e293b;
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  margin-inline-start: auto;
}

.market-analysis-dashboard .ai-chat-back-btn:hover {
  background: #334155;
  transform: scale(1.05);
}

.market-analysis-dashboard .ai-chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: transparent;
}

.market-analysis-dashboard .chat-message {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  animation: fadeInUp 0.3s ease-out forwards;
}

html[dir="ltr"] .market-analysis-dashboard .chat-message.ai {
  flex-direction: row;
  justify-content: flex-start;
}

html[dir="ltr"] .market-analysis-dashboard .chat-message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

html[dir="rtl"] .market-analysis-dashboard .chat-message.ai {
  flex-direction: row;
  justify-content: flex-start;
}

html[dir="rtl"] .market-analysis-dashboard .chat-message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.market-analysis-dashboard .chat-message.user {
  justify-content: flex-end;
}

.market-analysis-dashboard .chat-message .msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.market-analysis-dashboard .chat-message.ai .msg-avatar {
  background: #fff;
  color: #a7803d;
}

.market-analysis-dashboard .chat-message.user .msg-avatar {
  background: #1e293b;
  color: #ffffff;
}

.market-analysis-dashboard .chat-message .msg-bubble {
  padding: 16px 24px;
  border-radius: 20px;
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 85%;
  position: relative;
  transition: all 0.2s ease;
  text-align: start;
}

.market-analysis-dashboard .chat-message.ai .msg-bubble {
  background: #ffffff;
  color: #334155;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  border-radius: 20px;
}

.market-analysis-dashboard .chat-message.user .msg-bubble {
  background: #1e293b;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(30, 41, 59, 0.1);
  border-radius: 20px;
}

html[dir="ltr"] .market-analysis-dashboard .chat-message.ai .msg-bubble {
  border-bottom-left-radius: 4px;
}

html[dir="ltr"] .market-analysis-dashboard .chat-message.user .msg-bubble {
  border-bottom-right-radius: 4px;
}

html[dir="rtl"] .market-analysis-dashboard .chat-message.ai .msg-bubble {
  border-bottom-right-radius: 4px;
}

html[dir="rtl"] .market-analysis-dashboard .chat-message.user .msg-bubble {
  border-bottom-left-radius: 4px;
}

.market-analysis-dashboard .msg-bubble.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 16px 20px;
}

.market-analysis-dashboard .ai-chat-input-area {
  padding: 30px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 20px;
  align-items: center;
  direction: ltr;
}

html[dir="rtl"] .market-analysis-dashboard .ai-chat-input-area {
  direction: rtl;
}

.market-analysis-dashboard .ai-chat-input-area input {
  flex: 1;
  padding: 18px 28px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
  color: #1e293b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  text-align: start;
  height: 58px !important;
}

html[dir="rtl"] .market-analysis-dashboard .ai-chat-input-area input {
  direction: rtl;
}

.market-analysis-dashboard .ai-chat-input-area input:focus {
  border-color: #a7803d;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgb(227 226 225);
}

.market-analysis-dashboard .ai-chat-input-area button {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #a7803d;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgb(167,128,61, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .market-analysis-dashboard .ai-chat-input-area button .fa-paper-plane {
  transform: scaleX(-1);
}

.market-analysis-dashboard .ai-chat-input-area button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 24px rgba(167, 128, 61, 0.4);
  background: #a7803d;
}

.market-analysis-dashboard .typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.market-analysis-dashboard .typing-dot:nth-child(1) { animation-delay: -0.32s; }
.market-analysis-dashboard .typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40%           { transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .market-analysis-dashboard .ai-chat-container {
    margin: 0;
    border-radius: 0;
    height: 100vh;
    max-width: 100%;
    border: none;
  }
  .market-analysis-dashboard .ai-chat-header    { padding: 20px; }
  .market-analysis-dashboard .ai-chat-messages  { padding: 20px; }
  .market-analysis-dashboard .chat-message .msg-bubble {
    max-width: 90%;
    padding: 14px 18px;
    font-size: 0.7rem;
  }
  .market-analysis-dashboard .ai-chat-input-area {
    padding: 20px;
    padding-bottom: 30px;
  }
}

/* ==============================================
   Generic (unscoped) base styles
   ============================================== */

.ai-chat-messages { scroll-behavior: smooth; }

.msg-bubble.table-view {
  width: 100% !important;
  max-width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  color: #334155 !important;
  padding: 15px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 12px !important;
}

.msg-bubble.highlighted-view {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 20px !important;
  position: relative;
  overflow: hidden;
  border-radius: 12px !important;
}

.msg-bubble.highlighted-view::before { display: none !important; }

.msg-bubble.highlighted-view .highlight,
.msg-bubble.list-view .highlight,
.chat-message.ai .highlight {
  background: transparent !important;
  color: #059669 !important;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
  border-bottom: none;
}

.msg-bubble.list-view {
  background: #ffffff !important;
  border: none !important;
  color: #334155 !important;
  padding: 10px 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

.ai-list-container {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 20px;
  text-align: start;
}

.ai-list-container ul { padding-inline-start: 20px; margin: 0; }
.ai-list-container li { margin-bottom: 8px; }

.ai-card-container { display: flex; flex-direction: column; gap: 12px; padding: 8px; }

.ai-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.ai-card-header { font-weight: 600; font-size: 16px; margin-bottom: 10px; color: #0f172a; }
.ai-followup    { margin-top: 12px; padding: 10px; background: #f1f5f9; border-radius: 8px; color: #334155; }
.ai-card-title  { font-weight: 600; margin-bottom: 6px; color: #1e293b; }

.ai-card-row, .ai-card-title, .ai-card-price {
  display: flex; align-items: center; gap: 6px; color: #475569; margin-bottom: 4px;
}

.ai-card-title    svg { color: #2563eb; }
.ai-card-location svg { color: #ef4444; }
.ai-card-store    svg { color: #f59e0b; }
.ai-card-price    svg { color: #16a34a; }

/* Typing dots (unscoped) */
.typing-dot {
  width: 6px; height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Chat bubble inner table (markdown tables) */
.chat-message.ai .msg-bubble p  { margin: 0; font-size: 0.88rem; }

.chat-message.ai .msg-bubble table {
  width: 100%; min-width: 500px;
  border-collapse: collapse;
  background: white; border-radius: 8px; overflow: hidden;
}

.chat-message.ai .msg-bubble th {
  background: #eef2f7; font-weight: 600;
  padding: 10px; border-bottom: 1px solid #ddd; text-align: start;
}

.chat-message.ai .msg-bubble td { padding: 10px; border-bottom: 1px solid #eee; text-align: start; }
.chat-message.ai .msg-bubble tr:nth-child(even) { background: #fafafa; }
.chat-message.ai .msg-bubble tr:hover { background: #f1f5f9; }
.chat-message.ai .msg-bubble hr { border: none; border-top: 1px solid #ddd; margin: 12px 0; }

/* ==============================================
   Comparison Table (Store vs Store legacy pivot)
   ============================================== */
.comparison-table-wrapper {
  overflow-x: auto; margin-top: 10px;
  border-radius: 10px; border: 1px solid #e2e8f0;
}

.ai-bubble .ai-comparison-table {
  width: 100%; border-collapse: collapse; font-size: 0.7rem; background: #ffffff;
}

.ai-bubble .ai-comparison-table thead tr { border-bottom: 2px solid #e2e8f0; }

.ai-bubble .ai-comparison-table thead th:first-child {
  background: #f8fafc; color: #1e293b; text-align: start;
  padding: 12px 16px; font-weight: 700; white-space: nowrap;
  border-inline-end: 1px solid #e2e8f0;
}

.ai-bubble .ai-comparison-table thead th:nth-child(2) {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8; text-align: center; padding: 12px 16px;
  font-weight: 700; white-space: nowrap; border-right: 1px solid #e2e8f0;
}

.ai-bubble .ai-comparison-table thead th:nth-child(3) {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #6d28d9; text-align: center; padding: 12px 16px;
  font-weight: 700; white-space: nowrap; border-right: 1px solid #e2e8f0;
}

.ai-bubble .ai-comparison-table thead th:nth-child(4) {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  color: #c2410c; text-align: center; padding: 12px 16px;
  font-weight: 700; white-space: nowrap;
}

.ai-bubble .ai-comparison-table td {
  padding: 11px 16px; border-bottom: 1px solid #f1f5f9;
  text-align: center; color: #475569; white-space: nowrap;
}

.ai-bubble .ai-comparison-table td:first-child {
  text-align: start; font-weight: 600; color: #1e293b;
  border-inline-end: 1px solid #e2e8f0; background: #fafafa;
}

.ai-bubble .ai-comparison-table tbody tr:last-child td { border-bottom: none; }
.ai-bubble .ai-comparison-table tbody tr:hover td              { background: #f8fafc; }
.ai-bubble .ai-comparison-table tbody tr:hover td:first-child  { background: #f1f5f9; }

.ai-bubble .ai-comparison-table td.price-cheapest {
  color: #065f46 !important; font-weight: 700;
  background: #d1fae5 !important; position: relative;
}

.ai-bubble .ai-comparison-table td.price-cheapest::after {
  content: " \2713"; font-size: 0.75rem; color: #059669;
}

.ai-bubble .ai-comparison-table td.price-priciest {
  color: #991b1b !important; font-weight: 600; background: #fee2e2 !important;
}

.ai-bubble .ai-comparison-table td:last-child {
  font-weight: inherit; color: inherit; white-space: nowrap;
}

/* ==============================================
   Cheapest card
   ============================================== */
.ai-cheapest-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #ffffff; border: 1px solid #e6fffa;
  padding: 14px 16px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.04);
}
.ai-cheapest-card .cheapest-product { font-weight: 700; font-size: 1rem; color: #0f172a; }
.ai-cheapest-card .cheapest-meta    { font-size: 0.8rem; color: #475569; }
.ai-cheapest-card .cheapest-price   { margin-top: 6px; font-weight: 800; color: #065f46; font-size: 1.05rem; }

@media (max-width: 768px) {
  .ai-cheapest-card { padding: 12px; }
  .ai-cheapest-card .cheapest-product { font-size: 0.95rem; }
  .ai-cheapest-card .cheapest-price   { font-size: 1rem; }
}

/* Intent-specific table wrappers */
.ai-table-responsive.intent-GET_CHEAPEST  { max-width: 560px; margin: 8px 0; }
.ai-table-responsive.intent-COMPARE_STORES {
  border-radius: 8px; border: 1px solid #eef2ff; padding: 6px; background: #ffffff;
}

/* ==============================================
   Follow-up suggestion bubble
   ============================================== */
.market-analysis-dashboard .follow-up-bubble {
  background: #f0f4ff; border: 1px solid #c7d7fa;
  border-radius: 14px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px; max-width: 460px;
}
.market-analysis-dashboard .follow-up-text   { font-size: 0.93rem; color: #334155; line-height: 1.5; }
.market-analysis-dashboard .follow-up-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.market-analysis-dashboard .follow-up-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 10px; border-radius: 20px;
  font-size: 0.88rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid #c7d7fa; background: #fff; color: #334155;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.market-analysis-dashboard .follow-up-btn:hover {
  background: #4f46e5; border-color: #4f46e5; color: #fff;
}
.market-analysis-dashboard .option-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #4f46e5; color: #fff; font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.market-analysis-dashboard .follow-up-btn:hover .option-key { background: #fff; color: #4f46e5; }
.market-analysis-dashboard .option-label  { font-size: 0.87rem; }
.market-analysis-dashboard .follow-up-btn:disabled { opacity: 0.5; cursor: default; }

html[dir="rtl"] .market-analysis-dashboard .follow-up-actions { direction: rtl; }
html[dir="rtl"] .market-analysis-dashboard .follow-up-btn { flex-direction: row-reverse; padding: 7px 10px 7px 16px; }
.market-analysis-dashboard .msg-bubble.rtl .follow-up-actions { direction: rtl; }
.market-analysis-dashboard .msg-bubble.rtl .follow-up-btn { flex-direction: row-reverse; padding: 7px 10px 7px 16px; }

@media (max-width: 640px) {
  .market-analysis-dashboard .ai-chat-messages .msg-avatar { display: none; }
}

/* ==============================================
   Narrative Response Layout
   ============================================== */
.market-analysis-dashboard .narrative-main-line {
  font-size: 0.92rem; color: #1e293b; line-height: 1.8; margin-bottom: 12px;
}
.market-analysis-dashboard .narrative-main-line strong { font-weight: 700; color: #0f172a; }

.market-analysis-dashboard .narrative-price {
  display: inline-block; background: #d1fae5; color: #065f46;
  font-weight: 700; font-size: 0.92rem; padding: 2px 10px; border-radius: 20px;
}

.market-analysis-dashboard .narrative-price-expensive {
  display: inline-block; background: #fee2e2; color: #991b1b;
  font-weight: 700; font-size: 0.92rem; padding: 2px 10px; border-radius: 20px;
}

.market-analysis-dashboard .narrative-tip-box {
  background: #fffbeb; border-left: 3px solid #f59e0b;
  border-radius: 8px; padding: 10px 14px; margin: 10px 0 14px;
  font-size: 0.85rem; color: #78350f; line-height: 1.6;
}
html[dir="rtl"] .market-analysis-dashboard .narrative-tip-box {
  border-left: none; border-right: 3px solid #f59e0b;
}
.market-analysis-dashboard .narrative-tip-box strong { color: #92400e; }

.market-analysis-dashboard .table-toggle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 12px; padding: 5px 14px;
  font-size: 0.75rem; font-weight: 500; color: #a7803d;
  background: transparent; border: 1.5px solid #a7803d;
  border-radius: 20px; cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.market-analysis-dashboard .table-toggle-btn:hover { background: #a7803d; color: #ffffff; }
.market-analysis-dashboard .table-toggle-content   { margin-top: 8px; overflow-x: auto; }

/* ==============================================
   Suggestion Chips
   ============================================== */
.market-analysis-dashboard .suggestion-chips-label {
  font-size: 0.68rem; font-weight: 600; color: #94a3b8;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px; margin-top: 12px;
}

.market-analysis-dashboard .suggestion-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px;
}

.market-analysis-dashboard .suggestion-chip {
  padding: 5px 14px; font-size: 0.75rem; font-weight: 500;
  color: #334155; background: #f1f5f9; border: 1px solid #cbd5e1;
  border-radius: 20px; cursor: pointer; white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.market-analysis-dashboard .suggestion-chip:hover {
  background: #1e293b; border-color: #1e293b; color: #ffffff;
}

html[dir="rtl"] .market-analysis-dashboard .suggestion-chips { direction: rtl; }

@media (max-width: 640px) {
  .market-analysis-dashboard .suggestion-chip { font-size: 0.72rem; padding: 5px 11px; }
}

/* ==============================================
   Price Pills
   ============================================== */
.price-pill-green {
  display: inline-block;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46; font-weight: 700; font-size: 0.78rem;
  padding: 3px 12px; border-radius: 20px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(6,95,70,0.15);
}

.price-pill-red {
  display: inline-block;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b; font-weight: 700; font-size: 0.78rem;
  padding: 3px 12px; border-radius: 20px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(153,27,27,0.15);
}

/* ==============================================
   AI Response Table  (single authoritative block)
   ============================================== */

/* Wrapper */
.market-analysis-dashboard .ai-table-responsive {
  border-radius: 16px;
  overflow: hidden;
  border: 0.5px solid #cbd5e1;
  margin-top: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.market-analysis-dashboard .table-toggle-content .ai-table-responsive { overflow-x: auto; }

/* Table base */
.market-analysis-dashboard .ai-response-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

/* Header — light blue with white text */
.market-analysis-dashboard .ai-response-table thead {
  background: #2563eb;
}

.market-analysis-dashboard .ai-response-table thead th {
  padding: 13px 16px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000000;
  text-align: start;
  white-space: nowrap;
  border-right: 0.5px solid rgba(255,255,255,0.2);
  border-bottom: none;
  background: transparent;
}

.market-analysis-dashboard .ai-response-table thead th:last-child { border-right: none; }

/* Body rows */
.market-analysis-dashboard .ai-response-table tbody tr {
  border-bottom: 0.5px solid #f1f5f9;
  transition: background 0.12s;
}

.market-analysis-dashboard .ai-response-table tbody tr:nth-child(odd)  { background: #ffffff; }
.market-analysis-dashboard .ai-response-table tbody tr:nth-child(even) { background: #f0f7ff; }
.market-analysis-dashboard .ai-response-table tbody tr:last-child       { border-bottom: none; }
.market-analysis-dashboard .ai-response-table tbody tr:hover            { background: #dbeafe !important; }

/* Cells */
.market-analysis-dashboard .ai-response-table tbody td {
  padding: 11px 16px;
  font-size: 0.78rem;
  color: #374151;
  text-align: start;
  vertical-align: middle;
  border-right: 0.5px solid #f1f5f9;
  border-bottom: none;
}

.market-analysis-dashboard .ai-response-table tbody td:last-child  { border-right: none; }
.market-analysis-dashboard .ai-response-table tbody td:first-child  { font-weight: 600; color: #1e293b; }

/* Price pill green tint inside cells */
.market-analysis-dashboard .ai-response-table td[style*="white-space:nowrap"] {
  font-weight: 600;
  color: #065f46;
}

/* N/A cells */
.market-analysis-dashboard .ai-response-table tbody td:empty,
.market-analysis-dashboard .ai-response-table tbody td.na-cell {
  color: #cbd5e1; font-style: italic; font-size: 0.72rem;
}

/* Basket table star badge on first store row */
.market-analysis-dashboard .ai-response-table.basket-table tbody tr:first-child td:first-child::before {
  content: "\1F3C6 "; font-size: 0.8rem;
}

@media (max-width: 640px) {
  .market-analysis-dashboard .ai-response-table thead th,
  .market-analysis-dashboard .ai-response-table tbody td {
    padding: 9px 10px; font-size: 0.72rem;
  }
}

/* ==============================================
   Welcome Message Bubble
   ============================================== */
.market-analysis-dashboard .welcome-bubble {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 3px solid #a7803d !important;
  padding: 18px 22px !important;
  max-width: 92% !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
}

html[dir="rtl"] .market-analysis-dashboard .welcome-bubble {
  border-left: none !important; border-right: 3px solid #a7803d !important;
}

.market-analysis-dashboard .welcome-greeting   { font-size: 1.08rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.market-analysis-dashboard .welcome-intro      { font-size: 0.82rem; color: #475569; line-height: 1.6; margin-bottom: 14px; }
.market-analysis-dashboard .welcome-cap-label  { font-size: 0.70rem; font-weight: 600; color: #94a3b8; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.market-analysis-dashboard .welcome-caps       { margin-bottom: 14px; }

.market-analysis-dashboard .welcome-cap-item {
  font-size: 0.80rem; color: #334155;
  padding: 5px 0; border-bottom: 0.5px solid #f1f5f9; line-height: 1.5;
}
.market-analysis-dashboard .welcome-cap-item:last-child { border-bottom: none; }
.market-analysis-dashboard .welcome-cap-item em         { font-style: normal; color: #a7803d; font-weight: 500; }
.market-analysis-dashboard .welcome-quick               { margin-top: 12px; }

/* ==============================================
   Not-found guide chips + UC8 basket trigger
   ============================================== */
.market-analysis-dashboard .not-found-guide-bubble {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 3px solid #f59e0b !important;
  padding: 14px 18px !important;
  max-width: 96% !important;
}

html[dir="rtl"] .market-analysis-dashboard .not-found-guide-bubble {
  border-left: none !important; border-right: 3px solid #f59e0b !important;
}

.market-analysis-dashboard .not-found-guide-text {
  font-size: 0.86rem; color: #374151; margin-bottom: 12px; line-height: 1.6;
}

.market-analysis-dashboard .not-found-guide-label {
  font-size: 0.68rem; font-weight: 600; color: #94a3b8;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px;
}

.market-analysis-dashboard .not-found-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.market-analysis-dashboard .not-found-chip {
  padding: 5px 13px; font-size: 0.78rem; font-weight: 500;
  color: #1e293b; background: #ffffff; border: 1.5px solid #cbd5e1;
  border-radius: 20px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.market-analysis-dashboard .not-found-chip:hover {
  background: #1e293b; border-color: #1e293b; color: #ffffff;
}

/* UC8 basket trigger */
.market-analysis-dashboard .basket-trigger-bubble {
  background: #fffbeb !important;
  border: 1.5px solid #f59e0b !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  max-width: 92% !important;
  display: flex; flex-direction: column; gap: 10px;
}

.market-analysis-dashboard .basket-trigger-text { font-size: 0.88rem; color: #78350f; line-height: 1.5; }

.market-analysis-dashboard .basket-trigger-btn {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; font-size: 0.82rem; font-weight: 600;
  color: #ffffff; background: #a7803d; border: none;
  border-radius: 20px; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.market-analysis-dashboard .basket-trigger-btn:hover    { background: #92400e; transform: translateY(-1px); }
.market-analysis-dashboard .basket-trigger-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* ==============================================
   Category drill-down chips
   ============================================== */
.market-analysis-dashboard .drill-chips-bubble {
  background: #f0f4ff !important;
  border: 1px solid #c7d7fa !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  max-width: 96% !important;
}

.market-analysis-dashboard .drill-chips-label { font-size: 0.82rem; font-weight: 600; color: #334155; margin-bottom: 10px; }
.market-analysis-dashboard .drill-chips-row   { display: flex; flex-wrap: wrap; gap: 8px; }

.market-analysis-dashboard .drill-chip {
  padding: 7px 16px; font-size: 0.80rem; font-weight: 500;
  color: #1e293b; background: #ffffff; border: 1.5px solid #c7d7fa;
  border-radius: 20px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.market-analysis-dashboard .drill-chip:hover {
  background: #4f46e5; border-color: #4f46e5; color: #ffffff; transform: translateY(-1px);
}
.market-analysis-dashboard .drill-chip:disabled { opacity: 0.45; cursor: default; transform: none; }

html[dir="rtl"] .market-analysis-dashboard .drill-chips-row { direction: rtl; }