.toolbar-menu {
  width: auto;

  .dropdown-toggle:after {
    display: none;
  }

  .dropdown {
    float: right;
  }

  .dropdown-menu {
    padding: 0;
    overflow: visible;
    margin-top: 0.25rem;

    &::before {
      margin-left: rem(302);
    }

    &::after {
      margin-left: rem(302);
    }
  }
}


body.user-menu-open {
  overflow: hidden;
}

@include media-breakpoint-down("xs") {
  .main-user-menu {

    .dropdown-menu {
      position: fixed !important;
      top: 56px !important;
      left: 0 !important;
      transform: none !important;
      width: 100%;
    }

    &.with-caret.caret-right .dropdown-menu:before,
    &.with-caret.caret-right .dropdown-menu:after {
      right: 26px;
    }

    .user-menu--account-list {
      width: 100%;
      height: calc(100vh - 215px);

      .scrollable {
        height: calc(100vh - 267px);
      }
    }

    .account-list-link {
      width: 100%;
    }
  }
}

div[aria-labelledby="user-menu"] {
  overflow: hidden;
  height: auto;
}

.toolbar-menu-item {
  background-color: transparent;
  border: none;

  &.dropdown-toggle .ico-menu {
    margin-top: -0.1875rem;
  }
}

.user-menu--account-list {
  background-color: $gray-75;

  a:hover {
    text-decoration: none;
  }

  .scrollable {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(80vh  - 267px);
  }
}

.account-list-link {
  @include clearfix;
  width: 20rem;
  display: block;
  padding: .25rem 1.25rem;
  background-color: $gray-75;
  border-bottom: solid 0.0625em $border-color;

  &:hover {
    background-color: $gray-75;
  }

  &:last-of-type {
    border-bottom: none;
  }

  &.current {
    background-color: $white;
  }

  button {
    margin-top: 0.5rem;
  }

  .account-list-link-circle {
    @include brand-font-h1();
    font-size: 1.5em;
    display: block;
    float: left;
    background-color: $blue-700;
    width: 4rem;
    height: 4rem;
    padding-top: 1rem;
    border-radius: 2rem;
    color: $white;
    text-align: center;
    margin-right: 1.25rem;
  }
}



.account-list-link-text {
  //@include brand-font-h4();
  @extend .mt-2;
  display: block;
  color: $gray-500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current .account-list-link-text {
  color: $gray-850;
}

.account-list-link-subtext {
  @include brand-font-h3();
  text-transform: uppercase;
  font-size: 0.75em;
  display: block;
  color: $gray-500;
}

.user-menu-actions {
  @include clearfix;
  padding: 0.75rem 1rem 0.5rem;
}


// Active

.active {
  .account-list-link {
    background-color: $blue-700;

    .account-list-link-text {
      color: $white;
    }
  }

  .hover-action-action {
    display: flex !important;
    height: 100%;
  }
}


.account-list-link:hover {
  > .hover-action-action {
    display: none;
  }
}

.current-account {
  width: auto;
  padding-left: 0;

  .current-account-item {
    display: flex;
    float:right;
  }

  .current-account-name {
    max-width: 185px;
    margin-right: 10px;
    margin-top: -2.5px;
    font-size:0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
  }

  .current-account-number {
    font-size:0.95rem;
    margin-top: -2.5px;
    margin-left: 2px;
    margin-right: 18px;
    text-align: right;
  }

  .algolia-autocomplete {
    width: 13.75rem;
    opacity: 1;
  }
}

.refresh-icon {
  background-color: $intense-orange !important;
  color: #fff !important;
  padding: 4px;
  border-radius: 50%;
  height: 22px;
  width: 22px;
  font-size: 14px;
}

.account-list-refresh-btn:hover .account-list-refresh-btn-text {
  color: #333;
}
