@use "sass:math";

@import '~styles/config';

.addServiceMenu {
  display: none;
  z-index: 2300;
  position: absolute;
  right: 0;
  top: 0;

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

  @media (min-width: $min-tablet) {
    max-width: 425px;
    min-width: 425px;
  }

  background-color: #fff;

  animation: fadein $transition-enter ease-in-out;

  &.isVisible {
    display: block;
  }

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

  &__row {
    display: flex;
    flex-direction: column;

    @media (min-width: $min-mobile) {
      flex-direction: row;
    }
  }

  &__col {
    @include grid-col;
    @media (max-width: $max-mobile) {
      &:first-child {
        padding-bottom: 0;
      }
    }

    @media (min-width: $min-mobile) {
      @include grid-col(percentage(math.div(6, 12)));
      padding-left: $gutter;
      padding-right: $gutter;
    }

    @media (min-width: $min-mobile) and (max-width: $max-tablet) {
      &:first-child {
        width: calc(50% - 15px);
      }

      &:last-child {
        width: calc(50% + 15px);
      }
    }

    display: flex;
    flex-direction: column;
    padding: $gutter;
  }

  &__heading {
    @include reset-heading;
    margin-bottom: $gutter;

    font-size: 17px;
    font-weight: 600;
  }

  &__link {
    @include reset-anchor;
    @include responsive-font(14, 15);
    display: flex;
    align-items: center;

    padding: 0 0 15px;

    &:last-child { padding-bottom: 0; }

    cursor: pointer;

    user-select: none;

    font-weight: 500;

    &:hover,
    &:focus {
      @media (min-width: $min-tablet) {
        @include colorify('color');
      }
    }
    transition: color 300ms ease-in-out;
  }

  &__link:focus &__svg,
  &__link:hover &__svg {
    @media (min-width: $min-tablet) {
      fill: $color-white;
    }
  }

  &__link:hover &__icon,
  &__link:focus &__icon {
    @media (min-width: $min-tablet) {
      @include colorify('background');
      @include colorify('border-color');
    }
  }

  &__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 48px;

    width: 48px;
    border-radius: 24px;
    border: 1px solid $color-grey100;

    transition:
      background-color 300ms ease-in-out,
      border-color 300ms ease-in-out;
  }

  &__svg {
    transition: fill 300ms ease-in-out;
    @include colorify('fill');

  }

  &__label {
    padding-left: $gutter*0.5;
    width: calc(100% - 48px);
  }
}

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

  100% {
    opacity: 1;
  }
}
