.post-reward {
  padding: 1rem;
  text-align: center;

  &:has(.reward-ways:empty) {
    display: none;
  }

  .comment {
    margin: 0.5rem 0;
    font-weight: 500;
  }

  .reward-ways {
    display: none;
  }

  .reward-input:checked~.reward-ways {
    display: block;
    padding-top: 20px;

    div {
      display: inline-block;
      @include user-select(none);
  
      span {
        display: block;
      }
  
      &:hover span[data-animation] {
        animation: fixit-var(animation-reward, jackInTheBox) 0.8s infinite linear;
        // The animation may affect :hover of img in dark mode
        pointer-events: none;
      }
  
      img {
        display: inline-block;
        margin: 0.8em 2em 0;
        max-width: 100%;
        width: fixit-var(reward-img-width);
      }
    }

    // `fixed` mode only supports desktop
    &[data-mode='fixed'] {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      padding: 1rem;
      background-color: fixit-var(global-background-color);
      @include z-index(fixed);
      @include border-radius;
      box-shadow: 0 0 1.5rem 0 rgba(0, 0, 0, 0.2);

      [data-theme=dark] & {
        box-shadow: 0 0 1.5rem 0 rgba(255, 255, 255, 0.2);
      }
    }
  }

  .reward-button {
    display: inline-block;
    box-sizing: border-box;
    cursor: pointer;
    outline: none;
    color: fixit-var(reward-color, lighten($reward-color, 5%));
    border: 2px solid lighten($reward-color, 10%);
    padding: 0.6rem 1rem;
    background-color: fixit-var(global-background-color);
    vertical-align: text-top;
    line-height: 1rem;
    @include border-radius;
    transition: all 0.3s ease-out;

    &:active,
    &:hover {
      color: #ffffff;
      border-color: fixit-var(reward-color);
      background-color: fixit-var(reward-color);
    }

    [data-theme=dark] & {
      border-color: lighten($reward-color, 5%);
    }
  }

  @include media('print') {
    display: none !important;
  }
}
