/* v1.3.249 — scoped UI consistency and project-wide typography fallback */
:root {
  --pbs-ui-font-family: "Segoe UI", Arial, sans-serif;
  --pbs-ui-font-size: 14px;
  --pbs-ui-font-weight: 400;
  --pbs-fixed-standard: 88px;
  --pbs-fixed-wide: 112px;
  --pbs-action-icon-size: 28px;
  --pbs-action-gap: 4px;
  --pbs-action-five-width: 164px;
  --pbs-scrubber-size: 20px;
}

/* Never allow an unstyled user-facing popup/control to fall back to Times New Roman. */
html, body, button, input, select, textarea, option,
[role="dialog"], [role="listbox"], [role="menu"],
.popup, .modal, .dialog, .popover, .lookup-popover,
.anchored-table-selector, .anchored-table-selector *,
.boundary-openings-popup, .boundary-openings-popup *,
.fc-project-value-popup, .fc-project-value-popup *,
.inline-action-box, .inline-action-box * {
  font-family: var(--pbs-ui-font-family) !important;
  font-size: var(--pbs-ui-font-size) !important;
  font-style: normal !important;
  font-weight: var(--pbs-ui-font-weight) !important;
}
[role="dialog"] h1, [role="dialog"] h2, [role="dialog"] h3,
.popup-title, .modal-title, .dialog-title,
.anchored-table-selector .popup-title {
  font-weight: 600 !important;
}

