md-input-container.md-THEME_NAME-theme {
  .md-input {
    @include input-placeholder-color('\'{{background-default-contrast-secondary}}\'');
    color: '{{background-default-contrast}}';
    border-color: '{{background-default-contrast-divider}}';
  }

  > md-icon {
    color: '{{background-default-contrast}}';
  }

  label,
  .md-placeholder {
    color: '{{background-default-contrast-secondary}}';
  }

  label.md-required:after {
    color: '{{warn-A700}}'
  }

  &:not(.md-input-focused):not(.md-input-invalid) label.md-required:after {
    color: '{{background-default-contrast-secondary}}';
  }

  .md-input-messages-animation, .md-input-message-animation {
    color: '{{warn-A700}}';
    .md-char-counter {
      color: '{{background-default-contrast}}';
    }
  }

  &.md-input-focused {
    .md-input {
      @include input-placeholder-color('\'{{background-default-contrast-secondary}}\'');
    }
  }

  &:not(.md-input-invalid) {
    &.md-input-has-value {
      label {
        color: '{{background-default-contrast-secondary}}';
      }
    }
    &.md-input-focused,
    &.md-input-resized {
      .md-input {
        border-color: '{{primary-color}}';
      }
    }

    &.md-input-focused {
      label,
      md-icon {
        color: '{{primary-color}}';
      }
      &.md-accent {
        .md-input {
          border-color: '{{accent-color}}';
        }
        label,
        md-icon {
          color: '{{accent-color}}';
        }
      }
      &.md-warn {
        .md-input {
          border-color: '{{warn-A700}}';
        }
        label,
        md-icon {
          color: '{{warn-A700}}';
        }
      }
    }
  }
  &.md-input-invalid {
    .md-input {
      border-color: '{{warn-A700}}';
    }
    label,
    .md-input-message-animation,
    .md-char-counter {
      color: '{{warn-A700}}';
    }
  }
  .md-input {
    &[disabled],
    [disabled] & {
      border-bottom-color: transparent;
      color: '{{background-default-contrast-disabled}}';
      background-image: linear-gradient(to right, '{{background-default-contrast-disabled}}' 0%, '{{background-default-contrast-disabled}}' 33%, transparent 0%);
      background-image: -ms-linear-gradient(left, transparent 0%, '{{background-default-contrast-disabled}}' 100%);
    }
  }
}
