/* Main OM tables use full width; the breaker estimate uses a responsive panel grid. */
#vypocet h3 + h4 {
    margin-top: 0.5em;
}

#vypocet .om-skupiny-table {
  width: 100%;
}

#vypocet .orientacni-jistic-container {
  width: 100%;
  container-type: inline-size;
}

#vypocet .orientacni-jistic-layout {
  display: grid;
  gap: 16px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
}

#vypocet .orientacni-jistic-layout.has-both-groups {
  grid-template-columns: repeat(2, minmax(0, 375px));
}

#vypocet .orientacni-jistic-layout.has-one-group,
#vypocet .orientacni-jistic-layout.has-no-groups {
  grid-template-columns: minmax(0, 375px);
}

#vypocet .orientacni-jistic-panel {
  width: 100%;
  min-width: 0;
}

#vypocet .orientacni-jistic-celkem {
  grid-column: 1 / -1;
}

@container (max-width: 765px) {
  #vypocet .orientacni-jistic-layout.has-both-groups {
    grid-template-columns: minmax(0, 375px);
  }
}

/* Local compact field sizing and result emphasis. */
#vypocet .om-pocet,
#vypocet #fid_orientacni_soucet_proudu_bytu,
#vypocet #fid_orientacni_soucet_proudu_nebytu,
#vypocet #fid_koeficient_soudobosti_bytu,
#vypocet #fid_koeficient_soudobosti_nebytu {
  box-sizing: border-box;
}

#vypocet #fid_orientacni_soucet_proudu_bytu,
#vypocet #fid_orientacni_soucet_proudu_nebytu {
  padding-left: 5px;
  padding-right: 5px;
}

#vypocet input[type="number"].om-pocet,
#vypocet input[type="number"]#fid_koeficient_soudobosti_bytu,
#vypocet input[type="number"]#fid_koeficient_soudobosti_nebytu {
  padding-right: 2px;
}

#vypocet .om-pocet {
  width: 5.5em;
}

#vypocet #fid_orientacni_soucet_proudu_bytu,
#vypocet #fid_orientacni_soucet_proudu_nebytu,
#vypocet #fid_koeficient_soudobosti_bytu,
#vypocet #fid_koeficient_soudobosti_nebytu {
  width: 6.5em;
}

#vypocet .vypocet-result-table {
  width: 100%;
}

#vypocet .vypocet-result-summary,
#vypocet .investice-result-summary {
  margin-top: 0.75em;
  padding: 0.75em;
  background-color: #f6f6f6;
}

#vypocet .om-sazba-jistic {
  white-space: nowrap;
}


/* Keep delete icons fixed-size and the action column wide enough for the icon. */
#vypocet .om-odebrat img {
  width: 21px;
  height: 21px;
  max-width: none;
}

#vypocet .om-odebrat-cell {
  width: 29px;
  min-width: 29px;
  white-space: nowrap;
  text-align: center;
}

/* Center the count and payment columns in both OM tables. */
#vypocet .om-pocet-cell,
#vypocet .om-distribuce-cell,
#vypocet .om-obchod-cell,
#vypocet .om-celkem-cell {
  text-align: center;
}


/* Center numeric values while leaving the row label header left-aligned. */
#vypocet .vypocet-result-table tbody td {
  text-align: center;
}


/* Keep add-group links close to their tables and the breaker subheading compact. */
#vypocet .om-pridat-row {
  margin-top: -1em;
  margin-bottom: 1em;
}

#vypocet .orientacni-jistic-title {
  margin-top: 0.5em;
}

#vypocet .vypocet-result-summary p:last-child,
#vypocet .investice-result-summary p:last-child {
  margin-bottom: 0;
}

#vypocet #investice-table {
  width: 100%;
}

#vypocet #investice-table th,
#vypocet #investice-table td {
  text-align: left;
}
