@import '../../src/style/tools.css';
@import '../../src/style/animate.css';

.bx-picker {
  position: relative;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;

  & .bx-picker-body {
    position: relative;
    left: 0;
    bottom: 0;
    width: 100%;
    background: var(--picker-bj-color);
  }

  & .bx-picker-header {
    display: flex;
    line-height: 1;
    padding: var(--font-size-lg);
    font-size: var(--font-size-default);
    border-bottom: solid 1px var(--color-line-split);

    & .bx-picker-title {
      flex: 1;
      text-align: center;
      padding: 0 var(--font-size-lg);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    & .bx-picker-cancel {
      display: block;
      color: var(--color-text-patch);
      pointer-events: auto;
    }

    & .bx-picker-sure {
      display: block;
      color: var(--color-feature-minor);
      pointer-events: auto;
    }
  }

  & .bx-picker-content {
    height: 220px;
    display: block;
    position: relative;
    width: 100%;
  }

  & .bx-picker-center-highlight {
    box-sizing: border-box;
    position: absolute;
    left: 0;
    width: 100%;
    top: 50%;
    margin-top: -20px;
    height: 40px;
    pointer-events: none;
  }

  & .bx-picker-center-highlight::before,
  & .bx-picker-center-highlight::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 100%;
    background-color: var(--color-line-split);
    display: block;
    z-index: var(--picker-high-zindex);
    transform: scaleY(0.5);
  }

  & .bx-picker-center-highlight::before {
    left: 0;
    top: 0;
    bottom: auto;
    right: auto;
  }

  & .bx-picker-center-highlight::after {
    left: 0;
    bottom: 0;
    right: auto;
    top: auto;
  }

  & .bx-picker-wrapper {
    position: relative;
    height: 219px;
    overflow-y: hidden;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    backface-visibility: hidden;
    touch-action: none;

    & .bx-picker-scroll {
      transition: all 0.3s ease;
      backface-visibility: hidden;
      -webkit-overflow-scrolling: touch;

      &.bx-picker-dragging {
        -webkit-transition: none;
        transition: none;
      }
    }
  }

  & .bx-picker-well {
    font-size: var(--font-size-xxl);
    overflow: hidden;
    position: relative;
    max-height: 100%;
    flex: 1;
    min-width: 20px;

    & .bx-picker-item {
      height: 30px;
      line-height: 30px;
      padding: 0 var(--font-size-xxs);
      position: relative;
      color: var(--picker-default-color);
      left: 0;
      top: 0;
      width: 100%;
      font-size: var(--font-size-lg);
      box-sizing: border-box;
      transition-duration: 0.3s;
      text-align: center;
      line-clamp: 1;
      -webkit-line-clamp: 1;
      backface-visibility: hidden;
      display: block;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;

      &.selected {
        height: 40px;
        line-height: 40px;
        font-size: var(--font-size-xxl);
      }

      &.disabled {
        pointer-events: none;
      }
    }
  }
}

.bx-picker-sheets-header {
  & .bx-picker-header {
    display: flex;
    line-height: 1;
    padding: var(--font-size-lg);
    font-size: var(--font-size-default);

    & .bx-picker-title {
      flex: 1;
      text-align: center;
      padding: 0 var(--font-size-lg);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    & .bx-picker-cancel {
      display: block;
      color: var(--color-text-patch);
      pointer-events: auto;
    }

    & .bx-picker-sure {
      display: block;
      color: var(--color-feature-minor);
      pointer-events: auto;
    }
  }
}
