@import './variables.less';

.download-tidb-banner {
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
  background: url('https://download.pingcap.com/images/download-tidb/banner.jpg') no-repeat;
  padding-top: 31%;
  background-size: cover;
  background-position: center;
  margin-top: @headerHeight;
}

.banner__container {
  position: absolute;
  max-width: 1520px;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.download-container {
  margin: 0 auto;
  max-width: 1100px;
  padding: 0 6rem 1rem;

  iframe {
    width: 100% !important;
  }
}

.tidb-logo {
  position: absolute;
  left: 0;
  top: 2rem;
  width: 200px;
  height: auto;

  img {
    width: 100%;
    height: 100%;
    display: block;
  }
}

.download-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2.2rem;
}

.banner-illustration {
  position: absolute;
  right: 0;
  top: 4.5rem;
  width: 380px;
  height: auto;

  img {
    width: 100%;
    height: 100%;
    display: block;
  }
}

.install-desc {
  margin: 1rem 0 0;
  color: #172D72;
  line-height: 1.7;
}

.env-logos {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;

  img {
    width: auto;
    margin: 2rem 2rem 2rem 0;
    height: 50px;
  }
}

#tabProduction:checked + label,
#tabDevelopment:checked + label {
  color: #555;
  border: 1px solid #ddd;
  border-top: 4px solid #172D72;
  border-bottom: 1px solid #fff;
}


.ins-env-icon {
  height: 35px;
  width: auto;
  margin: 4rem 0 1rem;

  img {
    width: auto;
    height: 100%;
    display: block;
    margin: 0 !important;
  }
}

.download-tidb-archive {
  padding: 2rem 0 !important;
  max-width: 100% !important;
}


@media (max-width: 1700px) {
  .banner__container {
    max-width: 1288px;
  }

  .banner-illustration {
    right: 2rem;
    width: 250px;
  }
}

@media (max-width: 1288px) {
  .banner__container {
    max-width: 1288px;
  }

  .tidb-logo {
    left: 2rem;
    width: 200px;
  }
}

@media (max-width: 1024px) {
  .download-title {
    font-size: 1.8rem;
  }

  .tidb-logo {
    left: 2rem;
    width: 150px;
  }

  .banner-illustration {
    right: 4rem;
    width: 170px;
    top: 2rem;
  }
}

@media (max-width: 600px) {
  .download-tidb-banner {
    padding-top: 62%;
  }

  .download-container {
    padding: 0 12px;
  }

  .tidb-logo {
    width: 95px;
    left: 50%;
    transform: translate(-50%);
  }

  .download-title {
    font-size: 1.3rem;
    top: 38%;
  }

  .banner-illustration {
    width: 100px;
    top: 8rem;
    left: 50%;
    transform: translate(-50%);
  }

  .install-desc {
    margin: 1rem 0 2rem;
  }

  .env-logos {
    img {
      height: 40px;
      margin: 0 1rem 2rem 0;
    }
  }
}

@media (max-width: 400px) {
  .banner-illustration {
    width: 90px;
    top: 7rem;
  }

  .download-title {
    top: 35%;
  }

  .tidb-logo {
    top: 1.5rem;
  }
}

@media (max-width: 320px) {
  .download-tidb-banner {
    padding-top: 63%;
  }

  .tidb-logo {
    width: 85px;
  }

  .download-title {
    font-size: 1rem;
    top: 38%;
  }

  .banner-illustration {
    top: 6.5rem;
    width: 75px;
  }
}
