@blue-6: #108ee9;
@green-6: #00a854;
@primary-color: @blue-6;

.toc-affix label.ant-radio-button-checked {
  background-color: #2db7f5;
  color: #fff;
}

.section-title .anticon-qrcode {
  color: #ddd;
  font-size: 22Px;
  margin-left: 12Px;
  top: -1Px;
  position: relative;
  transition: color .3s;

  &:hover {
    color: #2db7f5;
  }
}

.demo-code-container {
  // min-height: 300Px;
  // padding-right: 405Px;
  &-mutli {
    padding-bottom: 400px;
  }
  .mobile-wrapper {
    position: relative;
    float: right;
    width: 405Px;
    margin-right: -405Px;
    padding: 0 0 0 30Px;
  }
  &-fixed {
    .mobile-wrapper {
      position: fixed;
      top: 0;
      margin-right: 0;
      right: 9.04%;
    }
  }
}

.code-box {
  border: 1Px solid #e9e9e9;
  border-radius: 6Px;
  display: inline-block;
  width: 100%;
  position: relative;
  margin: 0 0 16Px;
  transition: all 0.5s ease;
  cursor: pointer;
  &:hover {
    box-shadow: 0 1Px 6Px rgba(0, 0, 0, .2);
    border-color: transparent;
    position: relative;
    z-index: 10;
    background: #fff;
  }

  &-preview {
    border: none;
  }

  &-actions {
    position: absolute;
    top: 16px;
    right: 60px;
    text-align: right;
    >i,
    >form {
      display: inline-block;
      margin-left: 8px;
    }
  }

  &-code-copy {
    opacity: 0;
    transition: all .24s;
    z-index: 1000;
    cursor: pointer;
    .anticon {
      font-size: 14Px;
      font-weight: bold;
      padding: 8Px;
      background-color: rgba(256, 256, 256, 0.6);
      width: 20px;
      height: 20px;
    }
    &:hover {
      color: @primary-color;
      transform: scale(1.2);
    }

    &.anticon-check {
      color: @green-6!important;
      font-weight: bold;
    }
  }

  &-codepen {
    background: transparent url("https://gw.alipayobjects.com/zos/rmsportal/bsyXYJlnerAkEMGKtTpa.svg") center / 14px no-repeat;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    transition: all .3s;
    border: 0;
    text-indent: -9999px;
    overflow: hidden;
  }

  &-riddle {
    background: transparent url("https://zos.alipayobjects.com/rmsportal/WpXYyalbBFqfZEV.svg") center / 14px no-repeat;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    transition: all .3s;
    border: 0;
    text-indent: -9999px;
    overflow: hidden;
  }

  .highlight-wrapper:hover &-code-copy,
  .highlight-wrapper:hover &-codepen,
  .highlight-wrapper:hover &-riddle {
    opacity: .66;
  }
}

.code-box.code-box-target {
  border: 1Px solid rgba(16, 142, 233, .7);
  box-shadow: 0 0 4Px rgba(16, 142, 233, .5);

  &:hover {
    box-shadow: 0 0 4Px rgba(16, 142, 233, .5);
  }
}

.code-box iframe {
  width: 100%;
  border: 0;
}

.code-box-meta,
.code-box-meta.markdown {
  position: relative;
  padding: 12Px 16Px;
  border-radius: 6Px 6Px 0 0;
  transition: background-color 0.4s ease;
  width: 100%;
  font-size: 12Px;
}

.code-box-meta h4,
.code-box-meta.markdown p {
  margin: 0;
}

.code-box-meta blockquote {
  margin: 0;
}

.code-box-title {
  font-size: 16Px;
  color: #777;
  transition: all 0.4s ease;
}

.code-box-title a {
  color: #222;
}

.code-box-meta > p {
  font-size: 12Px;
  margin: 0.5em 0;
  padding-right: 25Px;
  width: 100%;
  word-break: break-word;
}

.code-box .code-box-meta {
  border-bottom: 1Px dashed #e9e9e9;
}

.code-box .fullscreen {
  position: absolute;
  right: 16Px;
  bottom: -48px;
  cursor: pointer;
  font-size: 14Px;
  font-weight: bold;
  border: 1Px solid #ededed;
  padding: 8Px;
  border-radius: 16Px;
  background-color: rgba(256, 256, 256, 0.6);
  z-index: 1000;
}

.code-box .highlight-wrapper {
  overflow: auto;
  transition: all 0.4s ease;
  border-radius: 6px;
  max-height: 150px;
}

.code-box .highlight {
  position: relative;
  margin: 0;
  overflow: auto;
  padding: 5Px;

  &:not(:first-child) {
    border-top: 1Px dashed #e9e9e9;
  }
}

.code-box .ant-radio-group {
  position: absolute;
  bottom: -46Px;
  right: 56Px;
}

// code in modal
.highlight {
  position: relative;
  margin: -22Px -16Px;

  .ant-radio-group {
    position: absolute;
    right: 8Px;
    top: 7Px;
  }
}

.code-box pre {
  margin: 0;
  padding: 0;
  width: auto;
  background: #fff;
}

.code-box pre code {
  border: none;
  background: #fff;
}

.demo-preview-wrapper {
  margin: 0 auto;

  .demo-preview-header {
    border-radius: 4Px 4Px 0 0;
    background: linear-gradient(rgba(55, 55, 55, 0.98), #545456);
    text-align: center;

    .demo-preview-statbar {
      height: 20Px;
      margin-bottom: 4Px;
    }

    .url-box {
      width: 350Px;
      height: 28Px;
      line-height: 28Px;
      color: #fff;
      background-color: #a2a2a2;
      margin: 0 auto;
      border-radius: 4Px;
      white-space: nowrap;
      overflow-x: scroll;

      &::-webkit-scrollbar {
        display: none;
      }
    }
  }

  .demo-preview-scroller {
    background-color: #f7f7f7;
    max-height: 548Px;
    border-bottom-left-radius: 6Px;
    border-bottom-right-radius: 6Px;
    padding: 0;
    overflow: hidden;

    * {
      box-sizing: content-box;
    }

    .am-modal .am-wingblank *,
    .button-container * {
      box-sizing: border-box;
    }
  }

  iframe {
    border: none;
  }
}

.api-container {
  table {
    width: 100%;
  }
}

.aside-demo.fixed {
  position: fixed;
  top: 0;
}

.demo-title-wrapper {
  background-color: #fff;
}

.demo-title-wrapper.fixed {
  position: fixed;
  top: 0;
  z-index: 999;
  background-color: #fff;
  border-right: 2Px solid #eee;

  h2 {
    margin-top: 0;
  }
}

.sub-menu-item .ant-menu-item-group-title {
  padding: 0;
  height: 0;
}

.link-buttons a {
  margin-right: 8Px;
  margin-bottom: 8Px;
}

.link-buttons .link-current span {
  color: #108ee9;
}

ul.anticons-list li.copied:hover {
  color: rgba(255, 255, 255, 0.2);
}

ul.anticons-list li:after {
  position: absolute;
  top: 10Px;
  left: 0;
  height: 100%;
  width: 100%;
  content: "Copied!";
  text-align: center;
  line-height: 110Px;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  opacity: 0;
}

ul.anticons-list li.copied:after {
  opacity: 1;
  top: 0;
}
