/* v1.3.231 — authoritative LEFT-zone sizing contract.
   One central value set is consumed by every main mode and nested left grid. */
:root {
  --pbs-left-number-min: 72px !important;
  --pbs-left-number-max: 112px !important;
  --pbs-left-name-min: 160px !important;
  --pbs-left-zone-gap: 3px !important;
  --pbs-left-zone-min: calc(var(--pbs-left-number-min) + var(--pbs-left-zone-gap) + var(--pbs-left-name-min)) !important;

  --zoneLeftNumberMin: var(--pbs-left-number-min) !important;
  --zoneLeftNumberMax: var(--pbs-left-number-max) !important;
  --zoneLeftNameMin: var(--pbs-left-name-min) !important;
  --zoneLeftGap: var(--pbs-left-zone-gap) !important;
  --zoneLeftBaseWidth: var(--pbs-left-zone-min) !important;
  --fcLeftNumberMin: var(--pbs-left-number-min) !important;
  --fcLeftNumberMax: var(--pbs-left-number-max) !important;
  --fcLeftNameMin: var(--pbs-left-name-min) !important;
  --fcLeftGap: var(--pbs-left-zone-gap) !important;
  --fcLeftMinWidth: var(--pbs-left-zone-min) !important;
  --room-number-min: var(--pbs-left-number-min) !important;
  --room-number-max: var(--pbs-left-number-max) !important;
  --room-name-min: var(--pbs-left-name-min) !important;
  --main-room-min: var(--pbs-left-name-min) !important;
}

/* Physical two-column LEFT zones. Pixel widths are supplied by the shared
   controller, so table-layout cannot redistribute them. */
html body :is(#main-table.openings-zoned-table,#main-table.boundary-zoned-table) {
  --pbs-physical-number-width: var(--pbs-left-number-min);
  --pbs-physical-name-width: var(--pbs-left-name-min);
  table-layout: fixed !important;
}
html body :is(#main-table.openings-zoned-table,#main-table.boundary-zoned-table) > colgroup > col.main-cp-col,
html body :is(#main-table.openings-zoned-table,#main-table.boundary-zoned-table) > :is(thead,tbody,tfoot) > tr > :is(th,td):first-child {
  width: var(--pbs-physical-number-width) !important;
  min-width: var(--pbs-left-number-min) !important;
  max-width: var(--pbs-left-number-number-max, var(--pbs-left-number-max)) !important;
}
html body :is(#main-table.openings-zoned-table,#main-table.boundary-zoned-table) > colgroup > col.main-room-col,
html body :is(#main-table.openings-zoned-table,#main-table.boundary-zoned-table) > :is(thead,tbody,tfoot) > tr > :is(th,td):nth-child(2) {
  width: var(--pbs-physical-name-width) !important;
  min-width: var(--pbs-left-name-min) !important;
  max-width: none !important;
}

/* Every nested LEFT grid follows the same two-track construction. */
html body :is(.pbs-zone-left-grid,.fh-left-grid,.fc-left-grid,.facade-zone-left-grid) {
  column-gap: var(--pbs-left-zone-gap) !important;
}

/* Fire distance: explicitly destroy the legacy --facadeLeftZoneWidth clamp.
   The controller writes exact physical LEFT-zone and number-track widths. */
html body #facade-table.facade-zoned-table {
  --facadeLeftNumberMin: var(--pbs-left-number-min) !important;
  --facadeLeftNumberMax: var(--pbs-left-number-max) !important;
  --facadeLeftNameMin: var(--pbs-left-name-min) !important;
  --facadeLeftGap: var(--pbs-left-zone-gap) !important;
  --facadeLeftBaseWidth: var(--pbs-left-zone-min) !important;
  --facadeLeftZoneWidth: var(--pbs-facade-left-zone-width, var(--pbs-left-zone-min)) !important;
  width: var(--pbs-facade-table-width, 100%) !important;
  min-width: var(--pbs-facade-table-min, 0px) !important;
  max-width: none !important;
  table-layout: fixed !important;
}
html body #facade-table.facade-zoned-table > colgroup > col.facade-zone-left-col,
html body #facade-table.facade-zoned-table > thead > tr > th:first-child,
html body #facade-table.facade-zoned-table > tbody > tr > td.facade-zone-left {
  width: var(--pbs-facade-left-zone-width, var(--pbs-left-zone-min)) !important;
  min-width: var(--pbs-left-zone-min) !important;
  max-width: none !important;
}
html body #facade-table.facade-zoned-table :is(.pbs-zone-left-grid,.facade-zone-left-grid) {
  display: grid !important;
  grid-template-columns: var(--pbs-facade-number-width, var(--pbs-left-number-min)) minmax(var(--pbs-left-name-min), 1fr) !important;
  column-gap: var(--pbs-left-zone-gap) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
}
html body #facade-table.facade-zoned-table :is(.pbs-zone-left-grid,.facade-zone-left-grid) > :first-child {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
html body #facade-table.facade-zoned-table :is(.pbs-zone-left-grid,.facade-zone-left-grid) > :nth-child(2) {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Editors: identifier 100%, description/name 80%, no spacer cells. */
html body :is(#main-table,#fc-table,#facade-table,.room-table) > :is(tbody,tfoot) > tr > :is(td,th):first-child input,
html body :is(.pbs-zone-left-grid,.fh-left-grid,.fc-left-grid,.facade-zone-left-grid) > input:first-child {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
html body :is(#main-table,#fc-table,#facade-table,.room-table) > :is(tbody,tfoot) > tr > :is(td,th):nth-child(2) input,
html body :is(.pbs-zone-left-grid,.fh-left-grid,.fc-left-grid,.facade-zone-left-grid) > input:nth-child(2),
html body #fc-table .fc-name-cell .fc-desc-input,
html body .room-table .room-zone-left .fc-desc-input {
  width: 80% !important;
  max-width: 80% !important;
  justify-self: start !important;
  box-sizing: border-box !important;
}
