@use '@carbon/layout';
@use '@openmrs/esm-styleguide/src/vars' as *;
@use '@carbon/type';
@use '@carbon/colors';

// ------------Header styles----------------

.pageHeader {
  @include type.type-style('body-compact-02');
  height: layout.$spacing-12;
  display: flex;
  justify-content: space-between;
  padding: layout.$spacing-05;
  background: colors.$white-0;
  border-bottom: 1px solid colors.$gray-20;
}

.pageHeaderActions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: layout.$spacing-02;
}

.leftJustifiedItems {
  display: flex;
  flex-direction: row;
  align-items: center;
  cursor: pointer;
  align-items: center;
}

.pageLabels {
  margin: layout.$spacing-05;

  p:first-of-type {
    margin-bottom: layout.$spacing-02;
  }
}

.pageName {
  @include type.type-style('heading-04');
}

.icon {
  fill: $ui-05;
  margin: layout.$spacing-01;
}

//----------------- Filters styles-----------------
.filtersContainer {
  display: flex;
  flex: 1;
  flex-direction: row;
  justify-content: flex-end;
  gap: layout.$spacing-02;
  align-items: center;
  margin-bottom: layout.$spacing-05;
  padding: 0 layout.$spacing-05;
}

// ----------------Metrics styles -------------------

.metricsContainer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: layout.$spacing-05;
  padding: 0 layout.$spacing-05;
  margin-bottom: layout.$spacing-05;
}

.metricCard {
  position: relative;
  border: colors.$gray-20 solid 1px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: layout.$spacing-05;

  & > strong {
    color: colors.$gray-60;
  }
}

.metricValue {
  color: colors.$gray-80;
  margin-bottom: layout.$spacing-03;
  font-size: x-large;
}

// ------------- Data table styles --------------

.tableContainer {
  margin: 0 layout.$spacing-05;
  border: colors.$gray-20 solid 1px;
  padding: 0;
}

.link {
  text-decoration: none;
}
