/* Shared screen density. Table-cell height is a minimum: wrapped text and
   controls may grow naturally, without clipping. Print keeps its own layout. */
@media screen {
  #root {
    --table-font-size: 10px;
    --table-row-height: 32px;
    --table-cell-padding-y: 4px;
    --table-line-height: 1.3;
  }

  /* Do not stretch short tables to the height of their surrounding panel. */
  #root table {
    height: auto;
    border-spacing: 0;
    line-height: var(--table-line-height);
  }

  #root table tr {
    height: var(--table-row-height);
  }

  #root table th,
  #root table td {
    box-sizing: border-box;
    height: var(--table-row-height);
    /* Also override legacy mobile/pricing padding shorthands. */
    padding-top: var(--table-cell-padding-y) !important;
    padding-bottom: var(--table-cell-padding-y) !important;
    line-height: var(--table-line-height);
    vertical-align: middle;
  }

  /* The cell supplies the vertical padding, not the sorting button too. */
  #root table .table-sort-button {
    min-height: 22px;
    height: auto;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: var(--table-line-height);
  }

  #root table .category-company-sales-margin {
    line-height: var(--table-line-height);
  }

  /* Grouped headers must follow actual height, not the former 36px offset. */
  #root .promotions-table thead { position: sticky; top: 0; z-index: 4; }
  #root .promotions-table thead th { position: static; top: auto; }
  #root .promotions-table thead .promotion-entity { position: sticky; left: 0; }
}
