.lifi {
  --drawer-width: 480px;
}

.lifi__widget {
  display: flex;
  flex: 1;
}

.lifi__widget-iframe {
  height: 100%;
  width: 100%;
  min-width: 320px;
  min-height: 960px;
  overflow: hidden;
  border: none;
  display: flex;
  user-select: none;
}

.lifi__drawer {
  display: none;
}

.lifi__drawer__overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  opacity: 0;

  transition: opacity 0.3s;
  will-change: opacity;
  background-color: #000;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.lifi__drawer__wrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  z-index: 9999;
  overflow: auto;

  transition: transform 0.3s;
  will-change: transform;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  -webkit-transform: translate3d(103%, 0, 0);
  transform: translate3d(103%, 0, 0);
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 6px #555;
}

.lifi__drawer__close {
  position: absolute;
  top: 0;
  margin: 12px;
  padding: 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOSA2LjQxIDE3LjU5IDUgMTIgMTAuNTkgNi40MSA1IDUgNi40MSAxMC41OSAxMiA1IDE3LjU5IDYuNDEgMTkgMTIgMTMuNDEgMTcuNTkgMTkgMTkgMTcuNTkgMTMuNDEgMTJ6Ij48L3BhdGg+PC9zdmc+");
  width: 24px;
  height: 24px;
}

.lifi__drawer.lifi__is-active {
  display: block;
}

.lifi__drawer.lifi__is-visible .lifi__drawer__wrapper {
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.lifi__drawer.lifi__is-visible .lifi__drawer__overlay {
  opacity: 0.5;
}

.lifi__button {
  background-color: transparent;
  position: fixed;
  width: 48px;
  top: 50%;
  z-index: 9999;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: none;
  height: auto;
  padding: 0;
  margin: 0;
  transition: transform 0.3s;
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  outline: none;
}

.lifi__is-visible+.lifi__button {
  -webkit-transform: translate3d(-100vw, 0, 0);
  transform: translate3d(-100vw, 0, 0);
}

.lifi__button__content {
  color: #fff;
  background: #000;
  font-size: 18px;
  writing-mode: vertical-rl;
  transform: rotateZ(180deg);
  cursor: pointer;
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: row;
  z-index: -1;
  align-items: center;
  min-height: 118px;
  justify-content: flex-end;
}

.lifi__button--right {
  right: 0;
}

.lifi__button--right .lifi__button__content {
  border-radius: 0 8px 8px 0;
}

.lifi__button__arrow {
  width: 24px;
  height: 24px;
  display: inline-block;
  position: relative;
  margin: 8px 0 0 0;
}

.lifi__button__arrow::before,
.lifi__button__arrow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  width: 2px;
  height: 12px;
  background-color: #fff;
  display: inline-block;
  transition: transform 0.3s;
  /* will-change: transform; */
}

.lifi__button__arrow::before {
  top: 2px;
  transform: rotate(-45deg) translateZ(0);
}

.lifi__button__arrow::after {
  top: 10px;
  transform: rotate(45deg) translateZ(0);
}

.lifi__button[aria-expanded=true] .lifi__button__arrow::before {
  transform: rotate(45deg) translateZ(0);
}

.lifi__button[aria-expanded=true] .lifi__button__arrow::after {
  transform: rotate(-45deg) translateZ(0);
}

.lifi__button__text {
  flex: 1;
  position: relative;
}

.lifi__button__text>span {
  opacity: 1;
  transition: opacity 0.3s;
}

.lifi__button__text::before {
  content: 'Hide';
  opacity: 0;
  bottom: calc(50% - 20px);
  position: absolute;
  display: flex;
  height: 40px;
  justify-content: center;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateZ(0);
}

.lifi__button[aria-expanded=true] .lifi__button__text::before {
  opacity: 1;
  transform: translateZ(0);
}

.lifi__button[aria-expanded=true] .lifi__button__text>span {
  opacity: 0;
  transform: translateZ(0);
}

@media only screen and (min-width: 480px) {
  .lifi__drawer__wrapper {
    max-width: var(--drawer-width);
  }

  .lifi__is-visible+.lifi__button {
    -webkit-transform: translate3d(calc(var(--drawer-width) * -1), 0, 0);
    transform: translate3d(calc(var(--drawer-width) * -1), 0, 0);
  }
}
