@import './mixins/mask.css';

$datetime-item-height: 38px;
$datetime-item-height-3: 114px;
$datetime-item-height-7: 266px;
$datetime-head-height: 43px;

.mask-datetime {
  @mixin mask $mask-bg-color;
}

.m-datetime {
  position: fixed;
  bottom: -9999px;
  left: -9999px;
  width: 100%;
  z-index: 1501;
  background-color: $white;
  transform: translate(0, 100%);
  transition: transform .25s;
  touch-action: none;
  &.datetime-active {
    bottom: 0;
    left: 0;
    transform: translate(0, 0);
  }
}

.datetime-input {
  width: 100%;
}

.datetime-head {
  display: flex;
  justify-content: space-between;
  position: relative;
  background-color: $white;
  border-bottom: 1px solid $white-border-color;

  .datetime-title{
    height: $datetime-head-height;
    line-height: $datetime-head-height;
    color: $gray-dark;
  }
  > a {
    height: $datetime-head-height;
    padding: 0 30px;
    font-size: $f15;
    display: flex;
    align-items: center;
    color: $gray-darker;
  }
  > a:last-child {
    color: $blue;
  }
}

.datetime-content {
  display: flex;
  width: 100%;
  height: $datetime-item-height-7;
  position: relative;
  overflow: hidden;
}

.datetime-item {
  flex: 1;
  height: 100%;
  position: relative;
  font-size: $f16;
}

.datetime-item-content {
  > span {
    display: block;
    width: 100%;
    height: $datetime-item-height;
    line-height: $datetime-item-height;
    text-align: center;
  }
}

.datetime-item-box {
  height: 100%;
}

.datetime-mask,
.datetime-indicator {
  height: 100%;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.datetime-mask {
  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 {
  display: flex;
  z-index: 4;
  justify-content: center;
  flex-direction: column;
  > span {
    display: block;
    width: 100%;
    height: $datetime-item-height;
    position: relative;
  }
}