/* Odstupy facade assignment dropdown: exactly the same typography as row textboxes. */
body:has(#facade-table) .anchored-table-selector,
body:has(#facade-table) .anchored-selector-filter,
body:has(#facade-table) .anchored-selector-item,
body:has(#facade-table) .anchored-selector-empty {
  font-family: var(--pbs-ui-font-family) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1.2 !important;
}

/* Fire compartments: make Length editor identical to Odstupy metric editor. */
body:has(#fc-table) .fc-length-cell,
body:has(#fc-table) .fc-length-editor {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-width:0 !important;
  gap:2px !important;
  padding:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
}
body:has(#fc-table) .fc-length-editor .fc-meter-input-wrapper {
  position:relative !important;
  display:flex !important;
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
}
body:has(#fc-table) .fc-length-editor .fc-length-input {
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
  padding-right:20px !important;
  text-align:right !important;
}
body:has(#fc-table) .fc-length-editor .fc-meter-unit {
  position:absolute !important;
  right:6px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  pointer-events:none !important;
}
body:has(#fc-table) .fc-length-editor .fc-length-lever,
body:has(#fc-table) .fc-length-editor .lever-dial {
  flex:0 0 var(--pbs-scrubber-size) !important;
  width:var(--pbs-scrubber-size) !important;
  min-width:var(--pbs-scrubber-size) !important;
  max-width:var(--pbs-scrubber-size) !important;
  height:var(--pbs-scrubber-size) !important;
  min-height:var(--pbs-scrubber-size) !important;
  max-height:var(--pbs-scrubber-size) !important;
  aspect-ratio:1 / 1 !important;
  border-radius:50% !important;
  box-sizing:border-box !important;
  margin:0 2px !important;
  padding:0 !important;
}
body:has(#fc-table) .fc-length-editor .lever-core {
  width:6px !important;
  height:6px !important;
  border-radius:50% !important;
  position:static !important;
  transform:none !important;
}

/* Fire compartments A editor: same complete box model as the visually correct AN editor. */
body:has(#fc-table) .fc-main-center-grid > :nth-child(5),
body:has(#fc-table) .fc-main-center-grid > :nth-child(5) .unit-input-wrapper,
body:has(#fc-table) .fc-main-center-grid > :nth-child(5) .fc-manual-input-wrapper {
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  padding-left:0 !important;
  padding-right:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
}
body:has(#fc-table) .fc-main-center-grid > :nth-child(5) input {
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  text-align:right !important;
  padding-left:6px !important;
  padding-right:6px !important;
  overflow:visible !important;
}

/* Boundary mode authoritative 7-column geometry. Values are populated by JS. */
body:has(#main-table.boundary-zoned-table) {
  --boundary-id:72px;
  --boundary-name:160px;
  --boundary-area:var(--pbs-fixed-standard);
  --boundary-wide:var(--pbs-fixed-wide);
  --boundary-segments:220px;
  --boundary-actions:var(--pbs-action-five-width);
  --boundary-total:calc(var(--boundary-id) + var(--boundary-name) + var(--boundary-area) + var(--boundary-wide) + var(--boundary-wide) + var(--boundary-segments) + var(--boundary-actions));
}
body:has(#main-table.boundary-zoned-table) .wrap {
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:auto !important;
  box-sizing:border-box !important;
}
body:has(#main-table.boundary-zoned-table) #main-table,
body:has(#main-table.boundary-zoned-table) .segment-table {
  width:var(--boundary-table-width) !important;
  min-width:var(--boundary-total) !important;
  max-width:var(--boundary-table-width) !important;
  table-layout:fixed !important;
  border-spacing:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}
body:has(#main-table.boundary-zoned-table) .tray > td,
body:has(#main-table.boundary-zoned-table) .hidden-rooms-tray > td {
  padding-left:0 !important;
  padding-right:0 !important;
}
/* main columns */
body:has(#main-table.boundary-zoned-table) #main-table col.main-cp-col { width:var(--boundary-id) !important; min-width:var(--boundary-id) !important; max-width:var(--boundary-id) !important; }
body:has(#main-table.boundary-zoned-table) #main-table col.main-room-col { width:var(--boundary-name) !important; min-width:var(--boundary-name) !important; max-width:var(--boundary-name) !important; }
body:has(#main-table.boundary-zoned-table) #main-table col.main-area-col { width:var(--boundary-area) !important; min-width:var(--boundary-area) !important; max-width:var(--boundary-area) !important; }
body:has(#main-table.boundary-zoned-table) #main-table col.main-circ-col,
body:has(#main-table.boundary-zoned-table) #main-table col.main-height-col { width:var(--boundary-wide) !important; min-width:var(--boundary-wide) !important; max-width:var(--boundary-wide) !important; }
body:has(#main-table.boundary-zoned-table) #main-table col.main-segments-col { width:var(--boundary-segments) !important; min-width:var(--boundary-segments) !important; max-width:var(--boundary-segments) !important; }
body:has(#main-table.boundary-zoned-table) #main-table col.main-actions-col { width:var(--boundary-actions) !important; min-width:var(--boundary-actions) !important; max-width:var(--boundary-actions) !important; }
/* subtable uses exact same seven tracks */
body:has(#main-table.boundary-zoned-table) .segment-table col.col-por { width:var(--boundary-id) !important; min-width:var(--boundary-id) !important; max-width:var(--boundary-id) !important; }
body:has(#main-table.boundary-zoned-table) .segment-table col.col-name { width:var(--boundary-name) !important; min-width:var(--boundary-name) !important; max-width:var(--boundary-name) !important; }
body:has(#main-table.boundary-zoned-table) .segment-table col.col-ext { width:var(--boundary-area) !important; min-width:var(--boundary-area) !important; max-width:var(--boundary-area) !important; }
body:has(#main-table.boundary-zoned-table) .segment-table col.col-metric { width:var(--boundary-wide) !important; min-width:var(--boundary-wide) !important; max-width:var(--boundary-wide) !important; }
body:has(#main-table.boundary-zoned-table) .segment-table col.col-openings { width:var(--boundary-segments) !important; min-width:var(--boundary-segments) !important; max-width:var(--boundary-segments) !important; }
body:has(#main-table.boundary-zoned-table) .segment-table col.col-actions { width:var(--boundary-actions) !important; min-width:var(--boundary-actions) !important; max-width:var(--boundary-actions) !important; }
body:has(#main-table.boundary-zoned-table) .segment-table .actions,
body:has(#main-table.boundary-zoned-table) #main-table .actions {
  display:grid !important;
  grid-template-columns:repeat(5, var(--pbs-action-icon-size)) !important;
  gap:var(--pbs-action-gap) !important;
  justify-content:center !important;
  align-items:center !important;
  padding:0 !important;
  margin:0 !important;
}
body:has(#main-table.boundary-zoned-table) .segment-table .control-wrapper {
  display:flex !important;
  width:100% !important;
  min-width:0 !important;
  align-items:center !important;
  gap:2px !important;
}
body:has(#main-table.boundary-zoned-table) .segment-table .unit-input-wrapper {
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;
}
body:has(#main-table.boundary-zoned-table) .segment-table .unit-number {
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
body:has(#main-table.boundary-zoned-table) .segment-table .lever-dial {
  flex:0 0 var(--pbs-scrubber-size) !important;
  width:var(--pbs-scrubber-size) !important;
  height:var(--pbs-scrubber-size) !important;
  margin:0 2px !important;
  border-radius:50% !important;
  box-sizing:border-box !important;
}
