@import (reference) '../../style/common.less';

.umui-cyclePicker {
  .clearfix;

  .umui-icon-calendar {
    font-size: 16px;
    color: @text-color-secondary;
  }

  height: 28px;
  display: inline-block;

  &-input-wrap {
    position: relative;
    display: inline-block;
    font-size: 0;
    input {
      cursor: pointer;
    }
  }

  &-hidden {
    position: absolute;
    top: 0;
    left: 40;
    z-index: -9999;
    // visibility: hidden;
  }

  .@{ant-prefix}-calendar-picker {
    visibility: hidden;
  }
  .@{ant-prefix}-picker-dropdown-range {
    padding: 0;
  }

  .ant-picker-input > input {
    width: 72px !important;
    padding-left: 4px !important;
  }

  .ant-picker-focused {
    .ant-picker-input-active {
      background: #f0f5ff;
      & > input {
        color: @primary-color;
      }
    }
    .umui-icon-calendar {
      font-size: 16px;
      color: @primary-color;
    }
  }

  .ant-picker-range .ant-picker-active-bar {
    background: unset;
  }

  &-calendar {
    box-shadow: unset;
    padding: 4px 0;

    .ant-picker-range-arrow {
      display: none !important;
    }

    .ant-calendar-panel {
      display: flex;
      flex-direction: column-reverse;
    }
    .@{ant-prefix}-calendar-range {
      .@{ant-prefix}-calendar-footer-extra {
        width: 100%;
      }

      width: 590px;
      padding-left: 80px;
      .@{ant-prefix}-calendar-decade-panel-body {
        border-top: none;
      }
    }
    .@{ant-prefix}-calendar-body {
      border-top: none;
    }
    .@{ant-prefix}-calendar-footer {
      border: none;
      border-bottom: 1px solid @border-color-base;
      line-height: 32px;
    }
    .@{ant-prefix}-calendar-range-middle {
      padding: 0;
    }
    .@{ant-prefix}-calendar-range-left {
      .@{ant-prefix}-calendar-input-wrap {
        padding-right: 32px;
        .@{ant-prefix}-calendar-input {
          text-align: right;
        }
      }
    }
    .@{ant-prefix}-calendar-range-right {
      .@{ant-prefix}-calendar-date-input-wrap {
        padding-left: 32px;
        margin: 0;
      }
    }
    .@{ant-prefix}-calendar-today:not(.@{ant-prefix}-calendar-disabled-cell) .@{ant-prefix}-calendar-date {
      color: @primary-color;
      border-color: @primary-color;
    }
    .@{ant-prefix}-calendar-selected-day:not(.@{ant-prefix}-calendar-disabled-cell) .@{ant-prefix}-calendar-date {
      color: @text-color-inverse;
      background: @primary-color;
    }
    &-tips {
      padding-left: 10px;
      font-size: 12px;
      line-height: 32px;
      color: @text-color-info;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
    &-tabs {
      height: 100%;
      border-right: 1px solid @border-color-base;
      padding-top: 2px; // 33px;
      top: 0;
      left: -80px;
      background-color: #fff;
    }
    &-tab {
      width: 80px;
      height: 34px;
      line-height: 34px;
      padding: 0 14px;
      font-size: 12px;
      cursor: pointer;
      user-select: none;
      &.tab-active {
        background-color: @primary-color;
        color: @text-color-inverse;
      }
    }
  }

  &-custom-only {
    .umui-cyclePicker-calendar-tabs {
      display: none;
    }
    .@{ant-prefix}-calendar-range {
      padding: 0;
      width: 510px;
    }
  }
}
