/* ==========================================================================
   LOCUS-SF BUSINESS MATCH & SPATIAL RECOMMENDATION ENGINE
   Apple Executive Light Mode Specification
   ========================================================================== */

.business-match-panel {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  padding: 28px 32px;
  margin: 28px 0;
  overflow: hidden;
}

.business-match-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.business-match-head h3 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.business-match-desc {
  margin: 0;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 680px;
}

.business-match-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.business-match-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.business-match-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.business-match-card.is-top-match {
  background: #ffffff;
  border: 1.5px solid #10b981;
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.12), 0 2px 6px rgba(0, 0, 0, 0.02);
}

.business-match-card.is-top-match:hover {
  border-color: #059669;
  box-shadow: 0 14px 34px -6px rgba(16, 185, 129, 0.18);
}

/* Card Header */
.bm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.bm-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 9999px;
}

.business-match-card.is-top-match .bm-rank-pill {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.bm-score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.bm-score-badge strong {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Title & Category */
.bm-title-group {
  margin-bottom: 10px;
}

.bm-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.bm-category-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 650;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bm-description {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #475569;
  flex: none;
}

/* Metrics Strip */
.bm-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 16px;
}

.business-match-card.is-top-match .bm-metrics-strip {
  background: #f8fafc;
}

.bm-metric {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bm-metric-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.bm-metric-val {
  font-size: 11.5px;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.bm-metric-val.text-emerald {
  color: #059669;
}

/* Key Reasons Cluster */
.bm-reasons-cluster {
  flex: 1;
  margin-bottom: 18px;
}

.bm-reasons-title {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 8px;
}

.bm-reasons-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bm-reasons-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
}

.bm-check-icon {
  width: 14px;
  height: 14px;
  color: #10b981;
  flex: none;
  margin-top: 2px;
}

/* Card Footer */
.bm-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.bm-regulatory-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.35;
}

.bm-regulatory-pill svg {
  color: #0284c7;
  flex: none;
}

.bm-simulate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  background: #0071e3;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.bm-simulate-btn:hover {
  background: #0077ed;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.bm-simulate-btn:active {
  background: #005bb5;
  transform: translateY(1px);
}

/* Responsive Stacking */
@media (max-width: 1024px) {
  .business-match-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Compact Explorer Card Business Match Chip */
.dossier-business-match-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 8px;
  font-size: 11.5px;
}

.bm-chip-badge {
  font-size: 9px;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bm-chip-name {
  font-weight: 700;
  color: #0f172a;
  flex: 1;
}

.bm-chip-score {
  font-weight: 800;
  color: #059669;
  font-variant-numeric: tabular-nums;
}
