.password-field {
    position: relative;
    width: 100%;
}

.password-field > input {
    padding-right: 52px !important;
}

.password-field--compact {
    max-width: 320px;
}

.password-field--compact > input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding-left: 14px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-field--compact > input:focus {
    border-color: #355fb5;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(53, 95, 181, 0.14);
}

.password-visibility-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    /* Login inputs receive z-index: 1001 on focus for autofill handling. */
    z-index: 1002;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #778397;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.password-visibility-toggle:hover {
    color: #355fb5;
    background: rgba(53, 95, 181, 0.09);
}

.password-visibility-toggle:focus {
    outline: 0;
    color: #355fb5;
    background: rgba(53, 95, 181, 0.1);
    box-shadow: 0 0 0 3px rgba(53, 95, 181, 0.16);
}

.password-visibility-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.password-visibility-toggle .password-icon-hide {
    display: none;
}

.password-visibility-toggle.is-visible .password-icon-show {
    display: none;
}

.password-visibility-toggle.is-visible .password-icon-hide {
    display: block;
}

.password-field:focus-within .password-visibility-toggle {
    color: #355fb5;
}
