@import '../style/var.less';

.zt-new-form--sticky {
  position: relative;
}

.zt-new-form--container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: 10px 0px 9px 9px;
  background-color: #fff;
  z-index: 1000;
  // overflow: hidden;
  overflow-x: auto;
}

.zt-new-form--popup {
  width: 100%;
  overflow-y: auto;
  background-color: #fafafa;
  position: absolute;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  &::after {
    border-color: #fafafa;
  }
  .zt-new-form--popup-content {
    max-height: 30vh;
    padding: 10px 10px 0 10px;
    &.zt-new-form--popup-content__flex {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: space-between;
      .zt-new-form--popup-item {
        box-sizing: border-box;
        width: 48%;
        height: 38px;
        line-height: 38px;
        background-color: #fff;
        margin-bottom: 10px;
        padding: 0 8px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        cursor: pointer;
        &::after {
          border-color: @border-color;
          border-radius: 4px;
        }
        &.active {
          color: @primary;
          &::after {
            border-color: @primary;
          }
        }
        .zt-new-form--popup-item--text {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        .zt-new-form--popup-item--icon {
          margin-left: 6px;
          flex: 1;
        }
      }
    }
  }
  .zt-new-form--popup-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #fff;
    > button {
      margin-right: 9px;
      border-radius: 4px;
      height: 38px;
      &:last-child {
        margin-right: 0;
      }
    }
    &::after {
      border-color: @border-color;
    }
  }
}

.zt-new-form-item--container {
  background: #ffffff;
  font-size: 14px;
  height: 22px;
  line-height: 22px;
  padding: 8px 19px 7px 3px;
  margin: 0;
  margin-right: 10px;
  flex-shrink: 0;
  position: relative;
  color: @weight-1;
  max-width: 160px;
  &:last-child {
    box-shadow: 10px 0 -10px white;
    margin-right: 10px;
  }
  &::after {
    border-color: @border-color;
    border-radius: 8px;
  }
  .zt-new-form-item--text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .zt-new-form-item--icon {
    position: absolute;
    right: 3px;
    top: 12px;
  }
  &.hasValue {
    color: @primary;
    background-color: @system;
    &::after {
      border-color: @primary;
    }
  }
  &.active {
    background-color: #fafafa;
    border-radius: 8px;
    &::after {
      border-color: transparent;
    }
    &::before {
      content: ' ';
      display: block;
      position: absolute;
      height: 13px;
      background-color: #fafafa;
      bottom: -9px;
      left: 0;
      right: 0;
    }
    .zt-new-form-item--icon {
      transform: rotate(180deg);
    }
  }
  .zt-new-form-item--content {
    width: 100%;
    height: 100px;
    position: absolute;
    top: 37px;
    background-color: #fff;
  }
}
.zt-new-form--container {
  -ms-overflow-style: none;
  overflow: -moz-scrollbars-none;
}
.zt-new-form--container::-webkit-scrollbar {
  display: none;
}

@keyframes new-form-slide-down-enter {
  from {
    transform: translate3d(0, -30%, 0);
  }
}
// @keyframes new-form-slide-down-leave {
//   to {
//     transform: translate3d(0, -100%, 0);
//   }
// }
.new-form-slide-down-enter-active {
  animation: new-form-slide-down-enter 0.3s ease-out;
}
// .new-form-slide-down-leave-active {
//   animation: new-form-slide-down-leave 0.3s both ease-in;
// }
