/* Layout of the MainView from this module, shared by every application on it.
   Loaded with @StyleSheet(Lantech.STYLESHEET) after Lumo and JmixLumo. jmix-lumo leaves
   these MainView parts unstyled, so without the rules below the drawer looks broken.
   Colours and brand tokens belong to the application stylesheet, not here. */

/* Drawer header title: centered with padding. jmix-lumo left-aligns it. */
.jmix-main-view-application-title {
  text-align: center !important;
  padding: var(--lumo-space-m) !important;
  margin: 0 !important;
}

/* The drawer footer (user indicator and logout) sits at the very bottom: the drawer section
   is a full-height flex column and the navigation takes the free space. On jmix-lumo the
   section is display:block, so the footer sat right under the menu. */
.jmix-main-view-section[slot="drawer"] {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box;
}
.jmix-main-view-section[slot="drawer"] .jmix-main-view-navigation {
  flex: 1 1 auto !important;
  overflow: auto;
}

/* User indicator on the left, logout button on the right, on one row. On jmix-lumo
   .jmix-main-view-footer is display:block and the button drops onto its own line. */
.jmix-main-view-footer {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: var(--lumo-space-s);
  padding: var(--lumo-space-xs) var(--lumo-space-m);
  box-sizing: border-box;
}
.jmix-main-view-footer #userIndicator,
.jmix-main-view-footer .jmix-user-indicator {
  flex: 1 1 auto;
  min-width: 0;
}
.jmix-main-view-footer #logoutButton,
.jmix-main-view-footer .jmix-logout-button {
  flex: 0 0 auto;
}

/* An even vertical rhythm in the side menu.
   jmix-lumo gives a group (.jmix-menubar-item) its own vertical padding, and a nested group
   receives it again on top of the parent's, so the gaps between neighbouring items differed
   two to three fold. The padding moves from the container to the rows, so the step is the
   same at any depth. The value stays what jmix-lumo uses (space-s): with less the rows ran
   into each other. */
.jmix-list-menu .jmix-menubar-item {
  padding: 0;
}

.jmix-list-menu .jmix-menubar-item vaadin-details-summary,
.jmix-list-menu .jmix-menu-item {
  padding: var(--lumo-space-s);
}

/* Nested list: a smaller indent, or the third level runs off the edge. */
.jmix-list-menu .jmix-menubar-item .menubar-list {
  margin-inline-start: var(--lumo-space-m);
}
