@mixin AuthBox {
  $bg: #fbfbfb;
  $pop: #018ef5;
  $text: #555;
  $edge: lighten($text, 57%);
  $fade: border .3s ease-out;
  & {
    display: flex;
    flex-flow: nowrap column;
    overflow: hidden;
    border-radius: 3px;
  }
  .GroupsList {
    position: relative;
    display: flex;
    justify-content: center;
    padding: .75rem;
    background: linear-gradient(to right, white 10%, darken($bg, 1.25%) 75%);
    &:after {
      content: '▼';
      position: absolute;
      top: 50%;
      right: 0.75rem;
      transform: translate(-12px, -50%);
      z-index: 9999;
      font-size: 0.88em;
    }
    &:focus-within:after {
      color: $pop;
    }
    >select {
      flex: 1;
      margin: 0 4px;
      padding: 2px 4px;
      font: inherit;
      color: $text;
      border: 1px solid darken($edge, 6%);
      border-radius: 3px;
      outline-color: none;
      background: #fff;
      background-color: #fff;
      -webkit-appearance: none;
      -moz-appearance: none;
      -ms-appearance: none;
      appearance: none;
      outline: none;
      &:focus {
        border-color: $pop;
      }
    }
  }
  details {
    position: relative;
    border: solid transparent;
    margin: -1px 0;
    border-width: 1px 0;
    transition: $fade;
    &:last-child {
      margin-bottom: -2px;
    }
    >summary:first-child {
      display: flex;
      align-items: center;
      color: $text;
      font-weight: normal;
      padding: 0 0 0 1rem;
      border-radius: 0;
      background: linear-gradient(to right, white 10%, $bg 75%);
      cursor: pointer;
      user-select: none;
      > h3 {
        flex: 1;
        margin-bottom: 0;
        margin-left: .25rem;
        padding-left: .25rem;
        padding-right: .25rem;
        background: transparent;
        border-top: none;
        border-color: lighten($edge, 2%) !important;
        transition: $fade;
      }
      &:focus {
        outline: none;
        box-shadow:
          inset 0 0 0 1px $pop,
          0 0 0 1px solid $pop;
      }
    }
    &[open] {
      z-index: 2;
      border-color: $edge;
    }
    &:first-of-type {
      summary h3 {
        margin-top: -1px;
        border-top: 1px solid transparent !important;
      }
      &:not([open]) summary h3 {
        border-top-color: lighten($edge, 2%) !important;
      }
    }
    &:last-of-type:not([open]) summary h3 {
      border-bottom-color: transparent !important;
    }
  }
  form {
    input {
      margin-bottom: 0;
    }
  }
}

.AuthBox {
  #hub-reference .hub-auth-dropdown & { @include AuthBox }
}
