/* Table Components */
.table-container {
  background-color: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}


.table__row {
  border-bottom: 1px solid var(--color-gray-100);
  transition: background-color var(--transition-fast);
}

.table__row:last-child {
  border-bottom: none;
}

.table__row:hover {
  background-color: var(--color-gray-50);
}

/* Table Cells */
.table__cell {
  padding: var(--spacing-md);
  text-align: left;
  vertical-align: middle;
}

.table__cell--header {
  font-weight: 600;
  color: var(--color-gray-700);
  white-space: nowrap;
}

.table__cell--center {
  text-align: center;
}

.table__cell--right {
  text-align: right;
}

.table__cell--actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

/* Table Status Badge */
.table__badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: var(--radius-md);
  text-transform: capitalize;
}

.table__badge--draft {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
}

.table__badge--active {
  background-color: #dcfce7;
  color: #166534;
}

.table__badge--archived {
  background-color: #fef3c7;
  color: #92400e;
}

.table__badge--info {
  background-color: #dbeafe;
  color: #1e40af;
}

.table__badge--warning {
  background-color: #fed7aa;
  color: #c2410c;
}

.table__badge--success {
  background-color: #dcfce7;
  color: #166534;
}

.table__badge--pending {
  background-color: #e5e7eb;
  color: #374151;
}

.table__badge--running {
  background-color: #ddd6fe;
  color: #5b21b6;
}

.table__badge--completed {
  background-color: #d1fae5;
  color: #065f46;
}

.table__badge--failed {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Empty State */
.table__empty {
  padding: var(--spacing-3xl) var(--spacing-xl);
  text-align: center;
  color: var(--color-gray-500);
}


.table__empty-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: var(--spacing-sm);
}

.table__empty-text {
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-lg);
}

/* Table empty state */
.table-empty {
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
  color: var(--color-gray-600);
}

/* Table text styles */
.table__primary {
  font-weight: 500;
  color: var(--color-gray-900);
}

.table__secondary {
  color: var(--color-gray-600);
  font-size: var(--font-size-sm);
}

.table__action {
  color: var(--color-primary-600);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.table__action:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

.table__link {
  color: var(--color-primary-600);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.table__link:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

.table__actions {
  text-align: right;
}

.table__actions-header {
  text-align: right;
}

/* Table metrics */
.table__metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.125rem;
}

.table__metric-value {
  font-weight: 500;
  color: var(--color-gray-900);
}

.table__metric-unit {
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
}

/* Compact table variant */
.table-container--compact {
  border: none;
  box-shadow: none;
  background: transparent;
}

.table-container--compact .table {
  margin: 0;
}

/* Simple table variant (no header) */
.table--simple tbody tr td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-gray-100);
}

.table--simple tbody tr:first-child td {
  padding-top: 0;
}

.table--simple tbody tr:last-child td {
  border-bottom: none;
  padding-bottom: 0;
}

/* Responsive Table */
@media (max-width: 768px) {
  .table-container {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .table {
    font-size: var(--font-size-xs);
  }
  
  .table__cell {
    padding: var(--spacing-sm);
  }
  
  .table__cell--hide-mobile {
    display: none;
  }
}