@import '~@angular/material/theming';
//@import '../../../node_modules/@angular/material/_theming';
@mixin jd-input-theme($theme) {

  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);
  $warn: map-get($theme, warn);
  $foreground: map-get($theme, foreground);
  $is-dark-theme: map-get($theme, is-dark);
  $background: map-get($theme, background);

  $placeholder-color: _mat-control-placeholder-color($theme);
  .ant-input {
    background-color: mat-color($background, card);
    border: 1px solid mat-color($foreground, divider);

    &::-moz-placeholder, &:-ms-input-placeholder, &::-webkit-input-placeholder {
      color: #bfbfbf;
    }

    &::-moz-placeholder {
      opacity: 1;
    }

    &:hover {
      border-color: mat-color($primary, 0.8);
    }

    &:focus {
      border-color: mat-color($primary);
      //@include _mat-theme-overridable-elevation(4, $theme);
      box-shadow: 0 0 0 2px mat-color($primary, 0.2);
    }
  }
  .ant-input-affix-wrapper {
    color: mat-color($foreground, text);
  }
  .ant-input-group-addon .ant-select-open .ant-select-selection,
  .ant-input-group-addon .ant-select-focused .ant-select-selection {
    color: mat-color($primary);
  }
  .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
    border-color: mat-color($primary);
  }
  .ant-input-group-addon {
    //color: mat-color($foreground, text);
    background-color: mat-color($background, card);
    border: 1px solid mat-color($foreground, divider);
  }

  .ant-input-disabled {
    background-color: mat-color($background, disabled-button);
    color: mat-color($foreground, disabled);
  }
  .ant-input-group, .ant-input-affix-wrapper .ant-input-prefix,
  .ant-input-affix-wrapper .ant-input-suffix, .ant-input-group-addon {
    color: mat-color($foreground, text);
  }
}
