.sidebar-compact-switch {
  position: relative;
  width: 24px;
  height: 12px;
  border-radius: 10px;
  border: 1px solid #666;
  cursor: pointer;
  z-index: 999999;
  opacity: 1;
  transition: left 0.3s, opacity 0.1s;
  span {
    position: absolute;
    left: 1px;
    top: 1px;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    transition: all $sidebarTrnTime $transitionTiming;
  }
  &.active {
    background: #444;
    span {
      left: 13px;
      background: #ffffff;
    }
  }
}

.branding {
  display: flex;
  align-items: center;
  position: fixed;
  padding: 0 16px;
  width: $sidebar-width;
  height: 64px;
  line-height: 64px;
  top: 0;
  left: 0;
  z-index: 999;
  color: #444;
  background: #ffffff;
  transition: all $sidebarTrnTime $transitionTiming;
  overflow: hidden;
  .app-logo {
    width: auto;
    height: 20px;
    margin-right: 8px;
  }
  .app-logo-text {
    width: auto;
    font-size: 20px;
    font-weight: 400;
  }
}

.app-user {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 0px 20px;
  margin: 2rem 0px;

  .app-user-photo {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    box-sizing: border-box;
    border-radius: 50%;
    margin-left: 16px;
  }
  .app-user-controls {
    .mat-icon-button:not(:first-child) {
      margin: 0 2px;
    }
  }
  img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
  }
  .app-user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.96);
  }
}

.app-admin-container.sidebar-compact {
  .sidebar-compact-switch {
    opacity: 0;
    left: -2rem;
  }
  .branding {
    width: $compact-sidebar-width;
    padding: 0;
    .app-logo {
      margin: auto;
    }
  }
  .app-user {
    padding: 0.5rem 0;
    .app-user-photo {
      width: 40px;
      height: 40px;
      margin-bottom: 0;
      margin-left: 12px;
    }
  }
  .app-user-name,
  .app-user-controls,
  .app-logo-text {
    display: none !important;
  }
}

[dir="rtl"] {
  .sidebar-compact-switch {
    left: auto;
    right: 12rem;
  }
  .branding {
    top: 0;
    left: auto !important;
    right: 0;
    .app-logo {
      margin-right: 0;
      margin-left: 8px;
    }
  }
}