@import './var';

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: @base-font-family;
}

a {
  text-decoration: none;
}

input,
button,
textarea {
  color: inherit;
  font: inherit;
}

a,
input,
button,
textarea,
[class*='van-'] {
  &:focus {
    outline: none;
  }
}

ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}



// ks add kuasheng-ui
html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  // overflow: auto;
  background-color: #fff;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', STHeiti, 'Microsoft Yahei', Tahoma, Simsun, sans-serif;
}

#ksui-app {
  // 导航栏固定在顶部
  .ksui-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 44px;
    z-index: 999;
    background-color: #fff;
    .ksui-nav {
      height: 44px;
      .van-nav-bar {
        height: 44px;
        line-height: 44px;
        .van-nav-bar__title {
          font-size: 16px;
          font-weight: 500;
          max-width: 68%;
        }
        .van-nav-bar__arrow {
          font-size: 22px;
          font-weight: 500;
          color: #000;
        }
        .van-nav-bar__right {
          font-size: 16px;
          font-weight: 400;
          right: 107px;
        }
      }
    }
  }

  .ksui-body {
    box-sizing: border-box;
    overflow-y: scroll;
    // -webkit-overflow-scrolling: touch;
    padding-top: 44px;
    font-weight: 400;
  }
}

.ios {
  #ksui-app {
    .ksui-header {
      padding-top: 20px;
    }
    .ksui-body {
      padding-top: 64px;
    }
  }
}

.ipx {
  #ksui-app {
    .ksui-header {
      padding-top: 44px;
    }
    .ksui-body {
      padding-top: 88px;
    }
  }
}

.van-nav-bar__title {
  height: 44px;
  line-height: 44px;
  max-width: 68%;
}

.van-nav-bar__title > * {
  vertical-align: middle;
}

.ios .van-nav-bar__title .light {
  font-size: 14px !important;
  padding: 2px 8px !important;
}

.ksui-form .van-cell {
  overflow: unset !important;
}

.van-cell .van-field__error-pop-message {
  color: #fff;
  font-size: 14px;
  text-align: left;
  position: absolute;
  z-index: 9;
  padding: 11px 16px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  line-height: 20px;
  bottom: -16px;
  left: 0;
  transform: translate(0, 100%);
  pointer-events: none;
}

.van-cell .van-field__error-pop-message--top {
  bottom: auto;
  top: -16px;
  transform: translate(0, -100%);
}

.van-cell .van-field__error-pop-message::after {
  content: ' ';
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 6px;
  color: #4a4a4a;
  top: 0;
  border-top-width: 0;
  border-bottom-color: rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -100%);
  left: 50%;
  background-color: transparent;
}

.van-cell .van-field__error-pop-message--top::after {
  top: auto;
  bottom: -12px;
  border-bottom-width: 0;
  border-top-color: rgba(0, 0, 0, 0.7);
  border-top-width: 6px;
  border-bottom-color: unset;
}

.van-cell .van-field__error-pop-message--right {
  left: unset;
  right: 0;
}

.van-cell .van-field__error-pop-message--center {
  left: 50%;
  transform: translate(-50%, 100%);
  width: fit-content;
}

.van-cell .van-field__error-pop-message--center.van-field__error-pop-message--top {
  transform: translate(-50%, -100%);
}
