@import "../Tokens/tokens.scss";
@import "../../common/scss/helpers";

.sidenav {
  background: $gin;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-y: auto;

  @media(max-width: 1000px) {
    display: none;
  }
  
  .brand {
    margin-top: $baseUnit * 4;
    text-align: center;
    
    a {
      color: inherit;
      text-decoration: none;
      display: block;
    }
    
    .brand-logo {
      display: inline-block;
      width: 45px;
      margin-bottom: $baseUnit * 2;
      
      img {
        width: 100%;
        height: auto;
      }
    }
    
    .brand-name {
      font-size: 24px;
      font-weight: 700;
      line-height: 1.5;
    }
  }

  .sidenav-list-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0px;

    .sidenav-list {
      @include reset-list();
      text-align: center;
      width: 100%;
    }
  }
}

.sidenav-item {
  display: block;

  a, .sidenav-item-onclick {
    display: block;
    padding: ($baseUnit * 2.5) ($baseUnit * 4);
    text-decoration: none;
    border: 0;
    outline: 0;
    color: inherit;
    text-align: center;
    cursor: pointer;

    .sidenav-item-icon {
      display: inline-table;
      width: 24px;
      margin-bottom: $baseUnit * 1;

      img {
        width: 100%;
        height: auto;
      }
    }

    .sidenav-item-text {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.3px;
      user-select: none;
      line-height: 1.5;
    }
  }

  &.active {
    a {
      background: $swansDown;
    }
  }

  &:not(.active) {
    a, .sidenav-item-onclick {
      &:hover,
      &:focus {
        background: rgba($swansDown, 0.3);
      }

      &:focus {
        outline: 1px dotted #ccc;
      }
    }
  }
}

.sidenav-mini {
  display: flex;
  height: 75px;
  align-items: center;
  justify-content: space-between;
  padding: 0 ($baseUnit * 2);
  margin-bottom: $baseUnit * 2;
  margin-left: -($baseUnit * 2);
  width: 100vw;

  .brand {
    text-align: center;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border: 0;
    outline: 0;

    .brand-logo {
      display: inline-block;
      width: 29px;
      margin: 0 $baseUnit * 2;
      margin-top: 5px;
    }

    .brand-name {
      font-size: 18px;
      font-weight: 700;
    }
  }
  
  @media(min-width: 1001px) {
    display: none;
  }
}
