@import url('view/login-view.css');

/* WISAG green palette app-wide. jmix-lumo default primary is blue (hsl 214);
   the login view sets these scoped, here they are global so the main-view
   title, header icons, links and primary controls match WISAG branding. */
html {
  --lumo-primary-color: #6db133;
  --lumo-primary-color-50pct: rgba(109, 177, 51, 0.5);
  --lumo-primary-color-10pct: rgba(109, 177, 51, 0.1);
  --lumo-primary-text-color: #6db133;
}

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

/* Pin the drawer footer (user indicator + logout) to the very bottom of the
   drawer: make the drawer section a full-height flex column and let the nav
   grow to fill the space. On jmix-lumo the section is display:block, so the
   footer sat right under the menu instead of at the bottom. */
.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;
}

/* Main-view drawer footer: user indicator (left) + logout button (right) on
   one row. The lantech parent theme used to lay this out; on jmix-lumo the
   .jmix-main-view-footer class is unstyled (display:block), so the logout
   button dropped onto its own line below the user indicator. Restore the row. */
.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;
}

/* Notification width — Vaadin/Lumo V25 does NOT cap toast width, so long
   messages stretch full-width. Real max-width (the lantech
   --vaadin-notification-max-width var is dead in V25). Belongs in the lantech
   template long-term; here as the effective app-level cap. */
vaadin-notification-card,
vaadin-notification-card::part(overlay) {
  max-width: min(28rem, 90vw);
}
