@import '~styles/config';

.userMenu {
  position: absolute;
  top: 64px;

  z-index: 2300;

  width: auto;

  @media (min-width: $min-mobile) {
    top: 75px;
  }

  @media not all and (min-width: $min-tablet) {
    right: 0;
    width: 50vw;
    min-width: 170px;
  }

  @media (min-width: $min-tablet) {
    top: 90px;
    right: 160px;
  }

  background-color: #fff;

  transition: top 300ms ease-in-out;
  animation: fadein $transition-enter ease-in-out;

  // small arrow at top
  &::before {
    content: '';
    position: absolute;
    right: 56px;
    top: -5px;

    @media not all and (min-width: $min-tablet) {
      right: 111px;
    }

    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #fff;
    box-shadow: 0 20px 70px 0 rgba(32, 32, 32, 0.15);
  }

  &__shadow {
    width: 100%;
    height: 100%;
    box-shadow: 0 20px 70px 0 rgba(32, 32, 32, 0.15);
  }

  &__top {
    display: flex;
    flex-direction: column;
    padding: 15px 10px 10px;
  }

  &__bottom {
    display: flex;
    flex-direction: column;
    padding: 10px;

    border-top: 1px solid $color-grey100;
  }

  &__button {
    @include reset-button;
    @include responsive-font(12, 15);

    padding: 15px 30px;
    cursor: pointer;

    user-select: none;

    font-weight: 500;
    text-align: left;

    &:hover,
    &:focus {
      @include colorify('color');
    }
  }

  &__link {
    @include reset-anchor;
    @include responsive-font(16, 18);

    padding: 15px 30px;
    cursor: pointer;

    user-select: none;

    font-weight: 500;

    &:hover,
    &:focus {
      @include colorify('color');
    }
  }
}

@keyframes fadein {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}
