/*
 * NexoPlay V50 - UI input visibility polish
 * - Keeps auth input text visible while typing in both themes.
 * - Keeps Wallet fields theme-aware: light fields stay dark-on-light; dark fields
 *   stay light-on-dark.
 * - Removes the auth close X for login/register, but keeps it for profile mode.
 */

/* ================================================================
   1) AUTH — normal typing + browser/autofill must stay readable
   The auth glass is intentionally dark in both themes, so its foreground
   remains white. -webkit-text-fill-color is included because Chrome/WebKit
   can preserve a previously computed autofill text color.
   ================================================================ */
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
}

#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input::placeholder {
  color: rgba(255,255,255,.47) !important;
  -webkit-text-fill-color: rgba(255,255,255,.47) !important;
  opacity: 1 !important;
}

#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input:-webkit-autofill,
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input:-webkit-autofill:hover,
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input:-webkit-autofill:focus,
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
}

/* Login/register are entry screens: no close X to bypass the access flow.
   Profile mode still keeps its existing close button. */
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-head .close {
  display: none !important;
}

/* ================================================================
   2) WALLET — theme-safe foreground/background
   ================================================================ */
body[data-nx-theme="dark"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
) {
  background: #071528 !important;
  color: #eef5ff !important;
  -webkit-text-fill-color: #eef5ff !important;
  border-color: rgba(135,160,207,.22) !important;
  caret-color: #eef5ff !important;
  color-scheme: dark;
}

body[data-nx-theme="dark"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
)::placeholder {
  color: #8195b2 !important;
  -webkit-text-fill-color: #8195b2 !important;
  opacity: 1 !important;
}

body[data-nx-theme="dark"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill,
body[data-nx-theme="dark"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill:hover,
body[data-nx-theme="dark"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill:focus,
body[data-nx-theme="dark"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill:active {
  -webkit-text-fill-color: #eef5ff !important;
  caret-color: #eef5ff !important;
  background-color: #071528 !important;
  box-shadow: 0 0 0 1000px #071528 inset !important;
  border-color: rgba(135,160,207,.22) !important;
}

body[data-nx-theme="light"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
) {
  background: #fff !important;
  color: #142b48 !important;
  -webkit-text-fill-color: #142b48 !important;
  border-color: #d7e3f0 !important;
  caret-color: #142b48 !important;
  color-scheme: light;
}

body[data-nx-theme="light"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
)::placeholder {
  color: #71839a !important;
  -webkit-text-fill-color: #71839a !important;
  opacity: 1 !important;
}

body[data-nx-theme="light"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill,
body[data-nx-theme="light"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill:hover,
body[data-nx-theme="light"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill:focus,
body[data-nx-theme="light"] #walletModalBg :is(
  input, textarea, select, .wallet-input, .wallet-select
):-webkit-autofill:active {
  -webkit-text-fill-color: #142b48 !important;
  caret-color: #142b48 !important;
  background-color: #fff !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  border-color: #d7e3f0 !important;
}

/* Prefer the theme explicitly selected by NexoPlay for native controls. */
body[data-nx-theme="dark"] #walletModalBg :is(input, textarea, select) {
  color-scheme: dark;
}
body[data-nx-theme="light"] #walletModalBg :is(input, textarea, select) {
  color-scheme: light;
}
