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

.umui-v3-cyclePicker {
  .clearfix;

  height: 28px;
  display: inline-block;

  .@{ant-prefix}-input-prefix .umicon-calendar-prefix {
    display: inline-block;
    color: #252934;
    border-right: 1px solid #6b798e;
    font-size: 12px;
    line-height: 12px;
    padding-right: 8px;
    margin-right: 8px;
    cursor: pointer;
  }

  &-input-wrap {
    position: relative;
    display: inline-block;
    font-size: 0;
    .umui-input-underline {
      width: 190px !important;
    }
    input {
      cursor: pointer;
    }
    .umicon-calendar-input-prefix {
      width: 274px !important;
      .@{ant-prefix}-input:not(:first-child) {
        padding-left: 55px;
      }
    }
  }

  &-hidden {
    position: absolute;
    top: 40px;
    left: 0;
  }

  .@{ant-prefix}-calendar-picker {
    visibility: hidden;
  }

  &-calendar {
    .@{ant-prefix}-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 {
      font-size: 12px;
      line-height: 32px;
      color: @text-color-info;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
    &-tabs {
      position: absolute;
      height: 100%;
      border-right: 1px solid @border-color-base;
      padding-top: 2px;
      top: 0;
      left: 0;
    }
    &-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;
      }
    }
    &-footer {
      position: absolute;
      left: 81px;
      bottom: 0;
      height: 40px;
      width: 100%;
      background: #fff;
      padding-right: 81px;
      &-tip {
        color: #97a1af;
        float: right;
        padding-top: 4px;
      }
      .icon {
        opacity: 0.5;
        color: #3b82fe;
        font-size: 16px;
        padding-right: 5px;
      }
      &-determine {
        float: right;
        width: 40px;
        height: 24px;
        margin-top: 8px;
        margin-right: 16px;
        margin-left: 20px;
        line-height: 23px;
        text-align: center;
        color: #fff;
        background: #3b82fe;
        border-radius: 2px;
        cursor: pointer;
      }
    }
  }

  &-calendar-determine {
    padding-bottom: 40px;
  }

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