/* Passkeys (app/passkeys.py): "Sign in with a passkey" under the password form (auth.js), and the Passkeys card on
   Settings (pages/passkeys.js). Built only from portal.css's tokens. No pill for a passkey's kind: it is plain text. */

/* Sign-in: a rule with "or" in it, then the quiet button and its one line of help. */
.passkey-choice { display: grid; justify-items: start; gap: .8rem; margin-top: 1.4rem; }
/* .card .passkey-or, not .passkey-or: portal.css caps every .card p at 34rem, which cut the rule short of the fields. */
.card .passkey-or { display: flex; width: 100%; max-width: none; align-items: center; gap: .8rem; margin: 0; color: var(--quiet); font-size: .78rem; }
.passkey-or::before, .passkey-or::after { flex: 1; height: 1px; background: var(--rule); content: ""; }
button.passkey-button { min-height: 48px; padding: 0 1.1rem; font-size: .8rem; }
button.passkey-button svg { width: 16px; height: 16px; color: var(--icon); }
button.passkey-button:disabled { cursor: wait; opacity: .6; }

/* Settings: one row per passkey, its icon, its name and two lines about it, and its two actions. */
.passkey-list { margin: 1.4rem 0 0; padding: 0; list-style: none; }
.passkey { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .35rem 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.passkey-icon { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--icon); }
.passkey-icon svg { width: 18px; height: 18px; }
.passkey-text { display: grid; gap: .3rem; min-width: 0; }
.passkey-name { color: var(--text); font: 600 .95rem/1.3 var(--sans); overflow-wrap: anywhere; }
.passkey-meta { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.passkey-actions { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
.passkey-actions .text-link { min-height: 44px; }
.passkey-empty { color: var(--muted); }
.passkey-panel { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.card h3.passkey-panel-title { font-size: clamp(1.3rem, 1.6vw, 1.6rem); overflow-wrap: anywhere; }
.passkey-panel .form { margin-top: 1rem; }
.passkey-confirm { margin-top: .4rem; }
.passkey-cancel { margin-top: .4rem; }

@media (max-width: 560px) {
  button.passkey-button { width: 100%; justify-content: center; }   /* full width at the thumb, as the Sign in button */
  .passkey { grid-template-columns: auto minmax(0, 1fr); }
  .passkey-actions { grid-column: 2; }
}
