/* Styles for the static sign-in pages (AccountLayout), replacing behaviour site.min.css expected jquery to drive. */

/* cross-fade between the sign-in pages (including form posts) instead of flashing a blank page. browsers without
   cross-document view transitions ignore this. every AccountLayout page opts in, which both pages need to. */
@view-transition {
    navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}

/* float the label above inputs that have a value (site.min.css did this with a "valid" class set by jquery).
   the inputs have placeholder=" " so :placeholder-shown means "empty"; this also covers browser autofill. */
.loginWrapper .row .loginContainer form .input-group input:not(:placeholder-shown) ~ label {
    transform: translate(0, -100%);
    opacity: 1;
    cursor: default;
    pointer-events: none;
}

.caps-lock-warning {
    margin: 0.4rem 0 0 1.6rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #b00020;
}

/* an always present live region that account.js fills in while caps lock is on. it must stay rendered
   (not display: none) for screen readers to announce it, so it only collapses its margin while empty. */
.caps-lock-warning:empty {
    margin: 0;
}

/* "remember me" warning, previously toggled by alert.js */
.checkbox:has(input:checked) + .sharedPC {
    max-height: 40px;
}

.field-validation-message {
    padding-top: 5px;
}

.refreshBtn {
    color: #00788f !important;
}

.signout-frame {
    display: none;
}

/* passkeys (passkey.js). the controls carry the hidden attribute until the script finds passkey support; make sure
   no display rule from site.min.css shows them early. */
[data-passkey-supported][hidden],
[data-passkey-unsupported][hidden] {
    display: none !important;
}

.passkey-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    color: #6c757d;
}

.passkey-divider::before,
.passkey-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #ced4da;
}

.passkey-status {
    margin: 0.4rem 0 0;
    font-weight: 700;
    color: #b00020;
}

/* collapse while empty, but stay rendered so screen readers announce the message when it appears. */
.passkey-status:empty {
    margin: 0;
}

.passkey-hint {
    margin: -0.5rem 0 1rem;
    color: #6c757d;
}

.passkey-panel {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #ced4da;
}

.passkey-list {
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.passkey-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #ced4da;
}

.passkey-name {
    flex: 1 1 100%;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.passkey-details {
    flex: 1 1 auto;
    color: #6c757d;
}

.passkey-actions {
    display: flex;
    gap: 1rem;
}

.passkey-actions a {
    color: #00788f;
}
