// @import './variables.scss';
.#{$namespace}timepicker {
  width: $timepicker-width;
  display: inline-block;
  vertical-align: middle;
  font-size: $timepicker-font-size;
  // height: $unit-9;
  cursor: pointer;
  .#{$namespace}timepicker-value {
    width: 100%;
    height: $timepicker-value-height;
    line-height: $timepicker-value-lineheight;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: none;
    border-radius: $timepicker-value-border-radius;
    border: $timepicker-value-border;
    color: $timepicker-value-color;
    font-size: $timepicker-value-font-size;
    outline: none;
    padding: $timepicker-value-padding;
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    
    .#{$namespace}timepicker-value-input {
      flex: 1;
      width: 100%;
      height: 100%;
      border: 0;
      outline: none;
      color: inherit;
      background-color: inherit;
      cursor: inherit;
    }
    &.#{$namespace}timepicker-focus {
      border-color: $timepicker-focus-border-color;
    }

    svg {
      flex-shrink: 0;
      color: $timepicker-value-input-svg-color;
    }

    .#{$namespace}timepicker-placeholder {
      color: $timepicker-placeholder-color;
    }

    // &[disabled] {
    //   cursor: not-allowed;
    //   border-style: dotted;
    //   color: $text-color-secondary-lighter;
    //   background-color: $background-color-primary;
    // }

    // &[readonly] {
    //   border-style: dotted;
    //   background-color: $background-color-primary;
    // }
  }

  .#{$namespace}timepicker-disabled {
    cursor: not-allowed;
    color: $timepicker-disabled-color;
    border-style: dotted;
    background-color: $timepicker-disabled-background-color;
  }

  &.#{$namespace}timepicker-lg {
    font-size: $timepicker-lg-font-size;
    .#{$namespace}timepicker-value {
      height: $timepicker-value-lg-height;
      line-height: $timepicker-value-lg-line-height;
    }
  }
  &.#{$namespace}timepicker-md {
    font-size: $timepicker-md-font-size;
    .#{$namespace}timepicker-value {
      height: $timepicker-value-md-height;
      line-height: $timepicker-value-md-line-height;
    }
  }
  &.#{$namespace}timepicker-xs {
    .#{$namespace}timepicker-value {
      height: $timepicker-value-xs-height;
      line-height: $timepicker-value-xs-line-height;
    }
  }
  &.#{$namespace}timepicker-sm {
    .#{$namespace}timepicker-value {
      height: $timepicker-value-xs-height;
      line-height: $timepicker-value-xs-line-height;
    }
  }
}

.#{$namespace}timepanel {
  background-color: $timepanel-background-color;
  border: $timepanel-border;
  box-shadow: $timepanel-box-shadow;
  width: 100%;

  .#{$namespace}timepanel-list {
    display: flex;
    width: $timepanel-list-width;
    height: $timepanel-list-height;
    position: relative;

    &::before {
      width: $timepanel-list-before-width;
      height: $timepanel-list-before-height;
      content: '';
      display: block;
      position: absolute;
      // left: 9px;
      // right: 9px;
      top: $timepanel-list-before-focus-top;
      background-color: $timepanel-list-before-focus-color;
      z-index: 10;
    }

    &::after {
      width: $timepanel-list-after-width;
      height: $timepanel-list-after-height;
      content: '';
      display: block;
      position: absolute;
      // left: 9px;
      // right: 9px;
      top: $timepanel-list-after-focus-top;
      background-color: $timepanel-list-after-focus-color;
      z-index: 10;
    }

    .#{$namespace}timepanel-hour, .#{$namespace}timepanel-minute, .#{$namespace}timepanel-second {
      flex-grow: 1;
      flex-shrink: 1;
      width: 33.33%;
    }

    .#{$namespace}timepanel-list-wrap {
      &::after, &::before {
        content: '';
        display: block;
        height: $timepanel-list-wrap-height;
      }
    }

    .#{$namespace}timepanel-list-item {
      height: $timepanel-list-item-height;
      line-height: $timepanel-list-item-line-height;
      text-align: center;

      &:hover {
        background-color: $timepanel-list-item-hover-background-color;
      }

      &.#{$namespace}timepanel-item-active {
        font-weight: $timepanel-list-item-active-font-weight;
        color: $timepanel-list-item-active-color;
      }
    }
  }
  .#{$namespace}timepanel-actions {
    border-top: $timepanel-actions-border-top;
    padding: $timepanel-actions-padding;
    text-align: $timepanel-actions-text-align;
  }
}

