/* Native password masking also works without JavaScript. */
body input[type="password"],
body input.coati-password-input {
  font-size: 1.25rem !important;
}
.coati-password-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.coati-password-field:has(> input[hidden]) { display: none; }
body .coati-password-field > input.coati-password-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding-inline-end: 52px;
}
body .coati-password-field > button.coati-password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--coati-accent, #3f2618);
  box-shadow: none;
  cursor: pointer;
}
body .coati-password-field > .coati-password-toggle::before {
  content: "";
  width: 21px;
  height: 21px;
  background: currentColor;
  mask: url("../icons/eye.svg") center / contain no-repeat;
  -webkit-mask: url("../icons/eye.svg") center / contain no-repeat;
}
body .coati-password-field > .coati-password-toggle[aria-pressed="true"]::before {
  mask-image: url("../icons/eye-off.svg");
  -webkit-mask-image: url("../icons/eye-off.svg");
}
body .coati-password-field > .coati-password-toggle:hover,
body .coati-password-field > .coati-password-toggle:focus-visible {
  background: rgba(111, 143, 54, 0.14);
  color: var(--coati-accent, #3f2618);
}
body .coati-password-field > .coati-password-toggle:focus-visible {
  outline: 2px solid var(--coati-secondary, #6f8f36);
  outline-offset: -3px;
}
body .coati-password-field > .coati-password-toggle:disabled { opacity: .45; cursor: default; }
body .coati-password-field > .coati-password-toggle[hidden] { display: none; }
/* Avoid a second, browser-provided eye next to our accessible control. */
.coati-password-input::-ms-reveal { display: none; }
@media (forced-colors: active) {
  body .coati-password-field > .coati-password-toggle { color: ButtonText; }
  body .coati-password-field > .coati-password-toggle::before { forced-color-adjust: none; background: ButtonText; }
}
