/* the top of a page on a computer (the owner, 1. 12. 2026: "lišta s hledáním, zvonečkem ujíždí dolů … opravit všude"): the search, the bell,
   the look and the language stand on the FIRST row, on the right of the way (crumbs); the years, the tabs of Nastavení and the quick
   buttons go under the way on the left. Before, the tools went down to the row of the years or the tabs. */
@media (min-width: 861px) {
  html.sd .main > .head-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    row-gap: 10px;
    align-items: start;
    margin-bottom: 16px;
  }
  html.sd .main > .head-row > .top {
    display: contents;
  }
  html.sd .main > .head-row > .crumbs,
  html.sd .main > .head-row > .top > :not(.top-tools) {
    grid-column: 1;
    min-width: 0;
  }
  html.sd .main > .head-row > .top > .top-tools {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    margin: 0;
  }
  html.sd .main > .head-row > .top > div:empty {
    display: none;
  }
  /* nothing under the way (no years, tabs or buttons; the years are hidden where the period bar is, app.css): the way and the tools are one row in one axis (the owner, 1. 12. 2026) */
  html.sd .main > .head-row:not(:has(> .top > :not(.top-tools):not(:empty))),
  html.sd .main:has(.period-bar) > .head-row:not(:has(> .top > :not(.top-tools, .chips):not(:empty))) {
    align-items: center;
  }
  html.sd .main > .head-row:not(:has(> .top > :not(.top-tools):not(:empty))) > .top > .top-tools,
  html.sd .main:has(.period-bar) > .head-row:not(:has(> .top > :not(.top-tools, .chips):not(:empty))) > .top > .top-tools {
    grid-row: 1;
    align-self: center;
  }
  html.sd .main > .head-row:not(:has(> .top > :not(.top-tools):not(:empty))) > .crumbs,
  html.sd .main:has(.period-bar) > .head-row:not(:has(> .top > :not(.top-tools, .chips):not(:empty))) > .crumbs {
    margin: 0;
  }
}

/* the buttons in a row above a list are always 8 px apart, never glued (Nový opravný daňový doklad touched Nová zálohová faktura) */
html.sd .toolbar .adds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
