.nav-group {
  position: relative;
  display: grid;
  gap: 2px;
}

.nav-group-button {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  appearance: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}

.nav-primary-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: inherit;
}

.nav-group.current > .nav-group-button {
  color: var(--colorCompoundBrandForeground1);
  font-weight: 500;
}

.nav-group.current > .nav-group-button .fluent-icon {
  color: var(--colorCompoundBrandForeground1);
}

.nav-group-button::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: transparent;
  transform: translateY(-50%);
}

.nav-group.current > .nav-group-button::before {
  background: var(--colorBrandBackground);
}

.nav-group-chevron {
  display: inline-flex;
  margin-left: auto;
  color: var(--colorNeutralForeground3);
  transition: transform 120ms ease;
}

.nav-group-button[aria-expanded="true"] .nav-group-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  display: grid;
  gap: 2px;
  padding: 2px 0 6px 44px;
}

.nav-submenu[hidden] {
  display: none;
}

.nav-subitem {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--borderRadiusXLarge);
  color: var(--colorNeutralForeground2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
}

.nav-subitem:hover {
  background: var(--colorNeutralBackground3);
  color: var(--colorNeutralForeground1);
}

.nav-subitem:active {
  background: var(--colorNeutralBackground4);
}

.nav-subitem.active {
  background: transparent;
  color: var(--colorCompoundBrandForeground1);
  font-weight: 600;
}

.nav-subitem.active::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -8px;
  width: 3px;
  border-radius: var(--borderRadiusCircular);
  background: var(--colorCompoundBrandStroke);
}

.nav-group-button:focus-visible,
.nav-subitem:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-two-layer);
}

@media (forced-colors: active) {
  .nav-group-button:focus-visible,
  .nav-subitem:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}

.nav-subitem.is-disabled {
  color: var(--colorNeutralForegroundDisabled);
  cursor: not-allowed;
  user-select: none;
}

.nav-subitem.is-disabled:hover,
.nav-subitem.is-disabled:active {
  background: transparent;
  color: var(--colorNeutralForegroundDisabled);
}

.nav-group-context-note {
  padding: 2px 10px 6px;
  color: var(--colorNeutralForeground4);
  font-size: 11px;
  line-height: 16px;
}

.sidebar.collapsed .nav-group-chevron,
.sidebar.collapsed .nav-submenu {
  display: none;
}

.sidebar.collapsed .nav-group-button::before {
  left: -12px;
}

@media (max-width: 900px) {
  .sidebar .nav-submenu {
    padding-left: 44px;
  }

  .sidebar .nav-group-chevron {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-group-chevron {
    transition: none;
  }
}
