@import url(../../var.less);

@time-spinner-prefix: ~"@{prefix}time-spinner";

.@{time-spinner-prefix}{
  width: 100%;
  white-space: nowrap;
  &.has-seconds {
    .w-time-spinner__wrapper {
      width: 33.3%;
    }
  }

  &__wrapper {
    max-height: 180px;
    overflow: auto;
    display: inline-block;
    width: 50%;
    vertical-align: top;
    position: relative;
    border-right: solid 1px @datepicker-border-color;

    & .w-scrollbar__wrap:not(.w-scrollbar__wrap--hidden-default) {
      padding-bottom: 15px;
    }

    &.is-arrow {
      max-height: 160px;
      box-sizing: border-box;
      text-align: center;
      overflow: hidden;

      .w-time-spinner__list {
        transform: translateY(-31px);
      }

      .w-time-spinner__item:hover:not(.disabled):not(.active) {
        background: @color-white;
        cursor: default;
      }
    }
  }

  &__wrapper:last-child {
    border-right: none;
  }

  &__arrow {
    font-size: 14px;
    color: @secondary-text-color;
    position: absolute;
    left: 0;
    width: 100%;
    z-index: @z-index-normal;
    text-align: center;
    height: 30px;
    line-height: 30px;
    cursor: pointer;

    &:hover {
      color: @primary-color;
    }

    &.w-icon-arrow-up {
      top: 10px;
    }

    &.w-icon-arrow-down {
      bottom: 10px;
    }
  }

  &__input {
    &.w-input {
      width: 70%;

      .w-input__inner {
        padding: 0;
        text-align: center;
      }
    }
  }

  &__list {
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: center;

    &::after,
    &::before {
      content: '';
      display: block;
      width: 100%;
      height: 80px;
    }
  }

  &__item {
    height: 22px;
    line-height: 22px;
    font-size: 12px;
    color: @regular-text-color;

    &:hover:not(.disabled):not(.active) {
      background: @background-color-base;
      cursor: pointer;
    }

    &.active:not(.disabled) {
      color: @primary-color;
      font-weight: bold;
    }

    &.disabled {
      color: @placeholder-text-color;
      cursor: not-allowed;
    }
  }
}