@import '../style/theme/color';

.devui-datepicker-pro-wrapper {
  display: inline-block;
  background-color: $devui-base-bg;

  .devui-range-picker {
    padding-right: 8px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 24px;
    display: flex;
    align-items: center;

    .devui-input {
      padding: 4px 8px;
      width: calc(50% - 14px);

      &.devui-active-input {
        color: $devui-brand;
      }
    }

    .devui-date-input-active-bar {
      display: block;
      max-width: calc(50% - 48px);
      height: 1px;
      background-color: $devui-brand;
      position: absolute;
      bottom: 0;

      &.devui-start-side {
        left: 9px;
      }

      &.devui-end-side {
        left: calc(50% + 4px);
      }
    }

    &-icon {
      vertical-align: text-bottom;
      height: 16px;
    }

    .close-icon-wrapper {
      padding: 0 8px;
      display: none;
      position: absolute;
      right: 0;
      top: 0;
      line-height: 25px;

      .close-icon {
        width: 16px;
        height: 16px;
        display: inline-block;
        line-height: 16px;

        svg {
          vertical-align: middle;
          position: relative;
          top: -0.1em;

          path {
            fill: $devui-shape-icon-fill;
          }
        }

        &:hover {
          svg path {
            fill: $devui-shape-icon-fill-active;
          }
        }
      }
    }

    .date-icon-wrapper {
      padding: 0 8px;
      display: block;
      position: absolute;
      right: 0;
      top: 0;
      line-height: 25px;

      path {
        fill: $devui-icon-fill-weak;
      }
    }

    &.devui-has-value.devui-allow-clear:hover {
      .close-icon-wrapper {
        display: block;
      }

      .date-icon-wrapper {
        display: none;
      }
    }

    &:not(.devui-disabled) .close-icon-wrapper {
      cursor: pointer;
    }
  }

  .devui-input-group > .devui-input {
    display: inline-block;

    &::-ms-clear {
      display: none;
    }
  }
}
