@use '../../../scss/base/mixins' as *;
@use '../Common/_left-nav-common.module';

.container {
  @extend .commonContainer;
  position: relative;
  z-index: 999;
  // We want the width of the LeftNav to be 72px total. This is the width + the border-right width.
  width: 71px; /** Width of the entire sidebar, padding and active bar. Does not include the border-right width. */
  border-right: 1px solid var(--medium-purple);
  ////
  overflow: hidden;
  -ms-overflow-style: none; // IE 10+
  overflow: -moz-scrollbars-none; // Firefox
  transition: all 0.25s ease-in-out;
  &.expanded {
    grid-template-columns: 5px 1fr;
    width: 300px; // Desired width of the expanded sidebar from UX
    .logoContainer {
      width: min-content;
    }
    .headerContainer .envTag {
      margin-left: 14px;
    }
  }
}

.navContainer {
  display: flex;
  flex-direction: column;
}

.headerContainer {
  border-bottom: 1px solid var(--medium-purple);
  height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  .envTag {
    margin: 0 auto;
  }
  .envTagLogo {
    margin: auto 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .envTagEnv {
    display: flex;
    gap: 8px;
    justify-content: left;
    align-items: center;
    margin-left: 20px;
  }
  .isolated {
    max-height: var(--logo-max-height, 26px);
    max-width: 50px;
    &.wide {
      max-width: 100px;
    }
  }
}

.logoContainer {
  overflow: hidden;
  transition: all 0.25s ease-in-out;
  display: flex;
  position: relative;
  left: 19px; /** This is needed to center position the logo correctly so it is aligned with the Sidebar links below. */
}

.newLogoContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  &.hovered {
    align-items: flex-start;
  }
}

.barAndLinkContainer {
  overflow-x: hidden;
  overflow-y: scroll;
  position: relative;
  left: -5px; // This is needed to align the active bar over the barPlaceholder.
  width: calc(
    100% + 6px
  ); // This is needed to account for the 5px active bar and 1px border-right.
  display: grid;
  grid-template-columns: 5px 1fr;
}

.barPlaceholder {
  height: 100%;
  &.purple {
    background: var(--medium-purple);
  }
  &.yellow {
    background: var(--medium-yellow);
  }
  &.blue {
    background: var(--medium-blue);
  }
  &.red {
    background: var(--medium-red);
  }
}

.touchOverlayGuard {
  background: rgba(0, 0, 0, 0);
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 3;
}
