/**
 * EasyApp global Niotech header.
 *
 * Desktop keeps the Bootstrap navbar on one horizontal row after responsive
 * resizing. Mobile/tablet reproduces the approved 1.0.3 compact glass header.
 * Positioning and menu behavior remain owned by the active theme.
 */

body.easyapp-global-header #navbar.navbar {
  z-index: 2147483000 !important;
  isolation: isolate;
  border-bottom: 1px solid rgba(40, 44, 50, .09);
  background: rgba(250, 250, 252, .78) !important;
  box-shadow: 0 1px 0 rgba(40, 44, 50, .07);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

/*
 * Bootstrap appends the off-canvas backdrop directly to <body>. Keep the
 * backdrop above page content and the panel above the backdrop. The matching
 * runtime guard in global-header.js preserves these layers when LiteSpeed UCSS
 * removes selectors that are absent until a visitor opens the mobile menu.
 */
body.easyapp-global-header .offcanvas-backdrop {
  z-index: 2147483001 !important;
}

body.easyapp-global-header #navbarOffcanvas {
  z-index: 2147483002 !important;
  isolation: isolate;
  background: #fff !important;
}

@media (min-width: 1200px) {
  body.easyapp-global-header #navbar.navbar {
    height: 56px;
    min-height: 56px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.easyapp-global-header #navbar.navbar > .container {
    height: 56px;
    min-height: 56px;
    align-items: center;
  }

  body.easyapp-global-header #navbar.navbar .navbar-brand {
    display: flex;
    height: 56px;
    align-items: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.easyapp-global-header #navbar.navbar .navbar-brand img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-height: 34px;
    object-fit: contain;
  }

  body.easyapp-global-header #navbar.navbar-expand-xl .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    flex-grow: 1 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  body.easyapp-global-header #navbar.navbar-expand-xl #menu-main-menu.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    min-width: max-content;
  }

  body.easyapp-global-header #navbar.navbar-expand-xl #menu-main-menu > li.level-1 {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  body.easyapp-global-header #navbar.navbar-expand-xl #menu-main-menu > li.level-1 > a.nav-link {
    display: flex;
    height: 56px;
    align-items: center;
    width: auto !important;
    min-width: max-content;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    white-space: nowrap !important;
    word-break: keep-all;
  }

  body.easyapp-global-header #navbar.navbar-expand-xl #menu-main-menu > li.level-1 > .dropdown-menu {
    top: 56px !important;
    z-index: 2147483003 !important;
  }
}

@media (max-width: 1199.98px) {
  body.easyapp-global-header #navbar.navbar {
    height: 58px;
    min-height: 58px;
    padding: 0 !important;
  }

  body.easyapp-global-header #navbar.navbar > .container {
    height: 58px;
    min-height: 58px;
    align-items: center;
  }

  body.easyapp-global-header #navbar.navbar .navbar-brand {
    display: flex;
    align-items: center;
    max-width: calc(100% - 68px);
    margin-right: 12px;
  }

  body.easyapp-global-header #navbar.navbar .navbar-brand img {
    display: block;
    width: auto !important;
    max-width: 160px;
    height: auto !important;
    max-height: 36px;
    object-fit: contain;
  }

  body.easyapp-global-header #navbar.navbar .navbar-toggler {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 7px;
  }
}
