/* Only wrappers created for app-owned password fields are styled. */
.hp-password-peek {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0 0 var(--hp-s-2, 8px);
    box-sizing: border-box;
}
.hp-password-peek > input,
.hp-lernapp .hp-password-peek > .hp-auth-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0;
    padding-inline-end: 52px;
}
.hp-password-peek > .hp-password-peek-button {
    position: absolute;
    inset-inline-end: 2px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    margin: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: var(--hp-radius-sm, 6px);
    background: transparent;
    color: var(--hp-text-muted, #557052);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.hp-password-peek > .hp-password-peek-button:hover,
.hp-password-peek > .hp-password-peek-button[aria-pressed="true"] {
    color: var(--hp-primary, #3f5c3b);
    background: var(--hp-primary-tint, #eef3ea);
}
.hp-password-peek > .hp-password-peek-button:focus-visible {
    outline: 2px solid var(--hp-primary, #3f5c3b);
    outline-offset: -3px;
}
.hp-password-peek > .hp-password-peek-button:disabled {
    cursor: default;
    opacity: 0.5;
}
.hp-password-peek-button > svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: none;
    pointer-events: none;
}

/* Keep only the app eye; do not suppress password-manager autofill controls.
   Official Edge control: learn.microsoft.com/microsoft-edge/web-platform/password-reveal */
.hp-password-peek > input::-ms-reveal {
    display: none;
}

/* The native field stays password, including its password-manager semantics.
   Transparent glyphs also suppress a browser's last-character echo. Only the
   dot-only aria-hidden layer paints while the explicit mask state is active. */
.hp-password-peek > input[data-hp-password-masked="true"] {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    caret-color: var(--hp-text, #3f5c3b);
}
.hp-password-peek > input[data-hp-password-masked="true"]::selection {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
}
.hp-password-peek > input[data-hp-password-masked="true"]::placeholder {
    color: var(--hp-text-soft, #5e7a5b) !important;
    -webkit-text-fill-color: var(--hp-text-soft, #5e7a5b) !important;
    opacity: 1;
}
.hp-password-mask {
    position: absolute;
    z-index: 1;
    left: 13px;
    right: 53px;
    top: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    color: var(--hp-text, #3f5c3b);
}
.hp-password-mask[hidden] { display: none; }
.hp-password-mask-dots {
    display: block;
    flex: none;
    min-width: 100%;
    width: max-content;
    white-space: pre;
    font: inherit;
    line-height: inherit;
    transform-origin: left center;
    pointer-events: none;
}
.hp-password-peek > .hp-password-peek-button { z-index: 2; }
@media (forced-colors: active) {
    .hp-password-peek > input[data-hp-password-masked="true"] {
        forced-color-adjust: none;
        background: Canvas;
        border-color: CanvasText;
        caret-color: CanvasText;
    }
    .hp-password-mask { color: CanvasText; }
    .hp-password-peek > input[data-hp-password-masked="true"]::placeholder {
        color: GrayText !important;
        -webkit-text-fill-color: GrayText !important;
    }
    .hp-password-peek > input[data-hp-password-masked="true"]::selection {
        background: Highlight;
    }
}
