@use 'apps/dashboard/src/variables' as *;

$height-table-header: rhythm(8);
$height-pagination: rhythm(9);

.resource-table-header {
  background-color: $color-light-stronger;
  z-index: 1;

  .header-container {
    align-items: center;
    display: flex;
    gap: rhythm(1);
    height: $height-table-header;
  }

  .resource-bulk-actions {
    align-items: center;
    display: flex;
    font-weight: $font-weight-regular;
    gap: rhythm(1.5);
    padding-left: rhythm(0.5);
  }

  .selected-count {
    color: $color-neutral-regular;
  }

  .table-options {
    display: flex;
    gap: rhythm(1);
    margin-left: auto;
  }

  .selection-bar {
    align-items: center;
    background-color: $color-neutral-lightest;
    color: $color-neutral-regular;
    display: flex;
    gap: rhythm(1.5);
    height: rhythm(5);
    justify-content: center;
    margin-bottom: rhythm(1.5);
  }
}

.table-container {
  position: relative;
  // Always display pagination at the bottom, even when there are few results
  min-height: calc(
    100vh - var(--app-topbar-height) - var(--app-layout-padding-top) - #{$height-table-header} - #{$height-pagination} +
      rhythm(3)
  );
  .hidden-resource pa-table-cell ::ng-deep .pa-table-grid--cell {
    color: $color-neutral-regular;
  }
}

table {
  width: 100%;
}

.row-container {
  display: flex;
  gap: rhythm(0.5);
}

.classification-cell ::ng-deep .pa-table-grid--cell {
  overflow-x: auto;
}

.loading-shade {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: $z-index-modal-backdrop;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-results {
  color: $color-neutral-regular;
  padding: rhythm(4) 0;
  text-align: center;
}

stf-table-pagination {
  width: 100%;
}

.skeleton-table-rows {
  display: flex;
  flex-direction: column;
  gap: rhythm(0.5);
  padding: rhythm(1.5) 0;

  .skeleton-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: rhythm(2);
    padding: rhythm(1) 0;
    height: 3rem;
  }
}
