@import '@legends/styles/base.scss';

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.wrapper {
  position: absolute;
  z-index: 5;
  background-color: $secondaryBackground;
  width: 20rem;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  overflow: hidden;
  transition: left 0.3s, opacity 0.2s;

  &:not(.open) {
    left: -50%;
    opacity: 0;
    pointer-events: none;
  }

  &.open {
    left: 0;
    opacity: 1;
    pointer-events: auto;
  }

  .wheelBanner {
    margin-bottom: 1.25rem;
  }

  .top {
    position: static;
    .bannerText {
      font-size: 0.75rem;
      margin-bottom: 0.75rem;
      color: $primaryBackground;
    }
    .disabled {
      opacity: 0.5;
      animation: none;
      cursor: not-allowed;
      user-select: none;

      .wheelButton {
        pointer-events: none;
      }
    }

    .tooltip {
      background-color: $tertiaryBackground;
      border: 1px solid $primaryBorder;
      border-radius: $primaryBorderRadius;
      padding: 1.25rem 1.5rem;
      font-size: 1rem;
      color: $secondaryText;
      opacity: 1;
    }

    .closeButton {
      position: absolute;
      top: 1rem;
      left: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      height: 2rem;
      background-color: $tertiaryBackground;
      border: 1px solid $primaryBorder;
      border-radius: $primaryBorderRadius;
      font-size: 1rem;
      color: $secondaryText;
      cursor: pointer;
    }

    .logo {
      display: block;
      margin: 0 auto;
      margin-bottom: 3.125rem;
      width: 12.5rem;
      height: auto;
    }

    .links {
      padding-top: 2rem;
      padding-left: 1rem;
    }
  }

  .leaderSection {
    padding-top: 1rem;
    padding-bottom: 3.75rem;

    .leaderHeader {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.35rem;

      .inviteTitle {
        font-size: 1rem;
        font-weight: 400;
        line-height: 1.5rem;
        color: $quaternaryText;
      }
    }

    .leaderCopyButton {
      cursor: pointer;
      color: $neutral-600;
    }

    .leaderInvitationKey {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.5rem;
      background: $primaryBackground;
      padding: 0.25rem 0.625rem;
      gap: 10px;
      border-radius: 0.5rem;
      border-radius: $primaryBorderRadius;
      background: $primaryBackground200;
      font-size: 1rem;
      font-weight: 400;
    }
  }


  @include breakpoint-from(large-tablet) {
    position: static;

    &:not(.open) {
      left: 0;
      opacity: 1;
      pointer-events: auto;
    }

    .top {
      .closeButton {
        display: none;
      }
    }
  }

  @media screen and (max-height: 750px) {
    .top {
      .logo {
        width: 10rem;
        height: auto;
      }
      .links {
        padding-top: 1rem;
      }
    }

    .leaderSection {
      padding-bottom: 1rem;
    }
  }

  @media screen and (max-height: 900px) {
    .top {
      .links {
        padding-top: 2.9375rem;
      }
    }

    .leaderSection {
      padding-top: 0.5rem;
    }
  }

  @include on-mobile {
    .top {
      .links {
        padding-top: 0;
      }
    }
  }
}
