.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 38px;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 38px;
    height: 34px;
    padding: 0;
    background: none;
    border: 0;
    color: #999;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
    color: #555;
}

.password-caps-lock {
    margin-top: 5px;
    color: #8a6d3b;
    font-size: 12px;
}

.password-caps-lock .fa {
    margin-right: 4px;
}

/*
 * "Or login with" (POKER-399487): the SSO module's group of providers, or one of the same look for
 * the passkey alone where no provider brings it — that one shown by passkeys.js once the browser
 * turns out to have passkeys. Its buttons in equal columns, each with an icon.
 */
#fieldset-passkey {
    display: none;
    margin-top: 10px;
}

#fieldset-passkey legend {
    font-size: medium;
    font-variant: all-small-caps;
}

#fieldset-authopenid,
#fieldset-passkey.is-passkey-ready {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    grid-gap: 8px;
}

#fieldset-authopenid .btn,
#fieldset-passkey .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#fieldset-authopenid .btn::before,
#fieldset-passkey .btn::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    /* the icon is a mask painted in the button's text colour: it follows the skin */
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

/* a provider: a shield with a check */
#fieldset-authopenid .js-oauth-login::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 19.5 5.8V11c0 4.9-3.2 8.6-7.5 10.2C7.7 19.6 4.5 15.9 4.5 11V5.8Z'/%3E%3Cpath d='m8.8 11.8 2.2 2.2 4.3-4.4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 19.5 5.8V11c0 4.9-3.2 8.6-7.5 10.2C7.7 19.6 4.5 15.9 4.5 11V5.8Z'/%3E%3Cpath d='m8.8 11.8 2.2 2.2 4.3-4.4'/%3E%3C/svg%3E");
}

/* the passkey: a person with a key */
#fieldset-authopenid .js-passkey-sign-in-button::before,
#fieldset-passkey .js-passkey-sign-in-button::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7.5' r='3.5'/%3E%3Cpath d='M2.5 20.5c0-3.6 2.9-6.5 6.5-6.5 1.4 0 2.7.4 3.7 1.2'/%3E%3Ccircle cx='17.5' cy='12.5' r='2.5'/%3E%3Cpath d='M17.5 15v6m0-3h2m-2 2.5h1.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7.5' r='3.5'/%3E%3Cpath d='M2.5 20.5c0-3.6 2.9-6.5 6.5-6.5 1.4 0 2.7.4 3.7 1.2'/%3E%3Ccircle cx='17.5' cy='12.5' r='2.5'/%3E%3Cpath d='M17.5 15v6m0-3h2m-2 2.5h1.5'/%3E%3C/svg%3E");
}
