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

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

.wrapper {
    background: $primaryGradient;
    background-size: 200% 200%;
    animation: gradientAnimation 4s ease infinite;
    position: relative;

    border-radius: $secondaryBorderRadius;
    padding: 0.25rem;
    $innerBorderRadius: calc(#{$secondaryBorderRadius} - 0.25rem);

    &.disabled {
      animation: none;
      cursor: not-allowed;
      user-select: none;
      
      .banner {
        opacity: .5;
        .button {
          cursor: not-allowed;
        }
      }
    }

    .streakBanner {
      background-size: cover;
      position: absolute;
      display: flex;
      align-items: center;
      top: -0.6875rem;
      right: -0.5rem;
      z-index: 10;
      width: 2.75rem;
      height: 3.75rem;

      .streakNumber {
        text-align: center;
        position: absolute;
        left: 33%;
        top: .9375rem;
        width: 1.5625rem;
        top: 1.2rem;
        left: 0.6625rem;
        z-index: 11;
        font-size: .8125rem;
        font-weight: 500;
        color: $yellowText;
        text-shadow: -0.0625rem -0.0625rem 
        $tertiaryBadgeBackground;
      }

      .streakLabel {
        position: absolute;
        bottom: 0;
        z-index: 11;
        font-size: .625rem;
        font-weight: 500;
        line-height: .5625rem;
        text-align: center;
        color: $primaryText;
        text-shadow: -0.0625rem -0.0625rem 
        $secondaryBackground;
      }
    }
    .banner {
      position: relative;
      display: flex;
      background-color: $tertiaryBackground;
      border-radius: $innerBorderRadius;
      background-size: cover;

      .image {
        height: 7.5rem;
        width: auto;
        border-radius: $innerBorderRadius 0 0 $innerBorderRadius;
      }

      .content {
        padding: 1rem;
        padding-left: 6.2rem;
        flex: 1;


        .title,
        .text {
          display: block;
          color: $primaryBackground;
        }
        .title {
          font-size: 1.125rem;
          font-weight: 500;
          line-height: 1.5rem;
          text-transform: uppercase;
        }
        .text {
          font-size: 0.875rem;
          margin-bottom: 0.75rem;
        }
        .button {
          background: $secondaryGradient;
          border: 2px solid $primaryBackground;
          box-shadow: 0 0.125rem 0 $primaryBackground;
          border-radius: $primaryBorderRadius;
          height: 2.25rem;
          width: 9.375rem;
          font-weight: 500;
          font-size: 0.875rem;
          width: 100%;
          text-transform: none;

            &:not(:disabled):hover {
              opacity: 1;
            }
        }
      }

      .reversed {
        padding-left: 1rem;
        padding-right: 6.2rem;
      }
    }
}