/* Reserve space for the enhanced password control without changing other inputs. */
.auth-form .password-field {
    --password-toggle-space: 44px;

    position: relative;
    width: 100%;
}

.auth-form .password-field--ready > .input {
    padding-inline-end: var(--password-toggle-space);
}

/* Keep the icon centered in a separate control at the end of the input. */
.auth-form .password-field__toggle {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--password-toggle-space);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    color: var(--wpsc-text-light-color, #666);
    cursor: pointer;
}

/* Show the action available on click: reveal a hidden password or hide a visible one. */
.auth-form .password-field__toggle-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("../img/toggle-visibility-open.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.auth-form .password-field__toggle[aria-pressed="true"] .password-field__toggle-icon {
    background-image: url("../img/toggle-visibility.svg");
}

/* Keep native hidden behavior and a visible keyboard focus indicator. */
.auth-form .password-field__toggle[hidden] {
    display: none;
}

.auth-form .password-field__toggle:focus-visible {
    outline: 2px solid var(--wpsc-link-color, #3275ff);
    outline-offset: -3px;
}
