#ftw-mobile-menu {
  @include translate(-100%);
  z-index: $zindex-portal-top + $zindex-header + $zindex-dropdown;
  position: absolute;
  top: 0;
  width: 100%;
  font-size: $font-size-medium;
  max-width: calc(100% - #{$size-mobile-button});

  &.open {
    @include translate();
    max-width: none;
  }

  > ul {
    margin: 0;
    position: absolute;
    top: $size-mobile-button;
    box-shadow: $box-shadow-primary;
  }
}

#offcanvas-content {
  height: 100vh;
  transition: transform .2s ease-in-out;
}

#ftw-mobile-wrapper {
  @include tablet {
    display: none;
  }
}

#ftw-mobile-menu-overlay {
  @include linear-gradient(
    to left,
    #29323c,
    #485563
  );
  cursor: pointer;
  visibility: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: $zindex-overlay;
  opacity: .8;
}

@include ie-only("#ftw-mobile-menu-overlay") {
  left: calc(100% - #{$size-mobile-button});
}

html.menu-open {
  overflow: hidden;
}

.menu-open {

  body {
    overflow: hidden;
  }

  #offcanvas-content {
    @include transform(translate(100%) translate(-$size-mobile-button));
    @include screen-large() {
      @include transform(none);
    }
  }

  #ftw-mobile-menu {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
  }

  #ftw-mobile-menu-overlay {
    visibility: visible;
  }
}

.mobile-menu-navigation-mobile-button {
  &:before {
    pointer-events: none;
    @include linear-gradient(
      to right,
      rgba(255,255,255, 0),
      $color-content-background 80%
    );

    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 1;
    height: $size-mobile-button;
  }
}

// plone.app.multilingual
#portal-languageselector-wrapper {
  @include screen-large() {
    display: block;
  }
  display: none;
}
