/*
 GUREXA navbar placement corrective patch V1.1
 Requirement:
 - no GUREXA logo/application name in top navbar
 - navbar placed directly above Cognitive Analysis Workspace
 - centered
 - light-blue background
 - existing sidebar preserved
*/

body.gurexa-has-topnav {
  padding-top: 0 !important;
}

#gurexa-topnav.gx-workspace-nav {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;

  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;

  background: #eaf6ff !important;
  color: #12304f !important;
  border: 0 !important;
  border-bottom: 1px solid #cfe5f7 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 20 !important;
}

#gurexa-topnav.gx-workspace-nav .gx-nav-shell {
  width: 100% !important;
  max-width: none !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 24px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
}

#gurexa-topnav.gx-workspace-nav .gx-brand {
  display: none !important;
}

#gurexa-topnav.gx-workspace-nav .gx-nav-links {
  flex: 0 1 auto !important;
  width: auto !important;
  justify-content: center !important;
  gap: 10px !important;
  overflow: visible !important;
}

#gurexa-topnav.gx-workspace-nav .gx-nav-link,
#gurexa-topnav.gx-workspace-nav .gx-icon-btn {
  color: #173a5e !important;
}

#gurexa-topnav.gx-workspace-nav .gx-nav-link {
  padding: 9px 12px !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

#gurexa-topnav.gx-workspace-nav .gx-nav-link:hover,
#gurexa-topnav.gx-workspace-nav .gx-nav-link[aria-current="page"],
#gurexa-topnav.gx-workspace-nav .gx-icon-btn:hover,
#gurexa-topnav.gx-workspace-nav .gx-icon-btn[aria-expanded="true"] {
  background: #d8edfc !important;
  color: #0d3155 !important;
}

#gurexa-topnav.gx-workspace-nav .gx-nav-tools {
  flex: 0 0 auto !important;
  margin-left: 0 !important;
  position: absolute !important;
  right: 18px !important;
}

#gurexa-topnav.gx-workspace-nav .gx-icon-btn {
  width: 38px !important;
  height: 38px !important;
  font-size: 17px !important;
}

/* Undo the V1.0 fixed-navbar sidebar displacement. */
.gurexa-has-topnav .sidebar,
.gurexa-has-topnav .app-sidebar,
.gurexa-has-topnav [class*="sidebar"][style*="position: fixed"],
.gurexa-has-topnav nav[aria-label="Sidebar"] {
  top: 0 !important;
  max-height: 100vh !important;
}

/*
 When the DOM locator cannot identify a workspace header, the navbar remains
 visible but loses fixed positioning so it cannot cover the application.
*/
#gurexa-topnav.gx-workspace-nav.gx-placement-fallback {
  margin: 0 !important;
}

@media (max-width: 980px) {
  #gurexa-topnav.gx-workspace-nav {
    height: auto !important;
    min-height: 56px !important;
  }

  #gurexa-topnav.gx-workspace-nav .gx-nav-shell {
    min-height: 56px !important;
    height: auto !important;
    padding: 7px 82px 7px 12px !important;
  }

  #gurexa-topnav.gx-workspace-nav .gx-nav-links {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  #gurexa-topnav.gx-workspace-nav .gx-nav-links::-webkit-scrollbar {
    display: none !important;
  }

  #gurexa-topnav.gx-workspace-nav .gx-nav-tools {
    right: 10px !important;
  }
}
