@import "@/styles/mixins.scss";
@import "@/styles/variables.scss";

.newVersion {
  color: $black;

  :global(.common-center-container) {
    border-bottom: 1px solid rgba($black, 15%);
    padding: $hl-4 0;
  }
}

.description {
  opacity: 0.8;
  margin-top: $hl-8;
}

.advantage {
  margin-top: $hl-8;

  li {
    position: relative;
    opacity: 0.8;
    padding-left: 20px;

    &:not(:last-child) {
      margin-bottom: $hl-9;
    }

    &:before {
      content: "";
      position: absolute;
      left: 0;
      top: calc((1.75rem - 8px) / 2);
      background: $green-lawn;
      border-radius: 100%;
      width: 8px;
      height: 8px;
    }
  }
}

.agree {
  margin-top: $hl-8;

  p {
    position: relative;
    @include p2();
    padding-left: 1.625rem;

    i {
      position: absolute;
      left: 0;
      top: 50%;
      cursor: pointer;
      text-align: center;
      color: rgba($black, 80%);
      font-size: 1.125rem;
      width: 1.125rem;
      height: 1.125rem;
      line-height: 1.125rem;
      transform: translateY(-50%);

      &:hover {
        color: $black;
      }
    }

    :global(.icon-checkbox-active) {
      color: $blue;
    }

    span,
    a {
      display: inline-block;
      opacity: 0.8;
    }

    a {
      text-decoration: underline;

      &:hover {
        opacity: 1;
      }
    }
  }
}

.softwarePackage {
  margin-top: $hl-9;
}

.softwarePackageInner {
  display: flex;
  align-items: center;
  background: $grey-light;
  border: 1px solid rgba($black, 15%);
  border-radius: $radius;
  max-width: 33rem;
  padding: $hl-8;

  &>div {
    flex: 1;
  }

  p {
    @include p2();
    opacity: 0.6;
  }
}

.warm {
  color: $pink-light;
  @include p2();
  margin-top: $hl-9;
}

.support {
  display: flex;
  flex-wrap: wrap;
  @include on-desktop() {
    flex-direction: row;
    align-items: center;
  }
  @include on-mobile() {
    flex-direction: column;
    align-items: flex-start;
  }

  line-height: 2rem;
  margin-top: $hl-9;

  &_os {
    color: rgba($black, 80%);
    margin-right: 2rem;
    img {
      float: left;
      width: 2rem;
      height: 2rem;
      margin-right: .25rem;
    }
  }

  &_manual {
    display: flex;
    a {
      color: $blue;
      line-height: 46px;
      &:hover {
        text-decoration: underline;
      }
    }
    &_English {
      margin-left: 1.5rem;
    }
  }
}

.linkList {
  color: $blue;
  margin-top: $hl-8;

  li:not(:last-child) {
    margin-bottom: $hl-9;
  }

  a {
    color: $blue;

    &:hover {
      text-decoration: underline;
    }
  }
}

.tooltipLi {
  position: relative;
  display: inline-block;

  &:hover .tooltip {
    display: block;
  }

  .tooltip {
    display: none;
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 100%;
    width: 7.5rem;
    padding-top: 0.75rem;
    transform: translateX(-50%);

    .tooltipInner {
      position: relative;
      background: $white;
      border: 1px solid rgba($black, 15%);
      box-shadow: $shadow-long;
      border-radius: $radius;
      padding: $hl-9 0;

      &::before,
      &:after {
        content: "";
        position: absolute;
        left: 50%;
        top: -0.75rem;
        transform: translateX(-50%);
        border-left: .75rem solid transparent;
        border-right: .75rem solid transparent;
        border-bottom: .75rem solid rgba($black, 15%);
      }

      &:after {
        border-bottom-color: $white;
        margin-top: 1px;
      }
    }

    a {
      display: block;
      text-align: center;
      color: $black;
      padding: $hl-10 $hl-9;

      &:hover {
        background: $grey-light;
        text-decoration: none;
      }
    }
  }
}

.newVersion .download_button,
.historyVersion .download_button {
  background: linear-gradient(141.27deg, $green-lawn 22.25%, #49B17F 78.93%);
  border: none;
  color: $white;
  transition: all 0s;

  &:hover,
  &:active,
  &:focus {
    background: #3b9960;
    color: $white;
  }

  &:focus:not(:active),
  &.is-focused:not(:active) {
    box-shadow: none;
  }
}

.historyVersion {
  color: $black;
  padding: $hl-4 0 $hl-3 0;

  .agree {
    margin-top: $hl-6;
  }
}

.btnContent {
  margin-top: $hl-9;
}

.choice {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
}

.choiceVersion {
  margin-top: $hl-8;
  margin-right: 2rem;
  p {
    margin-bottom: $hl-10;
  }

  & > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
}

.versionSelect {
  width: 19rem;

  :global(.select__control) {
    border-color: rgba($black, 15%);
    border-radius: .375rem;
    min-height: 3rem;

    &:hover {
      border-color: rgba($black, 30%);
    }

    &:global(.select__control--is-focused),
    &:global(.select__control--menu-is-open) {
      box-shadow: none;
    }

    &:global(.select__control--menu-is-open) {
      border-color: $blue;
    }
  }

  :global(.select__value-container) {
    cursor: pointer;
    padding: .625rem 1rem;
  }

  :global(.select__single-value) {
    color: $black;
    max-width: 100%;
    margin: 0;
  }

  :global(.select__indicator-separator) {
    display: none;
  }

  :global(.select__dropdown-indicator) {
    color: rgba($black, 40%);
    font-size: 1.5rem;
    padding: 0 .5rem;
  }
}

.choiceSoftwarePackage {
  >label {
    display: inline-flex;
    cursor: pointer;
    line-height: 1.75;

    &:not(:last-child) {
      margin-right: $hl-7;
    }

    .radio {
      border: 1px solid rgba($black, 80%);
      border-radius: 100%;
      width: .875rem;
      height: .875rem;
      margin: 0.6rem 0.5rem 0 0;

      &:hover {
        border-color: $black;
      }

      &.active {
        position: relative;
        border-color: $blue;

        &:before {
          content: "";
          position: absolute;
          left: 50%;
          top: 50%;
          background: $blue;
          border-radius: 100%;
          width: 0.5rem;
          height: 0.5rem;
          transform: translate(-50%, -50%);
        }
      }
    }

    p {
      @include p2();
      opacity: 0.6;
    }
  }
}

.choicePlatform {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  & > p {
    margin-right: 1rem;
  }
}