.#{$namespace}timepicker-extra-footer {
  border-top: $timepicker-extra-footer-borderTop;
  padding: $timepicker-extra-footer-padding;
}


/** ---以下代码未找到使用痕迹，暂时保留，不抽离 ----**/
.#{$namespace}overlay {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 499;
}
.#{$namespace}above-overlay {
  z-index: 500;
}
.#{$namespace}select-content {
  line-height: 30px !important;
  padding-left: 12px !important;
  padding-right: 42px !important;
}
.#{$namespace}menu-items {
  z-index: 1500;
  overflow-y: 'auto';
  position: absolute;
  min-width: auto;
  padding: 0;
  display: -ms-grid;
  -ms-grid-columns: min-content;
  width: min-content;
  cursor: pointer;
}

.#{$namespace}timepanel, .#{$namespace}time-panel {
  border: $time-panel-border;
  border-radius: $time-panel-radius;
}

.#{$namespace}time-panel {
  width: 180px;
}
.#{$namespace}time-panel-list {
  position: relative;
  height: 190px;
  text-align: center;
}
.#{$namespace}time-panel-list:before, .#{$namespace}time-panel-list:after {
  content: '';
  position: absolute;
  display: block;
  width: 150px;
  height: 1px;
  background-color: $time-panel-list-background;
  z-index: 1;
}
.#{$namespace}time-panel-list:before {
  top: 79px;
  left: 15px;
  background-color: $time-panel-list-background;
}
.#{$namespace}time-panel-list:after {
  top: 111px;
  left: 15px;
  background-color: $time-panel-list-background;
}
.#{$namespace}time-panel-actions {
  border-top: $timepanel-actions-border-top;
  height: 36px;
  padding: 6px 4px;
  text-align: right;
}
.#{$namespace}time-panel-hour, .#{$namespace}time-panel-minute, .#{$namespace}time-panel-second {
  display: inline-block;
  width: 30%;
  height: 190px;
  vertical-align: top;
  overflow: hidden;
}
.#{$namespace}time-panel-scrollbar {
  will-change: transform;
  transition: transform .3s;
}
.#{$namespace}time-panel-scrollbar::before, .#{$namespace}time-panel-scrollbar::after {
  content: '';
  display: block;
  height: 79px;
}
.#{$namespace}time-panel-scrollbar-item {
  height: 32px;
  line-height: 32px;
  vertical-align: middle;
}
.#{$namespace}time-panel-scrollbar-item:hover {
  background: #f4f4f4;
  cursor: pointer;
}
.#{$namespace}time-panel-scrollbar-item.active {
  font-weight: 600;
}

.#{$namespace}timepicker__input {
  flex: 1;
  align-self: center;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  color: inherit;
  background-color: inherit;
  cursor: inherit;
}

.#{$namespace}timepicker-lg{
  .#{$namespace}timepicker-value{
    height: 40px;
    line-height: 40px;
  }
}
.#{$namespace}timepicker-md{
  .#{$namespace}timepicker-value{
    height: 36px;
    line-height: 36px;
  }
}
.#{$namespace}timepicker-sm{
  .#{$namespace}timepicker-value{
    height: 32px;
    line-height: 32px;
  }
}
.#{$namespace}timepicker-xs{
  .#{$namespace}timepicker-value{
    height: 24px;
    line-height: 24px;
  }
}
// 兼容以前的
.#{$namespace}form-autocomplete {
  position: relative;
  min-width: unset;
}
/** ---以上代码未找到使用痕迹，暂时保留，不抽离 ----**/