@import "constants/index.scss";

$drawer-offset: 60px;

.drawerWrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  z-index: $z-index;
  pointer-events: none;
  * {
    -webkit-font-smoothing: antialiased;
  }
}

.drawerOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0;
  transition: 0.2s linear;
  pointer-events: auto;
  &.drawerActive {
    opacity: 0.8 !important;
  }
}

.drawer {
  opacity: 0;
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  width: $drawer-width;
  background-color: #fff;
  outline: none;
  box-sizing: border-box;
  transition: transform 0.5s cubic-bezier(0.175, 0.5, 0.12, 1),
    opacity 0.5s cubic-bezier(0.175, 0.5, 0.12, 1),
    width 0.2s cubic-bezier(0, 0, 0.58, 1);
  transform: translate3d($drawer-width, 0, 0);
  // overflow: hidden;
  pointer-events: auto;
  * {
    font-family: "Roboto", sans-serif;
  }

  &.drawerActive {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  }

  &.noDisable {
    opacity: 1 !important;
  }

  &.left {
    right: auto;
    left: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transform: translate3d(-1 * $drawer-width, 0, 0);
  }
}
