input:not(:placeholder-shown) {
  direction: ltr;
}

/* If input is empty */
input:placeholder-shown {
  direction: rtl;
}
