/* PBS table row normalization v1.3.268 */
:root {
  --pbs-table-row-height: 32px;
  --pbs-table-control-height: 28px;
  --pbs-table-cell-padding-block: 2px;
}

/* Main tables and subtables: one exact outer row box. */
:is(#main-table, #fc-table, #facade-table,
    table.openings-table, table.room-table, table.room-subtable,
    table.subtable, table.segment-table, table.facade-table,
    table.fc-subtable, table.fc-room-table)
:is(thead,tbody,tfoot) > tr {
  height: var(--pbs-table-row-height) !important;
  min-height: var(--pbs-table-row-height) !important;
  max-height: var(--pbs-table-row-height) !important;
}

:is(#main-table, #fc-table, #facade-table,
    table.openings-table, table.room-table, table.room-subtable,
    table.subtable, table.segment-table, table.facade-table,
    table.fc-subtable, table.fc-room-table)
:is(thead,tbody,tfoot) > tr > :is(th,td) {
  height: var(--pbs-table-row-height) !important;
  min-height: var(--pbs-table-row-height) !important;
  max-height: var(--pbs-table-row-height) !important;
  padding-top: var(--pbs-table-cell-padding-block) !important;
  padding-bottom: var(--pbs-table-cell-padding-block) !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  line-height: normal !important;
}

/* Internal row content may fill, but never enlarge, the 28 px content box. */
:is(#main-table, #fc-table, #facade-table,
    table.openings-table, table.room-table, table.room-subtable,
    table.subtable, table.segment-table, table.facade-table,
    table.fc-subtable, table.fc-room-table)
:is(thead,tbody,tfoot) > tr > :is(th,td) > :is(div,span,label) {
  max-height: var(--pbs-table-control-height) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* Openings-specific wrappers previously added effective vertical size. */
#main-table.openings-zoned-table :is(.control-wrapper,.unit-input-wrapper,.openings-zone-middle-grid,.room-actions-cluster),
table.openings-table :is(.control-wrapper,.unit-input-wrapper,.opening-actions-cluster) {
  height: var(--pbs-table-control-height) !important;
  min-height: 0 !important;
  max-height: var(--pbs-table-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

/* Fire Compartments-specific display/editor wrappers previously carried min-height/padding. */
#fc-table.fc-zoned-table :is(.fc-main-center-grid,.fc-room-center-grid,.fc-right-actions,
  .fc-value-cell,.fc-room-summary,.height-display,.calc-value-display,
  .fc-inline-actions,.inline-action-wrap),
.room-table.room-table-zoned :is(.fc-room-center-grid,.fc-sub-right-actions,.fc-value-cell,.height-display,.calc-value-display) {
  height: var(--pbs-table-control-height) !important;
  min-height: 0 !important;
  max-height: var(--pbs-table-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

#fc-table.fc-zoned-table :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
.room-table.room-table-zoned :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  height: var(--pbs-table-control-height) !important;
  min-height: var(--pbs-table-control-height) !important;
  max-height: var(--pbs-table-control-height) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* Only main-table headers have rounded upper corners; subtable headers remain square. */
:is(table.openings-table, table.room-table, table.room-subtable, table.subtable,
    table.segment-table, table.facade-table, table.fc-subtable, table.fc-room-table)
> thead > tr:first-child > th:first-child {
  border-top-left-radius: 0 !important;
}
:is(table.openings-table, table.room-table, table.room-subtable, table.subtable,
    table.segment-table, table.facade-table, table.fc-subtable, table.fc-room-table)
> thead > tr:first-child > th:last-child {
  border-top-right-radius: 0 !important;
}

/* Disabled white assignment arrow: border follows the gray disabled glyph. */
#fc-table .icon-assign:disabled,
.room-table.room-table-zoned .icon-assign:disabled {
  border-color: currentColor !important;
}
