/* Passkey screens: sign-in, enrolment, recovery, recovery codes, security.
   Sits on top of login.css, which already provides the card, the alerts and
   the buttons. Nothing here is repeated inline - the pages carry no style
   attributes, because the CSP has no 'unsafe-inline' for script and the same
   discipline keeps the markup readable. */

.note {
    margin: var(--space-5) 0 0;
    font-size: var(--text-base);
    line-height: var(--leading-base);
    color: var(--text-gray);
    text-align: center;
}

.note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
}

.note a:hover {
    text-decoration: underline;
}

.passkey-action {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Recovery codes: shown once, so they have to be easy to copy by hand. */
.codes {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}

.codes__item {
    font-family: var(--font-mono);
    font-size: var(--text-md);
    letter-spacing: var(--tracking-wider);
    text-align: center;
    padding: var(--space-2) var(--space-1);
    border: var(--control-border);
    border-radius: var(--radius-md);
    background: var(--surface-2, var(--public-grid));
}

@media (max-width: 420px) {
    .codes {
        grid-template-columns: 1fr;
    }
}

/* The list of devices that can sign this account in. */
.passkey-list {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-4);
    border: var(--control-border);
    border-radius: var(--radius-lg);
}

.passkey-item__name {
    font-weight: var(--weight-semibold);
    display: block;
}

.passkey-item__meta {
    font-size: var(--text-sm);
    color: var(--text-gray);
}

.passkey-item__form {
    margin: 0;
}

.codes-left {
    font-size: var(--text-base);
    color: var(--text-gray);
    margin: 0 0 var(--space-3);
}
/* Remove sits inside a row, so it must not stretch like the page buttons. */
.passkey-item .btn {
    width: auto;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-base);
}

/* Page layout, not the component: the first heading sits flush with the card. */
.section-title:first-of-type {
    margin-top: 0;
}
