/*
 *  Hamburger Menu
 *    Mobile-Centric openable menu with a hamburger icon to toggle.
 *
 *  Dependencies:
 *    styles/settings/animation.scss
 *    styles/settings/colors.scss
 *    styles/settings/z.scss
 *
 *  Version:
 *    1.1.0 - 2018/10/23
 */
@import '~@styles/global';

$c-hamburger-menu--max: 200%;
$c-hamburger-menu--pos-x: 100%;
$c-hamburger-menu--pos-y: 0%;

@include t-keyframes(c-hamburger-menu--open) {
  from { clip-path: circle(0% at $c-hamburger-menu--pos-x $c-hamburger-menu--pos-y); }
  to { clip-path: circle($c-hamburger-menu--max at $c-hamburger-menu--pos-x $c-hamburger-menu--pos-y); }
}

@include t-keyframes(c-hamburger-menu--close) {
  from { clip-path: circle($c-hamburger-menu--max at $c-hamburger-menu--pos-x $c-hamburger-menu--pos-y); }
  to { clip-path: circle(0% at $c-hamburger-menu--pos-x $c-hamburger-menu--pos-y); }
}

.c-hamburger-menu {

  &__menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: $s-color--menu__background;
    transition: all 1s $s-animation--ease-out;

    z-index: $s-z--menu;

    @include t-animation-fill-mode(forwards);
    @include t-animation-timing-function($s-animation--ease-out);
    @include t-animation-duration(0.4s);
  }

  &__links {
    @extend %t-list-blank;
    padding-top: 3em;
  }

  &__link {
    @extend %t-list-litem-blank;
    display: block;
    font-size: 1.25em;
    width: 100%;
    position: relative;
    background-size: 150%;

    &-link {
      position: relative;
      display: block;
      padding: 1.5em;
    }

    &--home {
      background-image: url('~@assets/images/patterns/game-show.svg');
    }

    &--contact {
      background-image: url('~@assets/images/patterns/lemon-triangle.svg');
    }

    &:hover:before {
      //@include t-translate-x(5%);  Disabled due to not being needed on mobile
    }
  }

  &__button {
    position: relative;//Helps us win the Z-Fight
    width: 100%;
    height: 100%;
    padding: 0.5em;
    cursor: pointer;
    z-index: $s-z--menu-button;
  }

  &__icon {
    display: block;
  }


  &.is-open {
    .c-hamburger-menu__menu {
      display: block;
      @include t-animation-name(c-hamburger-menu--open);
    }
  }

  &.is-closing {
    .c-hamburger-menu__menu {
      display: block;
      @include t-animation-name(c-hamburger-menu--close);
    }
  }
}
