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

.footer {
  background: $blue-dark;
  color: $white;

  h4 {
    @include h4();
    margin-bottom: 1.5rem;
  }

  p {
    @include p1($regular);
    word-break: break-all;
  }

  a:hover {
    color: $white;
  }
}

.footerTop {
  display: flex;
  flex-wrap: wrap;
  padding: 5.875rem 0 6.25rem 0;
}

.region {
  flex: 1;
  padding-right: 1rem;
}

.regionBig {
  flex: 3;
  max-width: 33rem;
  margin-left: 8%;
  padding-right: 0;
}

.regionContent {
  p {
    min-height: 1.75rem;
    a {
      white-space: nowrap;
    }
    &:not(:first-child) {
      margin-top: 0.5rem;
    }
  }
}

.footerBottom {
  border-top: 0.0625rem solid rgba($white, 20%);
  text-align: center;
  padding: 2.25rem 0;

  p {
    display: inline-block;
    margin: 0 0.75rem;
  }

  a:hover {
    font-weight: $light;
  }
}

.subTitle {
  color: rgba($white, 60%);
}

.platform {
  margin-top: 1.5rem;

  a {
    display: inline-block;
    border-radius: 100%;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    margin-top: 1rem;

    &:not(:last-child) {
      margin-right: 1rem;
    }
  }

  i {
    color: $white;
    font-size: 2rem;
    transition: all 0.2s;
  }
}

.twitter:hover {
  color: #4ca9ff;
}

.linkedin:hover {
  color: #757aff;
}

.reddit:hover {
  color: #f15eae;
}

.google:hover {
  color: #ff7272;
}

.stackoverflow:hover {
  color: #ff8b4a;
}

.wechatContent {
  position: relative;
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  margin-top: 1rem;

  i {
    cursor: pointer;
  }

  &:hover i {
    color: $green-lawn;
  }
}

.wechatTooltip {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 0.5rem;
  z-index: 1;
}

.tooltipInner {
  display: flex;
  align-items: center;
  background: $white;
  border-radius: $radius;
  color: #000;
  width: 15.25rem;
  height: 8.5rem;
  padding: 0.5rem;

  img {
    width: 7.5rem;
    height: 7.5rem;
    margin-right: 0.5rem;
  }

  p {
    @include p2();
  }
}


.contact_and_link {
  margin-top: 2.5rem;
  display: flex;
  justify-content: space-between;
}

.contactUs {
  min-width: 7rem;
}

.friendly_link {
  color: rgba(#FFFFFF, 50%) !important;
  background-color: #34355C !important;
  border: none !important;
  &_content {
    background-color: #34355C !important;
    max-height: 4 * 40px;
    overflow: auto;
    a {
      @include transition();
      color: rgba(#FFFFFF, 50%) !important;
      &:hover {
        color: rgba(#FFFFFF, 100%) !important;
        background-color: rgba(#34355C, 50%) !important;
      }
    }
  }
}

.beian {
  position: relative;
  top: 0.25rem;
  float: left;
  width: calc(1rem * 1.75);
  max-width: 1.25rem;
  height: calc(1rem * 1.75);
  max-height: 1.25rem;
  margin-right: $hl-10;
}

@media screen and (max-width: $full) {
  .wechatTooltip {
    left: initial;
    right: 0;
  }

  .regionBig {
    margin-left: 2%;
  }
}

@media screen and (max-width: $desktop) {
  .footerTop {
    padding: $hl-6 0;
  }
  .footerBottom {
    padding: 2.25rem 0 3rem 0;
  }

  .region:nth-child(2) {
    min-width: 10rem;
  }

  .region:nth-child(3) {
    min-width: 8.75rem;
    padding-right: 0;
  }

  .regionBig {
    min-width: 100%;
    max-width: 100%;
    margin: $hl-8 0 0 0;
  }

  .wechatTooltip {
    top: initial;
    bottom: 2rem;
    padding: 0 0 0.5rem 0;
  }
}

@media screen and (max-width: 374px) {
  .footerTop .region {
    min-width: 100%;
    padding-right: 0;

    &:not(:first-child) {
      margin-top: $hl-7;
    }

    .regionContent p {
      min-height: initial;

      &:not(.subTitle) {
        display: inline-block;

        &.empty {
          display: none;
        }

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

    &:not(.regionBig) h4 {
      margin-bottom: $hl-10;
    }

    &:nth-child(2) .regionContent p {
      min-width: 50%;
      margin-right: 0 !important;
    }
  }
}
