@import '../styles/_variable.scss';
@import '../styles/_util.scss';

@media screen and (max-height: 700px) {
  .download {
    s .content {
      div.card-container {
        background-color: transparent;
      }
    }
  }
}

.download {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background-size: cover;

  .content {
    position: relative;
    z-index: 2;
    padding-top: $header-height;
    padding-bottom: $header-height;

    .jump-app-store {
      position: absolute;
      top: 1rem;
      right: 1rem;
      a {
        text-decoration: underline;
        font-weight: bold;
      }
    }

    .card-container {
      width: 27rem;
      text-align: center;
      background-color: $white;
      border-radius: 4px;
    }

    .app-logo {
      text-align: center;

      img {
        width: 4.5rem;
        height: 4.5rem;
        border-radius: 1rem;
      }

      i {
        font-size: 4.5rem;
      }
    }

    .app-name {
      margin-top: 0.75rem;
      margin-bottom: 0.5rem;
      color: rgba(0, 0, 0, 0.8);
      font-weight: bold;
      font-size: 1.25rem;
      line-height: 1.75rem;
      text-align: center;
    }

    .rate {
      height: 24px;
      font-size: 15px;
      line-height: 24px;

      .star-list {
        display: inline-block;
      }

      .ant-rate {
        color: #f4993c;
        font-size: 18px;
      }

      .ant-rate-star {
        margin-right: 2px;
      }

      .v-line {
        display: inline-block;
        width: 1px;
        height: 60%;
        margin: 0 8px;
        background-color: #c7c9ca;
      }
    }

    .tag-list {
      margin-top: 1rem;

      .tag {
        display: inline-block;
        margin-right: 8px;
        padding: 6px 12px;
        color: $white;
        font-size: 12px;
        background-color: #26ad77;
        border-radius: 20px;
      }
    }

    .ant-tabs-nav .ant-tabs-tab {
      margin: 0 2rem;
      padding: 9px 0;
      font-weight: bold;

      &:last-child {
        margin-right: 0;
      }
    }

    .ant-tabs-ink-bar {
      bottom: 2px;
      height: 4px;
      border-radius: 10px;
    }

    .preview-img-list {
      display: flex;
      padding: 0 1rem;
      overflow-x: auto;

      &::-webkit-scrollbar {
        width: 0;
      }

      img {
        width: 7.5rem;
        height: 12rem;
        margin-left: 0.5rem;
        border: 1px solid #c7c9ca;
        border-radius: 8px;

        &:first-child {
          margin-left: 0;
        }
      }
    }

    .tips {
      margin-bottom: 0.25rem;
      color: rgba(0, 0, 0, 0.4);
      font-size: 13px;
      line-height: 22px;
      letter-spacing: 0;
      text-align: center;
      word-break: break-all;

      & + .tips {
        margin-bottom: 2.5rem;
      }
    }

    .line {
      height: 1px;
      margin-bottom: 1.5rem;
      background-color: #f0f2f6;
    }

    .version-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      margin-bottom: 1.5rem;

      .version-item {
        margin-right: 0.75rem;
        margin-bottom: 1rem;
        padding: 0.25rem 0.75rem;
        color: rgba(0, 0, 0, 0.4);
        font-size: 14px;
        line-height: 1.25rem;
        border: 1px dotted rgba(0, 0, 0, 0.4);
        //border-style: dotted;
        border-radius: 0.875rem;
        cursor: pointer;

        &.active {
          color: $primary;
          border: 1px solid $primary;
        }
      }
    }

    .app-provider {
      padding: 0 1.25rem;
      color: #bbbbbb;
      letter-spacing: -0.2px;
    }

    .app-desc {
      position: relative;
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
      padding: 0 1.25rem;
      line-height: 2;
      text-align: justify;

      .expand {
        position: absolute;
        right: 1.25rem;
        bottom: 2px;
        color: #bbbbbb;

        i {
          font-size: 12px;
        }
      }
    }

    .button-wrap {
      position: fixed;
      bottom: 2rem;
      left: 50%;
      text-align: center;
      transform: translateX(-50%);

      button {
        height: 2.2rem;
        padding-right: 3rem;
        padding-left: 3rem;
        font-size: 16px;
        display: flex;
        align-items: center;
      }
    }

    .recommend-list {
      padding: 0 1.25rem;
    }

    .recommend-app {
      margin-bottom: 1rem;

      img {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 0.6rem;
      }

      .install {
        display: inline-block;
        margin-top: 4px;
        padding: 2px 10px;
        color: $primary;
        background-color: rgba($primary, 0.1);
        border-radius: 6px;
      }
    }
  }

  &.full-bg {
    .content {
      .provider {
        color: #efefef;
        font-size: 13px;
        line-height: 22px;
      }

      .ant-tabs {
        color: #c7c9ca;
      }

      .ant-tabs-nav .ant-tabs-tab-active {
        color: #efefef;
      }
    }
  }

  .full-gallery {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 999;
    width: 100vw;
    height: 100vh;
    background-color: #2e2e2e;

    .img-wrap {
      height: 100vh;
    }

    img {
      position: relative;
      top: 50%;
      width: 100vw;
      margin-right: 0;
      border: none;
      border-radius: 0;
      transform: translateY(-50%);
    }
  }

  .invisible {
    visibility: hidden;
  }

  @include sm-width() {
    .content {
      padding-top: 4.7rem;
      padding-bottom: 4rem;

      .card-container {
        width: 100%;

        .download-notice {
          display: none;
        }

        .version-list {
          margin-bottom: 1rem;
        }

        .version-notice + .version-notice {
          margin-bottom: 1.25rem;
        }
      }
    }
  }
}
