@import '../../variables.scss';

#{$biz-css-prefix}-popup-picker {

  display: none;

  .au-date-picker {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1001;
  }

  &.au-date-picker-active {
    display: block;
    margin-left: -10px;
    margin-right: -10px;
  }

  .au-date-picker-header {
    background: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    flex-shrink: 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px;

    &-button {
      padding: 5px 10px;
      cursor: pointer;
    }
  }

  .au-date-picker-body {
    flex: 1 1;
    width: 100%;
  }

  .au-date-picker-view {
    height: 260px;
    width: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
    background: #fff;
  }

  .au-date-picker-mask {
    position: absolute;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none;
  }

  .au-date-picker-mask-top {
    flex: auto;
    background: #fff;
    -webkit-mask: linear-gradient(0deg,rgba(0,0,0,.6),rgba(0,0,0,.8) 50%,#000);
    mask: linear-gradient(0deg,rgba(0,0,0,.6),rgba(0,0,0,.8) 50%,#000);
  }

  .au-date-picker-mask-middle {
    height: 34px;
    box-sizing: border-box;
    flex: none;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
  }

  .au-date-picker-mask-bottom {
    flex: auto;
    background: #fff;
    -webkit-mask: linear-gradient(180deg,rgba(0,0,0,.6),rgba(0,0,0,.8) 50%,#000);
    mask: linear-gradient(180deg,rgba(0,0,0,.6),rgba(0,0,0,.8) 50%,#000);
  }

  .au-date-picker-view-column {
    height: 100%;
    flex: 1 1;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
    position: relative;
    z-index: 0;

    .au-date-picker-view-item-height-measure {
      position: relative;
      left: 0;
      top: 0;
      height: 34px;
      width: 0;
      pointer-events: none;
    }

    .au-date-picker-view-column-wheel {
      width: 100%;
      cursor: -webkit-grab;
      cursor: grab;
      position: absolute;
      top: calc(50% - 17px);
      left: 0;
    }

    .au-date-picker-view-column-accessible {
      width: 100%;
      height: 100%;
      pointer-events: none;
      opacity: 0;
      display: flex;
      flex-direction: column;
      position: relative;
      top: -34px;
      z-index: 0;
      padding-bottom: 1px;
    }

    .au-date-picker-view-column-item {
      font-size: 15px;
      padding: 0 6px;
      height: 34px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .au-date-picker-view-column-accessible-current {
      position: absolute;
      width: 100%;
      height: 100%;
    }

    .au-date-picker-view-column-accessible-button {
      width: 100%;
      height: 100%;
    }

    .au-date-picker-view-column-accessible>* {
      flex: 1 1;
      text-overflow: ellipsis;
    }
  }
}
