@import "../common/variables";
@import "../common/mixins";

@datetime-item-height: 76rpx;

.@{css-prefix} {
  &-datetime {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: @base-zindex * 1500 + 2;
    background-color: #FFF;
    transform: translateY(100%);
    transition: transform .25s;
    touch-action: none;
    will-change: transform;

    &-active {
      transform: translateY(0);
    }

    &-placeholder {
      color: #A1A1A1;
      font-size: inherit;
    }
  }

  &-datetime-input {
    width: 100%;
  }

  &-datetime-head {
    display: flex;
    justify-content: space-between;
    position: relative;
    background-color: #FBFBFB;
    &:after {
      .bottom-line(@line-color);
    }
    > a {
      height: 86rpx;
      padding: 0 60rpx;
      font-size: .75rem;
      display: flex;
      align-items: center;
      color: #555;
    }
    > a:last-child {
      color: #0BB20C;
    }
  }

  &-datetime-content {
    position: relative;
    width: 100%;
    height: @datetime-item-height * 7;
    overflow: hidden;
    display: flex;
  }

  &-datetime-item {
    font-size: .8rem;
    height: 100%;
    position: relative;
    flex: 1;
  }

  &-datetime-item-content {
    > span {
      width: 100%;
      display: block;
      height: @datetime-item-height;
      line-height: @datetime-item-height;
      text-align: center;
    }
  }

  &-datetime-item-box {
    height: 100%;
  }

  &-datetime-shade,
  &-datetime-indicator {
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
  }

  &-datetime-shade {
    z-index: 3;
    transform: translateZ(0px);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
    background-position: top, bottom;
    background-size: 100% @datetime-item-height * 3;
    background-repeat: no-repeat;
  }

  &-datetime-indicator {
    z-index: 4;
    display: flex;
    justify-content: center;
    flex-direction: column;
    > span {
      display: block;
      width: 100%;
      height: @datetime-item-height;
      position: relative;
      &:after {
        .top-line(@line-color);
      }
      &:before {
        .bottom-line(@line-color);
      }
    }
  }
}
