// @import "../_utils.scss";
// @import "./icon.scss";
// @import "./datePicker.scss";

.#{$fastdate-prefix-cls} {
  &-wrapper {
    width: 100%;
    display: inline-block;
    vertical-align: middle;
    @if $--size-switch == no {
      height: $form-component-height;
    }
  }

  &-inner {
    position: relative;
    width: 100%;
    // height: $input-height-base;
    div {
      @if $--size-switch == no {
        height: $input-height-base;
        line-height: $input-height-base;
      }
      float: left;

      span {
        display: inner-block;

        input {
          border: none;
          width: $fastdate-inner-input-width;
          @if $--size-switch == no {
            height: $input-height-base;
          }
          outline: none;
          background: transparent;
          text-align: center;

          @include placeholder();
          @include structure-font-size($__input-default_font-size, 0);
          @include theme-font-color($__fast-date-edit_font-color);
        }
        .#{$fastdate-prefix-cls}-algin-left {
          text-align: left;
        }
      }

      span.left-icon {
        float: right;
      }
    }

    &-single {
      .#{$fastdate-prefix-cls}-single {
        width: 100%;
      }
    }

    &-range {
      .#{$fastdate-prefix-cls}-single {
        width: calc(50% - 10px);
      }
      .#{$fastdate-prefix-cls}-inner-split {
        width: $fastdate-inner-split-width;
        text-align: center;
        @if $--size-switch == yes {
          white-space: nowrap;
          @include computed-height($--size-height-base, 0);
          padding-left: 0;
          padding-right: 0;
        }

        @include theme-font-color($__fast-date-split_font-color);
      }
      .#{$fastdate-prefix-cls}-range {
        width: calc(50% - 10px);
      }
    }
  }

  &-disabled {
    @include disabled();
    .left-icon,
    .#{$fastdate-prefix-cls}-activity {
      @include theme-font-color($__fast-date-activity_disabled_font-color);
    }
  }

  &-readonly {
    @include readonly();
    .left-icon,
    .#{$fastdate-prefix-cls}-activity {
      @include theme-font-color($__fast-date-activity_readonly_font-color);
    }
  }

  &-edit {
    @if $--size-switch == yes {
      font-size: $--size-font-size-base;
      @include computed-height();
    } @else {
      padding: $fastdate-edit-padding;
    }
    border-radius: $fastdate-edit-border-radius;
    min-width: $fastdate-edit-border-min-width;
    border: 1px solid $border-color-base;

    @include theme-border-color($__fast-date-edit_border-color);
    @include theme-background-color($__fast-date-edit_background-color);
    @include theme-font-color($__fast-date-edit_font-color);

    &:hover {
      @include hover();
    }
  }

  &-edit.#{$fastdate-prefix-cls}-disabled {
    @include disabled();

    span input {
      @include theme-font-color($__fast-date-input_disabled_font-color);
    }
  }
  &-edit.#{$fastdate-prefix-cls}-readonly {
    @include readonly();
  }

  &-activity {
    font-size: $fastdate-activity-font-size;
  }

  .left-icon,
  &-activity {
    @include theme-font-color($__fast-date-activity_font-color);
  }
}
.#{$form-item-prefix-cls}-error {
  .#{$fastdate-prefix-cls} {
    &-edit {
      border: 1px solid $error-color;
      @include theme-border-color($__fast-date-form-item-edit_error_border-color);

      &:hover {
        @include theme-border-color($__fast-date-form-item-edit_error-hover_border-color);
      }
      // 添加外层div focus阴影效果
      &:focus-within{
        border-color: $error-color;
        outline: 0;
        box-shadow: $mixin-input-active-error-box-shadow;
        @include theme-border-color($__fast-date-form-item-edit_error-hover_border-color);
        @include theme-box-shadow($__common-input-error_focus_box-shadow);
      }
    }

    .left-icon,
    &-activity {
      color: $error-color;

      @include theme-font-color($__fast-date-activity_font-color);
    }
  }
}
.#{$form-item-prefix-cls}-changed {
  .#{$fastdate-prefix-cls} {
    input {
      @include changed();
    }

    .left-icon,
    &-activity {
      color: $input-color;

      @include theme-font-color($__fast-date-form-item-icon_error_font-color);
    }
  }
}
// .#{$form-item-prefix-cls}-error {
// }
.#{$editgird-prefix-cls}-cell-error {
  .#{$fastdate-prefix-cls} {
    &-edit {
      border: 1px solid $error-color;

      @include theme-border-color($__fast-date-editgrid-edit_error_border-color);

      // 添加外层div focus阴影效果
      &:focus-within{
        border-color: $error-color;
        outline: 0;
        box-shadow: $mixin-input-active-error-box-shadow;
        @include theme-border-color($__fast-date-form-item-edit_error-hover_border-color);
        @include theme-box-shadow($__common-input-error_focus_box-shadow);
      }
    }
  }
}
