@import "../common/variables";
@import "../common/mixins";

.@{css-prefix} {
  &-cityselect {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75%;
    background-color: #fff;
    z-index: @base-zindex * 1500 + 2;
    transform: translate(0, 100%);
    transition: transform .2s;
    &-active {
      transform: translate(0, 0);
    }
    &-move-animate {
      transition: transform .3s;
    }
    &-next {
      transform: translate(-50%, 0);
    }
    &-prev {
      transform: translate(0, 0);
    }
  }

  &-cityselect-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    &:after {
      .bottom-line(#bdbdbd);
    }
  }

  &-cityselect-title {
    width: 100%;
    font-size: .3rem;
    text-align: center;
    height: 90rpx;
    line-height: 90rpx;
    position: relative;
    &:after {
      .bottom-line(@line-high-color);
    }
  }

  &-cityselect-nav {
    width: 100%;
    padding-left: 10px;
    overflow: hidden;
    display: flex;
    > a {
      font-size: .65rem;
      color: #222;
      display: block;
      height: 80rpx;
      line-height: 92rpx;
      padding: 0 16rpx;
      position: relative;
      margin-right: 30rpx;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 40%;
    }
    &-active {
      color: #F23030 !important;
      &:after {
        content: '';
        width: 100%;
        height: 4rpx;
        background-color: #F23030;
        position: absolute;
        bottom: 2rpx;
        left: 0;
        z-index: 2;
      }
    }
  }

  &-cityselect-content {
    height: 100%;
    padding-top: 170rpx;
    width: 100%;
    display: flex;
  }

  &-cityselect-item {
    display: block;
    height: inherit;
    width: 50%; /* for old android */
    flex: 0 0 50%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #FFF;
    &::-webkit-scrollbar {
      width: 0;
    }
    &:nth-child(2n) {
      background-color: #F5F5F5;
    }
    &-active {
      color: #F23030 !important;
      &:after {
        display: block;
        content: '\E600';
        font-family: @iconfont-inlay;
      }
    }
  }

  &-cityselect-item-box {
    width: 100%;
    height: inherit;
    display: block;
    padding: 0 40rpx;
    > a {
      color: #333;
      font-size: .65rem;
      height: 80rpx;
      line-height: 80rpx;
      overflow: hidden;
      display: flex;
      align-items: center;
      width: 100%;
      position: relative;
      z-index: 1;
      &:before {
        .bottom-line(@line-color);
      }
      &:active {
        background: none; /* for firefox */
      }
      span {
        flex: 1;
        display: block;
        .line-clamp(2, 32rpx);
        font-size: .65rem;
      }
    }
  }

  &-cityselect-loading {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .26rem;
    color: #999;
    svg {
      width: 72rpx;
      height: 72rpx;
    }
  }
}
