.password-field-wrap,
.auth-password-wrap,
.profile-password-wrap,
.password-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.password-field-wrap input[type="password"],
.password-field-wrap input[type="text"][autocomplete="current-password"],
.password-field-wrap input[type="text"][autocomplete="new-password"],
.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"][autocomplete="new-password"],
.profile-password-wrap input[type="password"],
.profile-password-wrap input[type="text"][autocomplete="current-password"],
.profile-password-wrap input[type="text"][autocomplete="new-password"],
.mp-field .password-field-wrap input {
    padding-right: 2.75rem;
    width: 100%;
    box-sizing: border-box;
}

.password-toggle-btn,
.auth-password-toggle,
.profile-password-toggle,
[data-pw-toggle] {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 1px solid #d6e3ec;
    border-radius: 999px;
    background: #f5f9fc;
    color: #5f7482;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    line-height: 1;
    z-index: 2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.password-toggle-btn:hover,
.auth-password-toggle:hover,
.profile-password-toggle:hover,
[data-pw-toggle]:hover {
    color: #0a7ec2;
    border-color: #9bc2d7;
    background: #eef6fb;
}

.password-toggle-btn:disabled,
.auth-password-toggle:disabled,
.profile-password-toggle:disabled,
[data-pw-toggle]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

html[data-theme='dark'] .password-toggle-btn,
html[data-theme='dark'] .auth-password-toggle,
html[data-theme='dark'] .profile-password-toggle,
html[data-theme='dark'] [data-pw-toggle] {
    border-color: #3a4f5f;
    background: #1e2a35;
    color: #9eb4c4;
}

html[data-theme='dark'] .password-toggle-btn:hover,
html[data-theme='dark'] .auth-password-toggle:hover,
html[data-theme='dark'] .profile-password-toggle:hover,
html[data-theme='dark'] [data-pw-toggle]:hover {
    color: #5eb8e8;
    border-color: #4a7088;
    background: #243442;
}

.password-field-wrap.password-capslock-active input,
.profile-password-wrap.password-capslock-active input,
.auth-password-wrap.password-capslock-active input,
.password-input-wrap.password-capslock-active input {
    border-color: #d4a017;
}

html[data-theme='dark'] .password-field-wrap.password-capslock-active input,
html[data-theme='dark'] .profile-password-wrap.password-capslock-active input,
html[data-theme='dark'] .auth-password-wrap.password-capslock-active input,
html[data-theme='dark'] .password-input-wrap.password-capslock-active input {
    border-color: #c9a227;
}
