/*
  JR PMPro Checkout Input Text Color v1.0.0
  Fixes invisible/white typing text on PMPro checkout "Account Information" inputs.
*/

/* Scope tightly to PMPro checkout to avoid affecting other site inputs */
body.pmpro-checkout form#pmpro_form input,
body.pmpro-checkout form#pmpro_form select,
body.pmpro-checkout form#pmpro_form textarea,
body.pmpro-checkout .pmpro_form input,
body.pmpro-checkout .pmpro_form select,
body.pmpro-checkout .pmpro_form textarea {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important; /* Safari/Chrome */
  caret-color: #111 !important;
}

body.pmpro-checkout form#pmpro_form input:focus,
body.pmpro-checkout form#pmpro_form select:focus,
body.pmpro-checkout form#pmpro_form textarea:focus,
body.pmpro-checkout .pmpro_form input:focus,
body.pmpro-checkout .pmpro_form select:focus,
body.pmpro-checkout .pmpro_form textarea:focus {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  caret-color: #111 !important;
}

/* Placeholder color so it stays readable but distinct from typed text */
body.pmpro-checkout form#pmpro_form input::placeholder,
body.pmpro-checkout form#pmpro_form textarea::placeholder,
body.pmpro-checkout .pmpro_form input::placeholder,
body.pmpro-checkout .pmpro_form textarea::placeholder {
  color: #6b6b6b !important;
  opacity: 1;
}

/* Webkit autofill (Chrome) can force its own text color; override it */
body.pmpro-checkout form#pmpro_form input:-webkit-autofill,
body.pmpro-checkout form#pmpro_form input:-webkit-autofill:hover,
body.pmpro-checkout form#pmpro_form input:-webkit-autofill:focus,
body.pmpro-checkout .pmpro_form input:-webkit-autofill,
body.pmpro-checkout .pmpro_form input:-webkit-autofill:hover,
body.pmpro-checkout .pmpro_form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111 !important;
  caret-color: #111 !important;
  transition: background-color 9999s ease-out 0s;
}

/* If your theme sets "transparent" text on specific PMPro elements, catch common classes */
body.pmpro-checkout .pmpro_checkout-field input,
body.pmpro-checkout .pmpro_checkout-field textarea,
body.pmpro-checkout .pmpro_checkout-field select {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  caret-color: #111 !important;
}
