/* ── KalpSetu Chat Cards — A3-V2 Response UI (Cream Theme) ──────────────── */

/* ── Outer wrapper ─────────────────────────────────────────────────────────── */
.a3-wrap {
  width: 100%;
  max-width: 680px;
  border: 1px solid rgba(232,144,24,0.2);
  border-radius: 14px;
  overflow: hidden;
  background: white;
  box-shadow: 0 8px 32px rgba(15,33,56,0.12);
}

/* ── Score banner (stays dark — only dark element) ─────────────────────────── */
.a3-score-banner {
  background: #0F2138;
  border-bottom: 1px solid #1a3050;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.a3-score-left { display: flex; flex-direction: column; gap: 2px; }
.a3-score-eye {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241,230,200,0.4);
}
.a3-score-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.a3-score-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.a3-gauge-wrap { position: relative; display: inline-block; }
.a3-score-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.a3-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid #1a3050;
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 48px;
}
.a3-pill-lbl {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(241,230,200,0.35);
}
.a3-pill-val {
  font-size: 12px;
  font-weight: 700;
  color: rgba(241,230,200,0.55);
}

/* ── Query strip ───────────────────────────────────────────────────────────── */
.a3-query-strip {
  background: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.a3-query-txt {
  font-size: 12px;
  font-weight: 600;
  color: #1a2640;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}
.a3-query-meta {
  font-size: 10px;
  color: #4a6080;
  white-space: nowrap;
  flex-shrink: 0;
}
.a3-bar-track {
  height: 3px;
  background: rgba(15,33,56,0.04);
}
.a3-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #E89018);
  transition: width 0.5s ease;
}

/* ── Body ──────────────────────────────────────────────────────────────────── */
.a3-body {
  background: #FAF1E4;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Correlated signal ─────────────────────────────────────────────────────── */
.a3-corr {
  background: rgba(232,144,24,0.06);
  border: 1px solid rgba(232,144,24,0.18);
  border-left: 3px solid #E89018;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
}
.a3-corr-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #E89018;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.a3-corr-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E89018;
  animation: a3-corr-pulse 1.5s infinite;
  flex-shrink: 0;
}
@keyframes a3-corr-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}
.a3-corr-txt { font-size: 12px; color: #1a2640; line-height: 1.4; }
.a3-corr-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.a3-corr-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(232,144,24,0.12); border: 1px solid rgba(232,144,24,0.25);
  color: #E89018; border-radius: 4px; padding: 2px 6px;
}

/* ── No buyers ─────────────────────────────────────────────────────────────── */
.a3-no-buyers {
  font-size: 12px; color: #4a6080; font-style: italic;
  text-align: center; padding: 16px 0;
}

