/* Shared navigation sits above application dialogs; children keep their native order. */
/* The sidebar brand is the single dashboard entry, including the desktop rail. */
body.has-crm-navigation .sidebar-dashboard-link {
 color: inherit;
 text-decoration: none;
 min-height: 44px;
 border-radius: 11px;
}
body.has-crm-navigation .sidebar-dashboard-link:focus-visible {
 outline: 2px solid var(--brand);
 outline-offset: 2px;
}
@media (min-width: 1101px) {
 body.has-crm-navigation .sidebar-head {
  display: flex !important;
  min-height: 54px;
  padding-bottom: 10px;
 }
 body.has-crm-navigation .sidebar-dashboard-link {
  width: 100%;
  min-width: 0;
  gap: 0;
  white-space: nowrap;
 }
 body.has-crm-navigation .sidebar-dashboard-link .brand-mark {
  width: 24px;
  height: 28px;
  margin-inline: 2px;
  border-radius: 8px;
  font-size: 12px;
 }
 body.has-crm-navigation .sidebar-dashboard-link .brand-copy {
  display: none;
 }
 body.has-crm-navigation:not(.desktop-sidebar-dismissed) .sidebar:is(:hover, :focus-within) .sidebar-dashboard-link,
 body.has-crm-navigation.desktop-sidebar-expanded:not(.desktop-sidebar-dismissed) .sidebar .sidebar-dashboard-link {
  gap: 9px;
  padding-inline: 4px;
 }
 body.has-crm-navigation:not(.desktop-sidebar-dismissed) .sidebar:is(:hover, :focus-within) .brand-mark,
 body.has-crm-navigation.desktop-sidebar-expanded:not(.desktop-sidebar-dismissed) .sidebar .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 18px;
 }
 body.has-crm-navigation:not(.desktop-sidebar-dismissed) .sidebar:is(:hover, :focus-within) .brand-copy,
 body.has-crm-navigation.desktop-sidebar-expanded:not(.desktop-sidebar-dismissed) .sidebar .brand-copy {
  display: block;
 }
}

:root {
 --goic-layer-header-backdrop: 29900;
 --goic-layer-header: 30000;
 --goic-layer-header-scanner: 31000;
 --goic-layer-sidebar-backdrop: 31900;
 --goic-layer-sidebar: 32000;
}
body.has-crm-navigation .topbar.alpha31-topbar-fixed,
body.has-crm-navigation .alpha31-topbar-fixed {
 z-index: var(--goic-layer-header) !important;
}
body.has-crm-navigation .sidebar { z-index: var(--goic-layer-sidebar) !important; }
body.has-crm-navigation .sidebar-backdrop { z-index: var(--goic-layer-sidebar-backdrop) !important; }
@media (min-width: 1101px) {
 /* Escape/Back can collapse a hover-open rail until the pointer leaves it. */
 body.has-crm-navigation.desktop-sidebar-dismissed .sidebar {
  width: var(--desktop-sidebar-rail, 28px) !important;
  overflow: hidden !important;
  padding-inline: 0 !important;
 }
}
body.has-crm-navigation [data-qr-scanner-modal] { z-index: var(--goic-layer-header-scanner) !important; }

/* The product editor and header used the same body pseudo-element.
   Override the product backdrop only while a navigation panel is open. */
body.has-crm-navigation.header-navigation-open::before {
 content: "" !important;
 display: block !important;
 position: fixed !important;
 inset: var(--topbar-height, 76px) 0 0 !important;
 z-index: var(--goic-layer-header-backdrop) !important;
 background: rgba(15, 23, 42, .24) !important;
 backdrop-filter: blur(7px) !important;
 -webkit-backdrop-filter: blur(7px) !important;
 pointer-events: auto !important;
}

/* Keep dialog titles/close buttons below the now-accessible header. */
body.has-crm-navigation .ui-modal:not([data-qr-scanner-modal]) {
 padding-top: calc(var(--topbar-height, 76px) + 12px) !important;
 padding-bottom: 12px !important;
}
body.has-crm-navigation .ui-modal:not([data-qr-scanner-modal]) .ui-modal__panel {
 max-height: calc(100dvh - var(--topbar-height, 76px) - 24px) !important;
}
body.has-crm-navigation.products-measure-modal-open .order-products-card.is-editing {
 top: calc(var(--topbar-height, 76px) + 12px) !important;
 height: calc(100dvh - var(--topbar-height, 76px) - 24px) !important;
 max-height: calc(100dvh - var(--topbar-height, 76px) - 24px) !important;
}
