/* Match site font stack */
.unitrack-ag-grid {
  --ag-font-family: var(--atlas-font-sans, 'Inter', system-ui, sans-serif);
  --ag-font-size: 13px;

  /* Column separator lines in header */
  --ag-header-column-separator-display: block;
  --ag-header-column-separator-height: 50%;
  --ag-header-column-separator-color: var(--atlas-color-border-medium, #d0d3d9);
  --ag-header-column-separator-width: 1px;
}

/* Column lines in body cells */
.unitrack-ag-grid .ag-cell {
  border-right: 1px solid var(--atlas-color-border-subtle, #f0f1f3);
}

/* Last cell in a row doesn't need a trailing line */
.unitrack-ag-grid .ag-cell:last-child {
  border-right: none;
}

/* ── Invoice / Figma-matched bordered variant ──────────────────────────────── */
.unitrack-ag-grid--invoice-figma {
  --ag-header-background-color: #f8f9fb;
  --ag-background-color: #ffffff;
  --ag-odd-row-background-color: #ffffff;
  --ag-row-hover-color: rgba(248, 249, 251, 0.8);
  --ag-header-height: 48px;
  --ag-row-height: 55px;
  /* Suppress theme-drawn borders — custom cell borders handle all lines */
  --ag-border-color: transparent;
  --ag-row-border-color: transparent;
  --ag-header-column-separator-display: none;
  --ag-header-column-resize-handle-display: none;
}

.unitrack-ag-grid--invoice-figma .ag-root-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: none !important;
  box-shadow: none !important;
}

.unitrack-ag-grid--invoice-figma .ag-header {
  border-bottom: none;
}

.unitrack-ag-grid--invoice-figma .ag-header-cell {
  background-color: #f8f9fb;
  border-right: 1px solid var(--atlas-color-border-subtle, #f0f1f3);
  border-bottom: 1px solid var(--atlas-color-border-medium, #d0d3d9);
  padding: 0 20px;
}
.unitrack-ag-grid--invoice-figma .ag-header-cell:last-child {
  border-right: none;
}

.unitrack-ag-grid--invoice-figma .ag-header-cell-text {
  font-size: 14px;
  font-weight: 500;
  color: #667085;
  line-height: 20px;
}

.unitrack-ag-grid--invoice-figma .ag-cell {
  display: flex !important;
  align-items: center !important;
  border-right: 1px solid var(--atlas-color-border-subtle, #f0f1f3);
  border-bottom: 1px solid var(--atlas-color-border-subtle, #f0f1f3);
  padding: 0 20px;
  font-size: 16px;
  font-weight: 500;
  color: #48505e;
  line-height: 22px;
}
.unitrack-ag-grid--invoice-figma .ag-cell:last-child {
  border-right: none;
}
.unitrack-ag-grid--invoice-figma .ag-cell-wrapper {
  flex: 1;
  min-width: 0;
}

.unitrack-ag-grid--invoice-figma .ag-row-last .ag-cell {
  border-bottom: none;
}

