/*
 * Styles for js/password-toggle.js. Keep in sync with agilisadmin/css/password-toggle.css.
 * Color/focus pick up the page's --gray-500 / --blue tokens when present.
 */
.pw-toggle-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pw-toggle-wrap--inline {
    display: inline-flex;
    vertical-align: middle;
}

.pw-toggle-wrap > .pw-toggle-input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 38px;
}

/* Suppress Edge/IE's native reveal and clear buttons so only one toggle shows. */
.pw-toggle-input::-ms-reveal,
.pw-toggle-input::-ms-clear {
    display: none;
}

.pw-toggle-btn {
    position: absolute;
    top: 0;
    right: 2px;
    bottom: 0;
    width: 34px;
    margin: auto 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--pw-toggle-color, var(--gray-500, #636B7A));
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pw-toggle-btn:focus {
    outline: none;
}

.pw-toggle-btn:focus-visible {
    outline: 1.5px solid var(--blue, #0055B8);
    outline-offset: -4px;
    box-shadow: inset 0 0 0 4px rgba(0, 85, 184, .10);
}

.pw-toggle-btn svg {
    height: 20px;
    max-height: 75%;
    width: auto;
    aspect-ratio: 1 / 1;
    pointer-events: none;
}

/* Touch devices: 44x44 minimum target, centered on the field. */
@media (pointer: coarse) {
    .pw-toggle-wrap > .pw-toggle-input {
        padding-right: 46px;
    }

    .pw-toggle-btn {
        top: 50%;
        bottom: auto;
        right: 0;
        width: 44px;
        height: 44px;
        margin: 0;
        transform: translateY(-50%);
    }
}
