/**
* Name: Userbadge
* Author: Symbiosys
*/

.os-userbadge {

  @include breakpoint(md) {
    display: flex;
  }

  .badge {
    width: 4rem !important;
    height: 4rem;
    background: $os-dark;
    color: $white;
    display: none !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    margin-right: 0 !important;

    @include breakpoint(md) {
      display: flex !important;
    }
  }

  > button {
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
    display: none;

    @include breakpoint(md) {
      display: block;
    }

    i {
      transition: transform .3s;
    }

    &:hover {
      i {
        transform: translateY(.5rem);
      }
    }
  }

  &.visible + .userInfos {
    opacity: 1;
    top: calc(100% + 1rem);
    pointer-events: all;
  }

  & + .userInfos {
    padding-top: 1rem;
    
    @include breakpoint(md) {
      position: absolute;
      right: 0;
      opacity: 0;
      top: calc(100% + 2rem);
      display: flex;
      flex-direction: column;
      white-space: nowrap;
      background: $white;
      border: .1rem solid $os-light;
      padding: 1rem;
      transition: all .3s;
      pointer-events: none;

      > a.nav__item {
        margin: 0;
        margin-bottom: 1rem !important;
      }
    }
  }
}
