.match-table-wrapper {
  margin: 1rem 0;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.export-buttons {
  display: flex;
  gap: 0.5rem;
}

.table-responsive {
  margin-bottom: 1rem;
  overflow-x: auto;
}

.table {
  margin-bottom: 0;
}

.table th {
  position: relative;
  padding-right: 1.5rem;
  cursor: pointer;
  user-select: none;
}

.table th:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.table th .ms-1 {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.table td {
  position: relative;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td:hover {
  white-space: normal;
  overflow: visible;
  z-index: 1;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.items-per-page {
  width: auto;
  min-width: 100px;
}

.pagination-info {
  flex: 1;
  text-align: center;
}

.pagination {
  margin: 0;
}

/* Confidence score styles */
.confidence-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.confidence-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: bold;
  font-size: 0.85rem;
  min-width: 2.5rem;
  text-align: center;
}

.confidence-high {
  background-color: #d4edda;
  color: #155724;
}

.confidence-medium {
  background-color: #fff3cd;
  color: #856404;
}

.confidence-low {
  background-color: #f8d7da;
  color: #721c24;
}

/* Match status section */
.match-status-section {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.match-status-section h6 {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.match-status-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.match-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-status-step {
  font-weight: 500;
  min-width: 4rem;
}

.match-status-empty {
  color: #6c757d;
  font-style: italic;
}

/* Status indicator styles */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-indicator.waiting {
  background-color: #e9ecef;
  color: #495057;
}

.status-indicator.busy {
  background-color: #cfe2ff;
  color: #0d6efd;
}

.status-indicator.done {
  background-color: #d1e7dd;
  color: #198754;
}

/* Match row hover styles */
.match-row {
  cursor: help;
}

.match-row:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Value difference styles */
.value-diff {
  color: #dc3545;
  font-weight: 500;
}

/* Tooltip styles */
.reasoning-tooltip {
  max-width: 300px !important;
  opacity: 0.95 !important;
}

.reasoning-tooltip .tooltip-inner {
  text-align: left;
  padding: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
}

/* Responsive styles */
@media (max-width: 768px) {
  .table-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .export-buttons {
    width: 100%;
    justify-content: center;
  }

  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .items-per-page {
    width: 100%;
  }

  .pagination {
    justify-content: center;
  }

  .confidence-score {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
  
  .reasoning-tooltip {
    max-width: 200px !important;
  }
}
