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

.backdrop {
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: $backdrop;
  backdrop-filter: blur(0.5rem);
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrapper {
  position: relative;
  width: 34.875rem;
  display: flex;
  flex-direction: column;
  background-size: cover;
  background-color: $neutral-700;
  border-radius: $tertiaryBorderRadius;
  border: 0.25rem solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient($secondaryBackground, $secondaryBackground),
    linear-gradient(152.35deg, rgba(207, 162, 255, 0.6) 9.38%, rgba(78, 25, 168, 0.6) 96.89%);
}

.closeButton {
  font-size: inherit;
  margin-right: 0.5625rem;
  margin-top: 0.813em;
  margin-left: auto;
  display: block;
  width: 2em;
  height: 2em;
  background: none;
  border: none;
  cursor: pointer;
  svg {
    width: 2em;
    height: 2em;
  }
}

.contentWrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem 2rem 2rem;
  background-image: url('/src//legends/public/images/stakeModalSmokeAndLight.png');
  background-size: 41rem 30rem;
  background-repeat: no-repeat;
  background-position: center -20%;
}

.title {
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  margin: 0 auto 1rem auto;
  color: $whiteText;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
  background-color: $mainBg;
  border-radius: 1rem;
  padding: 0.5rem;

  .tab-group {
    display: flex;
    border-radius: 2rem;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  button {
    border: none;
    background: transparent;
    color: $mainText;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.55rem 1.855rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;

    &.activeTab {
      background: rgba($neutral-600, 0.3);
      color: $mainText;
      box-shadow: none;
    }

    &:not(.activeTab):hover {
      color: #fff;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }
}

.infoWrapper {
  min-width: 21.875rem;
  display: flex;
  flex-direction: column;
}
.infoRow {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.apyInfo {
  color: #02f3bf;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1rem;
  line-height: 2.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.label {
  font-size: 0.875rem;
  color: $secondaryText;
  margin-bottom: 0.25rem;
  line-height: 1.5rem;
}

.stakeInputValueUsd {
  font-size: 0.875rem;
  color: $secondaryText;
  margin-top: 0.25rem;
}

.stakeInputValueUsd {
  text-align: right;
}

.stakedTotalRow {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  .label {
    flex: 1;
    text-align: left;
  }
}

.stakeInputRow {
  width: 100%;
}

.stakeInputMaxRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stakeInputMax {
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: $mainText;
}

.stakeInputErrorWrapper {
  display: flex;
  justify-content: space-between;

  .error {
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: $red-400;
  }
}
.percentageButton,
.stakeInput {
  display: flex;
  border-radius: 0.5rem;
  border: 1px solid rgba($neutral-600, 0.2);
  font-size: 1.175rem;
  outline: none;
  border-radius: 6.25rem;
}

.stakeInput {
  text-align: left;
  background: rgba($neutral-600, 0.1);
  color: $secondaryText;
  width: 100%;
  font-weight: 500;
  padding: 0.75rem 1rem;
}
.percentageButton {
  flex: 1;
  font-weight: 300;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  justify-content: center;
}

.stakeButtons {
  gap: 0.5rem;
  display: flex;
  margin-top: 0.25rem;
}
.blur {
  filter: blur(5px) brightness(0.5);
}

.lockPeriodInfo {
  max-width: 75%;
  font-weight: 400;
  font-size: 0.75rem;
  text-align: center;
  color: $secondaryText;
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.visibleLockPeriodInfo {
  max-height: 6.25rem;
}

.stakeButton {
  @include primary-button;
  min-width: 30.875rem;
  min-height: 4rem;
  font-size: 1.25rem;
  font-weight: 400;
}

.activeTab {
  background: linear-gradient(90deg, #a084ff 0%, #6f4aff 100%);
  color: $whiteText;
}

.actionLabel {
  font-size: 1.25rem;
  color: $mainText;
  font-weight: 500;
  line-height: 2.5rem;
}

.infoIcon {
  padding-left: 0.5rem;
  padding-right: 1rem;
  color: $secondaryText;
  cursor: pointer;
}

.readyToWithdrawText {
  position: absolute;
  align-self: center;
  margin-top: 25%;
  padding: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.readyToWithdrawText :nth-child(1) {
  font-weight: bold;
  font-size: 1rem;
}

.readyToWithdrawText :nth-child(2) {
  font-weight: 500;
  font-size: 1.5rem;
}

.readyToWithdrawText :nth-child(3) {
  font-weight: 700;
  font-size: 0.75rem;
  color: $secondaryText;
}

.timerContainer {
  position: absolute;
  align-self: center;
  margin-top: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timerContainer > :nth-child(2) {
  font-weight: 500;
  font-size: 1.25rem;
}

.timerContainer > :nth-child(4) {
  font-weight: 500;
  font-size: 1.25rem;
}

.learnMore {
  font-weight: 400;
  font-style: Regular;
  font-size: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  margin-bottom: 1rem;

  text-align: center;
  vertical-align: middle;
  a {
    color: #4872ff;
  }
}

.warningModal {
  gap: 2rem;
  border-color: #e7aa27;
  align-items: center;
  display: flex;
  flex-direction: column;
  width: 35rem;
  .heading {
    font-weight: 500;
    font-size: 2.5rem;
  }
  .infoText {
    font-weight: 300;
    font-style: Light;
    font-size: 1.25rem;
    line-height: 2rem;
    text-align: center;
  }
  .buttonWrapper {
    display: flex;
    gap: 2rem;
    width: 100%;
    .cancelButton {
      @include gray-button;
      font-size: 1.25rem;
    }
    .confirmButton {
      @include primary-button;
      font-size: 1.25rem;
    }
  }
}