/* ── Buyers section ────────────────────────────────────────────────────────── */
.a3-buyers-wrap {
  background: white;
  border: 1px solid rgba(15,33,56,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.a3-buyers-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 6px;
  border-bottom: 1px solid rgba(15,33,56,0.06);
}
.a3-buyers-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #4a6080;
}
.a3-buyers-div {
  height: 1px; background: rgba(15,33,56,0.06); margin: 0 12px;
}
.a3-buyer-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid rgba(15,33,56,0.04);
  transition: background 0.15s, border-left 0.15s, padding-left 0.15s;
}
.a3-buyer-row:last-child { border-bottom: none; }
.a3-buyer-row:hover {
  background: rgba(232,144,24,0.04);
  border-left: 3px solid #E89018;
  padding-left: 9px;
}
.a3-buyer-info { flex: 1; min-width: 0; }
.a3-buyer-name {
  font-size: 12px; font-weight: 600; color: #1a2640;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.a3-buyer-meta { font-size: 10px; color: #4a6080; line-height: 1.3; }
.a3-buyer-note { font-size: 10px; color: rgba(74,96,128,0.7); margin-top: 2px; }
.a3-buyer-actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.a3-sc-chip {
  font-size: 10px; font-weight: 800; border-radius: 5px;
  padding: 2px 6px; letter-spacing: 0.02em;
}
.a3-act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; text-decoration: none;
  font-size: 14px; transition: background 0.15s; flex-shrink: 0;
}
.a3-wa   { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); }
.a3-wa:hover { background: rgba(34,197,94,0.2); }
.a3-mail { background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.25); color: #60a5fa; }
.a3-mail:hover { background: rgba(96,165,250,0.2); }
.a3-locked {
  font-size: 10px; font-weight: 600; color: #f59e0b;
  background: rgba(245,158,11,0.07); border: 1px dashed rgba(245,158,11,0.25);
  border-radius: 4px; padding: 2px 7px; cursor: pointer;
}
.a3-locked:hover { background: rgba(245,158,11,0.15); }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.a3-bdg {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 4px; padding: 2px 6px;
}
.a3-bdg-verified { background: rgba(74,222,128,0.12); color: #1a9c4a; border: 1px solid rgba(74,222,128,0.3); }
.a3-bdg-live     { background: rgba(96,165,250,0.12); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.a3-bdg-go4wb    { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }

/* ── Market row ────────────────────────────────────────────────────────────── */
.a3-market-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}
.a3-mkt-col {
  background: #F5E8D0;
  border: 1px solid rgba(15,33,56,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s;
}
.a3-mkt-col:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(15,33,56,0.12); }
.a3-mkt-val {
  font-size: 15px; font-weight: 700; color: #0F2138;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a3-mkt-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #4a6080; margin-top: 2px;
}
.a3-mkt-sub { font-size: 10px; color: rgba(74,96,128,0.7); margin-top: 2px; }

/* ── Extra prices ──────────────────────────────────────────────────────────── */
.a3-prices {
  background: #F5E8D0; border: 1px solid rgba(15,33,56,0.08); border-radius: 8px;
  padding: 6px 12px;
}
.a3-price-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid rgba(15,33,56,0.04);
}
.a3-price-row:last-child { border-bottom: none; }
.a3-price-com { font-size: 11px; color: #1a2640; }
.a3-price-mkt { font-size: 10px; color: #4a6080; }
.a3-price-val { font-size: 12px; font-weight: 700; color: #1a9c4a; }

/* ── Next Move + Compliance ────────────────────────────────────────────────── */
.a3-next-move {
  background: rgba(26,156,74,0.04);
  border: 1px solid rgba(26,156,74,0.15);
  border-left: 3px solid #1a9c4a;
  border-radius: 0 10px 10px 0;
  padding: 10px 12px;
}
.a3-next-lbl {
  font-size: 9px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: #1a9c4a; margin-bottom: 4px;
}
.a3-next-txt { font-size: 12px; color: #1a2640; line-height: 1.4; margin-bottom: 8px; }
.a3-comp-list { display: flex; flex-direction: column; gap: 5px; }
.a3-comp-row { display: flex; align-items: flex-start; gap: 7px; }
.a3-comp-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; }
.a3-dc-crit   { background: #ef4444; }
.a3-dc-ok     { background: #22c55e; }
.a3-dc-verify { background: #f59e0b; }
.a3-comp-txt    { font-size: 11px; color: #1a2640; line-height: 1.4; }
.a3-comp-action { font-size: 10px; color: #4a6080; margin-top: 1px; }

/* ── Inventory panel ───────────────────────────────────────────────────────── */
.a3-inv-panel {
  background: #F5E8D0; border: 1px solid rgba(15,33,56,0.08);
  border-left: 3px solid #1a9c4a; border-radius: 0 8px 8px 0;
}

/* ── Find More Buyers + shortlist (Task 4) ─────────────────────────────────── */
.a3-findmore-wrap {
  background: white;
  border: 1px solid rgba(15,33,56,0.1);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.a3-filter-block {
  flex-direction: column;
  gap: 8px;
  background: #F5E8D0;
  border: 1px solid rgba(15,33,56,0.08);
  border-radius: 8px;
  padding: 10px;
}
.a3-filter-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #4a6080;
}
.a3-filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.a3-filter-input {
  flex: 1; min-width: 120px;
  padding: 7px 10px;
  border: 1px solid rgba(15,33,56,0.15);
  border-radius: 7px;
  background: white;
  font-size: 12px;
  color: #1a2640;
  font-family: inherit;
}
.a3-filter-input:focus { outline: none; border-color: #E89018; }
.a3-filter-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.a3-filter-opt {
  padding: 5px 12px;
  border: 1px solid rgba(15,33,56,0.15);
  border-radius: 14px;
  background: white;
  color: #4a6080;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.a3-filter-opt:hover { border-color: #E89018; color: #E89018; }
.a3-filter-opt.sel { background: #E89018; border-color: #E89018; color: white; }

.a3-findmore-row { display: flex; gap: 8px; flex-wrap: wrap; }
.a3-findmore-btn {
  flex: 1; min-width: 140px;
  padding: 10px;
  background: white;
  border: 1px solid #E89018;
  border-radius: 8px;
  font-size: 12px; font-weight: 700; color: #E89018;
  cursor: pointer; transition: all 0.15s;
}
.a3-findmore-btn:hover { background: rgba(232,144,24,0.08); }
.a3-findmore-btn:disabled { opacity: 0.5; cursor: default; }

.a3-add-selected-btn {
  flex: 1; min-width: 140px;
  padding: 10px;
  background: #1a9c4a;
  border: none;
  border-radius: 8px;
  font-size: 12px; font-weight: 700; color: white;
  cursor: pointer; transition: all 0.15s;
}
.a3-add-selected-btn:hover:not(:disabled) { background: #158040; }
.a3-add-selected-btn:disabled { background: rgba(15,33,56,0.12); color: rgba(15,33,56,0.35); cursor: default; }

.a3-findmore-results { display: flex; flex-direction: column; }
.a3-buyer-row-fresh {
  align-items: center;
  gap: 8px;
  background: rgba(74,222,128,0.04);
}
.a3-buyer-check { width: 16px; height: 16px; flex-shrink: 0; accent-color: #E89018; cursor: pointer; }
.a3-new-badge {
  font-size: 8px; font-weight: 800; letter-spacing: 0.05em;
  background: rgba(74,222,128,0.15); color: #1a9c4a;
  border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle;
}

/* ── Start This Trade ──────────────────────────────────────────────────────── */
.a3-trade-wrap { background: white; padding: 12px; border-top: 1px solid rgba(15,33,56,0.06); }
.a3-trade-btn {
  width: 100%; padding: 13px;
  background: #E89018; border: none; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: white;
  cursor: pointer; letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(232,144,24,0.35);
  transition: all 0.2s;
}
.a3-trade-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(232,144,24,0.4); }

/* ── A3-V2 Loading skeleton ────────────────────────────────────────────────── */
.ks-skel {
  background: rgba(15,33,56,0.06);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.ks-skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(15,33,56,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: ks-shimmer 1.6s infinite;
}
@keyframes ks-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.a3-skel-banner {
  background: #0F2138;
  border-bottom: 1px solid #1a3050;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.a3-skel-score-num { width: 60px; height: 40px; }
.a3-skel-pills { display: flex; gap: 6px; }
.a3-skel-pill { width: 48px; height: 36px; }
.a3-skel-strip { height: 34px; margin: 0; border-radius: 0; }
.a3-skel-body {
  background: transparent; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.a3-skel-buyers { height: 120px; }
.a3-skel-mkt-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.a3-skel-mkt { height: 60px; }
.a3-skel-next { height: 70px; }

/* ── Keep old .ks-skeleton-grid classes non-breaking ──────────────────────── */
.ks-skeleton-grid { display: none; }
.ks-skeleton-card { display: none; }

/* ── Mobile responsive ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .a3-score-banner { flex-direction: column; align-items: flex-start; }
  .a3-score-pills  { width: 100%; }
  .a3-market-row   { grid-template-columns: repeat(2, 1fr); }
  .a3-skel-mkt-row { grid-template-columns: repeat(2, 1fr); }
  .a3-buyer-name   { font-size: 11px; }
  .a3-score-num    { font-size: 32px; }
}
