$flux-toolbar--search-height: $cf-form-sm-height + $cf-marg-c;
$flux-toolbar--item-height: $cf-marg-d;

.flux-toolbar {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  flex: 1 0 0;
}

.flux-toolbar--tabs {
  width: 100%;
  display: flex;
  align-items: stretch;
  height: $cf-form-md-height;
  flex: 0 0 $cf-form-md-height;
}

.flux-toolbar--tab {
  border-radius: $cf-radius $cf-radius 0 0;
  flex: 1 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: $cf-form-sm-font;
  line-height: $cf-form-sm-font;
  font-weight: $cf-font-weight--medium;
  background-color: transparent;
  color: $g8-storm;
  margin-right: $cf-marg-a;
  transition: color 0.25s ease, background-color 0.25s ease;

  &:last-child {
    margin-right: 0;
  }

  &:hover {
    cursor: pointer;
    background-color: $g2-kevlar;
    color: $g13-mist;
  }

  &.flux-toolbar--tab__active {
    background-color: $g3-castle;
    color: $g15-platinum;
  }
}

.flux-toolbar--tab-contents {
  background-color: $g3-castle;
  flex: 1 0 0;
  position: relative;
  border-radius: 0 0 $cf-radius $cf-radius;
  overflow: hidden;
}

.flux-toolbar--search {
  padding: 0 $cf-marg-b;
  display: flex;
  align-items: center;
  width: 100%;
  height: $flux-toolbar--search-height;
}

.flux-toolbar--scroll-area {
  height: calc(100% - #{$flux-toolbar--search-height}) !important;
}

.flux-toolbar--list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.flux-toolbar--list-item,
.flux-toolbar--heading {
  font-size: $cf-form-sm-font;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flux-toolbar--list-item {
  padding-left: $cf-marg-b;
  padding-right: $cf-marg-b + $cf-marg-a + $cf-border;
  height: $flux-toolbar--item-height;
  line-height: $flux-toolbar--item-height;
  font-family: $cf-code-font;
  font-weight: $cf-font-weight--bold;
  transition: background-color 0.25s ease, color 0.25s ease;
  background-color: $g3-castle;
  display: flex;
  align-items: center;
  justify-content: space-between;

  > code {
    font-size: $cf-form-sm-font;
    background-color: $g1-raven;
    border-radius: $cf-radius-sm;
    padding: 0 $cf-marg-b;
    height: $cf-form-xs-height;
    line-height: $cf-form-xs-height;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.25s ease, color 0.25s ease, text-shadow 0.25s ease;
  }

  .flux-toolbar--injector {
    opacity: 0;
    transition: opacity 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  }
  
  &:hover {
    background-color: $g4-onyx;
    
    > code {
      background-color: $g2-kevlar;
    }

    .flux-toolbar--injector {
      opacity: 1;
    }
  }
}

.flux-toolbar--heading {
  padding: $cf-marg-b $cf-marg-c;
  padding-bottom: $cf-marg-b + $cf-marg-a;
  font-weight: $cf-font-weight--medium;
  color: $g15-platinum;
  border-bottom: $cf-border solid $g5-pepper;
  margin-bottom: $cf-marg-a;
}

.flux-toolbar--variable {
  > code {
    color: $c-honeydew;
  }

  &:hover > code {
    color: $c-krypton;
    text-shadow: 0 0 4px $c-rainforest;
  }
}

.flux-toolbar--function {
  > code {
    color: $c-laser;
  }

  &:hover > code {
    color: $c-hydrogen;
    text-shadow: 0 0 4px $c-ocean;
  }
}

.flux-toolbar--popover {
  font-size: 13px;
  padding: $cf-marg-c + $cf-marg-a;
}
