/* v1.3.245 — Odstupy single-source column geometry.
   Header, main rows and every opening subtable consume the same table-level tokens.
   No row- or subtable-specific width calculation is permitted. */
#facade-table {
  /* Shared project geometry tokens from table-geometry.css. */
  --od-wide: var(--pbs-column-extra-wide, 112px);
  --od-standard: var(--pbs-column-regular, 88px);
  --od-left-min: 260px;
  --od-right: 136px;

  /* Authoritative eight-track central model. */
  --od-c1: var(--od-wide);      /* Dĺžka / Šírka otvoru */
  --od-c2: var(--od-wide);      /* Výška */
  --od-c3: var(--od-standard);  /* p / Parapet */
  --od-c4: var(--od-standard);  /* Otv / Počet */
  --od-c5: var(--od-standard);  /* Plocha */
  --od-c6: var(--od-standard);  /* Otvory */
  --od-c7: var(--od-standard);  /* Fasáda */
  --od-c8: var(--od-standard);  /* Odstup */
  --od-middle: calc(
    var(--od-c1) + var(--od-c2) + var(--od-c3) + var(--od-c4) +
    var(--od-c5) + var(--od-c6) + var(--od-c7) + var(--od-c8) + 21px
  );
  --od-table-min: calc(var(--od-left-min) + var(--od-middle) + var(--od-right));

  width: 100% !important;
  min-width: var(--od-table-min) !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

/* Main table: flexible left zone, immutable central and right zones. */
#facade-table > colgroup > col.facade-zone-left-col {
  width: auto !important;
  min-width: var(--od-left-min) !important;
  max-width: none !important;
}
#facade-table > colgroup > col.facade-zone-middle-col {
  width: var(--od-middle) !important;
  min-width: var(--od-middle) !important;
  max-width: var(--od-middle) !important;
}
#facade-table > colgroup > col.facade-zone-right-col {
  width: var(--od-right) !important;
  min-width: var(--od-right) !important;
  max-width: var(--od-right) !important;
}

#facade-table > thead > tr > :nth-child(1),
#facade-table > tbody > tr.facade-row > :nth-child(1) {
  width: auto !important;
  min-width: var(--od-left-min) !important;
  max-width: none !important;
}
#facade-table > thead > tr > :nth-child(2),
#facade-table > tbody > tr.facade-row > :nth-child(2) {
  width: var(--od-middle) !important;
  min-width: var(--od-middle) !important;
  max-width: var(--od-middle) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#facade-table > thead > tr > :nth-child(3),
#facade-table > tbody > tr.facade-row > :nth-child(3) {
  width: var(--od-right) !important;
  min-width: var(--od-right) !important;
  max-width: var(--od-right) !important;
}

/* The same central grid is used by the label header and every main row. */
#facade-table .facade-zone-middle-grid {
  display: grid !important;
  grid-template-columns:
    var(--od-c1) var(--od-c2) var(--od-c3) var(--od-c4)
    var(--od-c5) var(--od-c6) var(--od-c7) var(--od-c8) !important;
  column-gap: 4px !important;
  row-gap: 4px !important;
  width: var(--od-middle) !important;
  min-width: var(--od-middle) !important;
  max-width: var(--od-middle) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
#facade-table .facade-zone-middle-grid > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Tray contributes no geometry of its own. */
#facade-table > tbody > tr.facade-tray-row > td {
  padding: 0 !important;
  margin: 0 !important;
  border-spacing: 0 !important;
}

/* Every nested table occupies exactly the main table's rendered inner width.
   Its first column absorbs all surplus; all central/right tracks are immutable. */
