@import "../Styles/styles.scss";

@keyframes popup-sway {
  0%   { transform: rotate(-1deg); }
  25%  { transform: rotate(0deg); }
  50%  { transform: rotate(1deg); }
  75%  { transform: rotate(0deg); }
  100% { transform: rotate(-1deg); }
}

DailyBonusPopup {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  pointer-events: all;

  &.show {
    display: flex;
  }

  .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    pointer-events: none;
  }

  .popup {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 48px 56px;
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom: 3px solid #ffbf11;
    border-radius: 4px;
    min-width: 600px;

    .title {
      font-family: $font-secondary;
      font-size: 40px;
      letter-spacing: 4px;
      color: $text-primary-color;
      text-decoration: underline;
      text-decoration-thickness: 3px;
      text-underline-offset: 2px;
      animation: popup-sway 2s linear infinite;
    }

    .streak-track {
      flex-direction: row;
      gap: 12px;

      .streak-day {
        position: relative;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100px;
        height: 80px;
        border: 2px solid;
        border-radius: 4px;
        gap: 6px;
        transition: transform 0.15s ease;

        .checkmark {
          position: absolute;
          top: 0; left: 0;
          width: 100%; height: 100%;
          align-items: center;
          justify-content: center;
          background-color: rgba(0, 0, 0, 0.5);
          font-family: $font-secondary;
          font-size: 52px;
          text-stroke: 3px black;
        }

        .day-label {
          font-family: $font-secondary;
          font-size: 14px;
          letter-spacing: 2px;
        }

        .day-xp {
          font-size: 13px;
          color: rgba(255, 255, 255, 0.6);
        }

        &.current {
          transform: scale(1.08);

          .day-xp {
            color: rgba(255, 255, 255, 0.9);
          }
        }

        &.upcoming {
          border-color: rgba(255, 255, 255, 0.15);
          opacity: 0.5;

          .day-label {
            color: rgba(255, 255, 255, 0.4);
          }
        }
      }
    }

    .reward {
      flex-direction: column;
      align-items: center;
      gap: 4px;

      .reward-label {
        font-size: 14px;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.5);
      }

      .reward-xp {
        font-family: $font-secondary;
        font-size: 48px;
      }

      .streak-label {
        font-size: 14px;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.6);
      }
    }

    .claim-btn {
      padding: 16px 56px;
      background: linear-gradient(180deg, #ffe566 0%, #ffbf11 55%, #c98a00 100%);
      border-radius: 4px;
      font-family: $font-secondary;
      font-size: 22px;
      letter-spacing: 4px;
      color: #1c0f00;
      text-shadow: 0 1px 2px rgba(255, 230, 100, 0.6);
      transition: transform 0.1s ease;

      &:hover {
        background: linear-gradient(180deg, #ffed80 0%, #ffd020 55%, #e09500 100%);
        transform: scale(1.04);
      }

      &:active {
        background: linear-gradient(180deg, #c98a00 0%, #ffbf11 55%, #ffe566 100%);
        transform: scale(0.97);
      }
    }
  }
}
