@import "styles/_variables";
@import "styles/mixins";

.wrapper {
  @include flex;

  position: relative;
  z-index: 1;
}

.sidebar {
  @include flex($direction: column, $align-x: space-between, $align-y: center);

  width: 64px;
  height: 100vh;
  padding: 8px 0 6px;
  background-color: var(--color-primary-9);
  box-shadow: 3px 0 5px var(--shadow-1);

  @include sm-down {
    width: 100%;
    height: 64px;
    padding: 0;

    @include flex($direction: row, $align-x: space-between, $align-y: center, $wrap: nowrap);
  }
}

.top,
.bottom {
  @include flex($direction: column, $align-x: center, $align-y: center);

  width: 100%;

  @include sm-down {
    flex-direction: row;
    flex-wrap: nowrap;
    width: auto;
  }
}

.sidebar-item {
  @include flex($align-y: center, $align-x: center);

  width: 100%;
  height: 64px;
  color: #fff;
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.2s ease;

  svg {
    width: 18px;
    height: 18px;
  }

  &-active {
    background-color: #07182b;
  }

  &:not(.logo) {
    height: 54px;

    @include sm-down {
      height: 64px;
    }
  }

  &:not(&-active):not(.logo) {
    @include hover {
      background-color: #082952;
    }
  }

  .avatar {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
}

@include sm-down {
  .sidebar-item {
    width: 64px;
    height: 64px;

    &.logo {
      width: 64px;
      height: 64px;
    }
  }
}

.anonymous {
  position: relative;
  text-decoration: none;

  span {
    position: absolute;
    left: calc(100% + 5px);
    padding: 5px;
    white-space: nowrap;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    opacity: 0;
    transition: 0.3s ease;
  }

  div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
  }

  &:hover {
    span {
      visibility: visible;
      opacity: 1;
    }
  }
}