#facade-table .opening-table {
  width: 100% !important;
  min-width: var(--od-table-min) !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#facade-table .opening-table > colgroup > col:nth-child(1) {
  width: auto !important;
  min-width: var(--od-left-min) !important;
  max-width: none !important;
}
#facade-table .opening-table > colgroup > col:nth-child(2) { width: var(--od-c1) !important; min-width: var(--od-c1) !important; max-width: var(--od-c1) !important; }
#facade-table .opening-table > colgroup > col:nth-child(3) { width: var(--od-c2) !important; min-width: var(--od-c2) !important; max-width: var(--od-c2) !important; }
#facade-table .opening-table > colgroup > col:nth-child(4) { width: var(--od-c3) !important; min-width: var(--od-c3) !important; max-width: var(--od-c3) !important; }
#facade-table .opening-table > colgroup > col:nth-child(5) { width: var(--od-c4) !important; min-width: var(--od-c4) !important; max-width: var(--od-c4) !important; }
#facade-table .opening-table > colgroup > col:nth-child(6) { width: var(--od-c5) !important; min-width: var(--od-c5) !important; max-width: var(--od-c5) !important; }
#facade-table .opening-table > colgroup > col:nth-child(7) { width: var(--od-c6) !important; min-width: var(--od-c6) !important; max-width: var(--od-c6) !important; }
#facade-table .opening-table > colgroup > col:nth-child(8) { width: var(--od-c7) !important; min-width: var(--od-c7) !important; max-width: var(--od-c7) !important; }
#facade-table .opening-table > colgroup > col:nth-child(9) { width: var(--od-c8) !important; min-width: var(--od-c8) !important; max-width: var(--od-c8) !important; }
#facade-table .opening-table > colgroup > col:nth-child(10) { width: var(--od-right) !important; min-width: var(--od-right) !important; max-width: var(--od-right) !important; }

/* Cell constraints mirror the colgroup tokens exactly. */
#facade-table .opening-table > thead > tr > :nth-child(1),
#facade-table .opening-table > tbody > tr > :nth-child(1) {
  width: auto !important;
  min-width: var(--od-left-min) !important;
  max-width: none !important;
}
#facade-table .opening-table > thead > tr > :nth-child(2),
#facade-table .opening-table > tbody > tr > :nth-child(2) { width: var(--od-c1) !important; min-width: var(--od-c1) !important; max-width: var(--od-c1) !important; }
#facade-table .opening-table > thead > tr > :nth-child(3),
#facade-table .opening-table > tbody > tr > :nth-child(3) { width: var(--od-c2) !important; min-width: var(--od-c2) !important; max-width: var(--od-c2) !important; }
#facade-table .opening-table > thead > tr > :nth-child(4),
#facade-table .opening-table > tbody > tr > :nth-child(4) { width: var(--od-c3) !important; min-width: var(--od-c3) !important; max-width: var(--od-c3) !important; }
#facade-table .opening-table > thead > tr > :nth-child(5),
#facade-table .opening-table > tbody > tr > :nth-child(5) { width: var(--od-c4) !important; min-width: var(--od-c4) !important; max-width: var(--od-c4) !important; }
#facade-table .opening-table > thead > tr > :nth-child(6),
#facade-table .opening-table > tbody > tr > :nth-child(6) { width: var(--od-c5) !important; min-width: var(--od-c5) !important; max-width: var(--od-c5) !important; }
#facade-table .opening-table > thead > tr > :nth-child(7),
#facade-table .opening-table > tbody > tr > :nth-child(7) { width: var(--od-c6) !important; min-width: var(--od-c6) !important; max-width: var(--od-c6) !important; }
#facade-table .opening-table > thead > tr > :nth-child(8),
#facade-table .opening-table > tbody > tr > :nth-child(8) { width: var(--od-c7) !important; min-width: var(--od-c7) !important; max-width: var(--od-c7) !important; }
#facade-table .opening-table > thead > tr > :nth-child(9),
#facade-table .opening-table > tbody > tr > :nth-child(9) { width: var(--od-c8) !important; min-width: var(--od-c8) !important; max-width: var(--od-c8) !important; }
#facade-table .opening-table > thead > tr > :nth-child(10),
#facade-table .opening-table > tbody > tr > :nth-child(10) { width: var(--od-right) !important; min-width: var(--od-right) !important; max-width: var(--od-right) !important; }

/* Prevent padding/content from inflating any fixed track. */
#facade-table .opening-table th,
#facade-table .opening-table td,
#facade-table .facade-zone-middle-grid > * {
  box-sizing: border-box !important;
}

/* Four-slot physical action zone. Five-icon opening rows intentionally overflow it symmetrically. */
#facade-table .facade-zone-right,
#facade-table .opening-table .opening-actions-cell {
  width: var(--od-right) !important;
  min-width: var(--od-right) !important;
  max-width: var(--od-right) !important;
  padding: 2px 6px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
#facade-table .facade-zone-right > .actions,
#facade-table .opening-table .opening-fc-transfer-actions,
#facade-table .opening-table .assigned-fc-actions,
#facade-table .opening-table .fc-sub-right-actions {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: 28px !important;
  justify-content: center !important;
  align-items: center !important;
  width: max-content !important;
  max-width: none !important;
  height: 100% !important;
  gap: 4px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  transform: none !important;
}
