/* Inter (variable) — relative path so the CSS keeps working if the /static route prefix changes */
@font-face {
    font-family: 'Inter';
    src: url('../font/Inter.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../font/JetBrainsMono.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* Same names and values as src/styles.css of web-platform-frontend (Tailwind palette + brand), so the auth pages look like the web app */
:root {
    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --brand-500: #53ad31;
    --brand-600: #47932a;
    --brand-700: #357018;
    --primary: var(--brand-500);
    --primary-hover: var(--brand-600);
    --primary-foreground: #fff;
    --ring: var(--brand-500);
    --color-white: #fff;
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #e5e5e5;
    --color-neutral-300: #d4d4d4;
    --color-neutral-400: #a3a3a3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-900: #171717;
    --color-neutral-950: #0a0a0a;
    --color-red-50: #fef2f2;
    --color-red-200: #fecaca;
    --color-red-600: #dc2626;
    --color-red-700: #b91c1c;
    --color-orange-700: #c2410c;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --tracking-tight: -0.025em;
    /* Always two shadows, so switching between them never flickers */
    --focus-field: 0 0 0 0.5px var(--ring), 0 0 0 3.5px color-mix(in srgb, var(--ring) 50%, transparent);
    --focus-field-code: 0 0 0 0.5px var(--color-neutral-950), 0 0 0 4px rgb(0 0 0 / 0.08);
    --focus-field-error:
        0 0 0 0.5px var(--color-red-700), 0 0 0 3.5px color-mix(in srgb, var(--color-red-700) 20%, transparent);
    --field-invalid: 0 0 0 0 transparent, 0 0 0 3px color-mix(in srgb, var(--color-red-700) 10%, transparent);
}

* {
    box-sizing: border-box;
}

/* Author display rules (.auth-button: inline-flex) would beat the UA [hidden] rule, so the passkey buttons hidden until passkey.js finds support would show */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    color: var(--color-neutral-900);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 20px;
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

p {
    margin: 0;
}

/* Type scale, named after the Figma text styles like the frontend's typo-* utilities */
.typo-text-lg-semibold {
    font-size: 18px;
    line-height: 28px;
    letter-spacing: var(--tracking-tight);
    font-weight: 600;
}

.typo-text-sm-regular {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.typo-text-sm-medium {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

.typo-text-xs-regular {
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
}

.typo-text-xs-medium {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

/* Page shell: one 344px column on white, like the onboarding of the web app */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    padding: 200px 24px 64px;
}

@media (max-height: 800px), (max-width: 480px) {
    .auth-shell {
        padding-top: 96px;
    }
}

.auth-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 344px;
    max-width: 100%;
    view-transition-name: auth-column;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Buttons of the same kind (passkey, providers) sit closer together */
.auth-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* A form inside a stack only wraps its button */
.auth-stack > form {
    display: contents;
}

.auth-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-inline: 24px;
    text-align: center;
}

.auth-title {
    margin: 0;
    color: var(--color-neutral-900);
}

.auth-subtitle {
    color: var(--color-neutral-600);
    overflow-wrap: anywhere;
}

.auth-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-inline: auto;
    color: var(--color-neutral-600);
}

.auth-status-icon-error {
    color: var(--color-red-700);
}

/* Form field: label row (label + optional note on the right), control, hint, error */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.auth-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.auth-label {
    color: var(--color-neutral-600);
}

/* Two fields side by side (first and last name) */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-hint {
    color: var(--color-neutral-600);
}

.auth-error {
    color: var(--color-red-700);
}

/* A field error from form-validation.js opens and closes like ui-form-field of the frontend; the negative margin cancels the field gap while it is closed */
.auth-error-slot {
    display: grid;
    grid-template-rows: 0fr;
    margin-top: -8px;
    opacity: 0;
    transition:
        grid-template-rows 0.15s ease-out,
        opacity 0.15s ease-out;
}

.auth-error-slot[data-open] {
    grid-template-rows: 1fr;
    opacity: 1;
}

.auth-error-slot[data-instant] {
    transition: none;
}

.auth-error-slot > div {
    min-height: 0;
    overflow: hidden;
}

.auth-error-slot .auth-error {
    padding-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .auth-error-slot {
        transition: none;
    }
}

/* An error that belongs to the whole form sits close under the field above it */
.auth-form > .auth-error {
    margin-top: -16px;
}

.auth-form > .auth-forgot {
    align-self: flex-end;
    margin-top: -16px;
}

.auth-form > .auth-back {
    align-self: center;
}

/* A group that only hides and shows its children together; they stay items of the form's flex column */
.auth-contents {
    display: contents;
}

.auth-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    color: var(--color-neutral-950);
    font: inherit;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.auth-input::placeholder {
    color: var(--color-neutral-400);
}

.auth-input:focus-visible {
    border-color: var(--ring);
    box-shadow: var(--focus-field);
}

.auth-input[aria-invalid='true'] {
    border-color: var(--color-red-700);
    box-shadow: var(--field-invalid);
}

.auth-input[aria-invalid='true']:focus-visible {
    box-shadow: var(--focus-field-error);
}

/* Read-only fields (the account email): visibly not editable, but still selectable and readable by screen readers */
.auth-input[readonly] {
    border-color: var(--color-neutral-200);
    background: var(--color-neutral-50);
    color: var(--color-neutral-600);
}

.auth-input[readonly]:focus-visible {
    border-color: var(--color-neutral-300);
    box-shadow: none;
}

/* Password input with the show / hide button inside */
.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-right: 40px;
}

.auth-password-toggle {
    position: absolute;
    top: 2px;
    right: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: none;
    color: var(--color-neutral-700);
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: var(--color-neutral-950);
}

.auth-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.auth-strength {
    color: var(--color-neutral-600);
}

.auth-strength[data-level='short'] {
    color: var(--color-red-700);
}

/* "Weak" of a too short password: looks like the note, the dotted line shows that it has a tooltip */
.auth-strength-button {
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    outline: none;
}

.auth-strength-button:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.auth-strength[data-level='weak'] {
    color: var(--color-orange-700);
}

.auth-strength[data-level='strong'] {
    color: var(--brand-700);
}

/* Label row of a new password: tips button right after the label, strength note on the right */
.auth-field-label:has(.auth-strength-row) {
    position: relative;
}

.auth-strength-row {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-inline-start: -4px;
}

.auth-toggletip {
    display: flex;
}

/* the ::before makes the touch target 24px without growing the label row */
.auth-toggletip-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--color-neutral-500);
    cursor: pointer;
    outline: none;
}

.auth-toggletip-button::before {
    content: '';
    position: absolute;
    inset: -4px;
}

.auth-toggletip-button:hover,
.auth-toggletip-button[aria-expanded='true'] {
    color: var(--color-neutral-900);
}

.auth-toggletip-button:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.auth-toggletip-button svg {
    width: 14px;
    height: 14px;
}

/* Like the frontend's ui-tooltip-panel: above the label row, as wide as the field at most; the arrow points at the button (--toggletip-arrow-x from password-input.js) */
.auth-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 10;
    width: max-content;
    max-width: min(24rem, 100%);
    padding: 6px 8px;
    border-radius: var(--radius-lg);
    background: var(--color-neutral-900);
    color: var(--color-white);
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transform-origin: var(--toggletip-arrow-x, 16px) bottom;
    transition:
        opacity 0.15s,
        transform 0.15s,
        visibility 0.15s;
}

.auth-tooltip ul {
    margin: 0;
    padding-inline-start: 1.25em;
}

/* a bridge over the gap, so the pointer reaches the tips without closing them */
.auth-tooltip::before {
    content: '';
    position: absolute;
    inset: 100% 0 -8px;
}

.auth-tooltip-arrow {
    position: absolute;
    top: 100%;
    left: calc(var(--toggletip-arrow-x, 16px) - 5px);
    display: block;
    color: var(--color-neutral-900);
}

.auth-toggletip-end .auth-tooltip {
    right: 0;
    left: auto;
    transform-origin: calc(100% - var(--toggletip-arrow-x, 16px)) bottom;
}

.auth-toggletip-end .auth-tooltip-arrow {
    right: calc(var(--toggletip-arrow-x, 16px) - 5px);
    left: auto;
}

.auth-toggletip[data-open] .auth-tooltip {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* hover opens them only where a pointer can hover, after the frontend's delay; Escape closes them until the pointer leaves */
@media (hover: hover) {
    .auth-toggletip:hover:not([data-tips-closed]) .auth-tooltip {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0.3s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-tooltip {
        transform: none;
        transition: none;
    }
}

/* Consent checkbox: box and text on one line, the box looks like the frontend's uiCheckbox */

/* A field that is still invalid after another submit flashes its red ring once (form-validation.js) */
[data-blink] .auth-input[aria-invalid='true'],
[data-blink] .auth-code-boxes[aria-invalid='true'] .auth-code-box {
    animation: auth-invalid-blink 0.6s ease-in-out;
}

/* Starts at the red ring without focus: the click on the submit button takes the focus away, the submit gives it back (like the frontend) */
@keyframes auth-invalid-blink {
    from {
        box-shadow: var(--field-invalid);
    }
    40% {
        box-shadow:
            0 0 0 0 transparent,
            0 0 0 4px color-mix(in srgb, var(--color-red-700) 35%, transparent);
    }
}

/* Server message as a toast, like the frontend's ui-toaster: bottom right; the grid row grows, so the toast rises from below (toast.js closes it) */
.auth-toaster {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    display: grid;
    grid-template-rows: 1fr;
    width: 480px;
    max-width: calc(100vw - 48px);
    animation: auth-toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-toaster[data-closing] {
    animation: auth-toast-out 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.auth-toast-slot {
    min-height: 0;
    padding-top: 12px;
}

.auth-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: var(--radius-xl);
    background: var(--color-white);
    box-shadow:
        0 20px 25px -5px rgb(0 0 0 / 0.1),
        0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.auth-toast-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--color-neutral-700);
}

.auth-toast-icon-error {
    color: var(--color-red-700);
}

.auth-toast-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--color-neutral-950);
}

.auth-toast-close {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: -2px -4px 0 0;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: none;
    color: var(--color-neutral-500);
    cursor: pointer;
    outline: none;
}

.auth-toast-close:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.auth-toast-close:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

@keyframes auth-toast-in {
    from {
        grid-template-rows: 0fr;
        opacity: 0;
    }
}

/* Fades out in the first half, while the row closes */
@keyframes auth-toast-out {
    50% {
        opacity: 0;
    }
    to {
        grid-template-rows: 0fr;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-toaster {
        animation: none;
    }
}

/* Code input: the plain input until code-input.js swaps in one box per digit */
.auth-code-fallback {
    font-family: var(--font-mono);
    letter-spacing: 0.2em;
}

.auth-code-boxes {
    display: grid;
    grid-template-columns: repeat(var(--code-length, 6), minmax(0, 1fr));
    gap: 12px;
}

.auth-code-box {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    color: var(--color-neutral-950);
    font: inherit;
    font-size: 20px;
    line-height: 28px;
    font-weight: 500;
    text-align: center;
    outline: none;
    caret-color: transparent;
}

.auth-code-box:focus-visible {
    border-color: var(--color-neutral-950);
    box-shadow: var(--focus-field-code);
}

.auth-code-boxes[aria-invalid='true'] .auth-code-box {
    border-color: var(--color-red-700);
    box-shadow: var(--field-invalid);
}

.auth-code-boxes[aria-invalid='true'] .auth-code-box:focus-visible {
    box-shadow: var(--focus-field-error);
}

/* the boxes pulse slowly while an auto-submitted code is posted */
.auth-code-boxes[data-busy] {
    animation: auth-code-pulse 1.6s ease-in-out infinite;
}

@keyframes auth-code-pulse {
    50% {
        opacity: 0.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-code-boxes[data-busy] {
        animation: none;
        opacity: 0.6;
    }
}

/* TOTP enrollment (mfa-setup): QR tile and manual key on a light panel */
.auth-qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--color-neutral-50);
    text-align: center;
}

.auth-qr {
    display: block;
    width: 144px;
    height: 144px;
    padding: 10px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-lg);
    background: var(--color-white);
}

.auth-qr-key {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--color-neutral-600);
}

.auth-qr-key strong {
    color: var(--color-neutral-950);
    font-family: var(--font-mono);
    font-weight: 500;
    word-spacing: 0.25em;
}

/* Buttons, named like the frontend's uiButton variants; also used on <a> elements, hence the link resets */
.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--primary);
    color: var(--primary-foreground);
    font: inherit;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: box-shadow 0.15s;
}

.auth-button:hover {
    background: var(--primary-hover);
}

.auth-button:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.auth-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.auth-button-secondary {
    border-color: var(--color-neutral-300);
    background: var(--color-white);
    color: var(--color-neutral-700);
}

.auth-button-secondary:hover {
    background: var(--color-neutral-100);
}

.auth-provider-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* "OR" separator between the password form and the other sign-in methods */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--color-neutral-600);
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-neutral-200);
}

/* Lines under the form (links, resend, privacy notice) */
.auth-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-inline: 24px;
    color: var(--color-neutral-600);
    text-align: center;
}

/* Text link (typo-text-sm-link of the frontend); also on buttons that must post (resend) */
.auth-link {
    padding: 0;
    border: none;
    border-radius: 2px;
    background: none;
    color: var(--color-neutral-950);
    font: inherit;
    font-weight: 500;
    text-decoration-line: underline;
    text-decoration-color: var(--color-neutral-300);
    text-underline-offset: 4px;
    cursor: pointer;
    outline: none;
}

.auth-link:hover {
    text-decoration-color: var(--color-neutral-950);
}

.auth-link:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.auth-link:disabled {
    color: var(--color-neutral-500);
    text-decoration: none;
    cursor: default;
}

/* a form that reads as a single line of text (e.g. "Didn't get a code? Send it again") */
.auth-inline-form {
    display: inline;
}

/* While resend-button.js waits: still an underlined link, but greyed out */
.auth-resend:disabled,
.auth-resend:disabled:hover {
    color: var(--color-neutral-500);
    text-decoration-line: underline;
    text-decoration-color: var(--color-neutral-300);
    cursor: not-allowed;
}

/* in-button loading indicator shown while a form post is in flight */
.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid color-mix(in srgb, var(--primary-foreground) 35%, transparent);
    border-top-color: var(--primary-foreground);
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-button-secondary .auth-spinner {
    border-color: color-mix(in srgb, var(--color-neutral-700) 25%, transparent);
    border-top-color: var(--color-neutral-700);
}

/* pill showing who is signed in */
.auth-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    width: fit-content;
    margin-inline: auto;
    padding: 6px 14px;
    border: 1px solid var(--color-neutral-200);
    border-radius: 999px;
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
    font-size: 13px;
}

.auth-identity svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-neutral-500);
}

/* min-width: 0 lets the nested spans ellipsis instead of stretching the pill past the column */
.auth-identity-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.auth-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-identity-email {
    color: var(--color-neutral-500);
    font-size: 12px;
}

/* A fresh load only plays the second half */
@keyframes auth-zoom-out {
    to {
        opacity: 0;
        transform: scale(0.98);
    }
}

@keyframes auth-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
}

.auth-column {
    animation: auth-zoom-in 0.15s ease-out both;
}

@view-transition {
    navigation: auto;
}

::view-transition-group(auth-column),
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
}

::view-transition-old(auth-column) {
    animation: auth-zoom-out 0.15s ease-in both;
}

::view-transition-new(auth-column) {
    animation: auth-zoom-in 0.15s ease-out 0.2s both;
}

/* after a page change (page-transition.js) the view transition already showed the new page */
html[data-view-transition] .auth-column {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .auth-column {
        animation: none;
    }

    @view-transition {
        navigation: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* passkey list on /account/passkeys: each row switches between view, rename and delete confirmation with its own hidden radio group */
.passkey-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-lg);
}

.passkey-row {
    padding: 10px 8px 10px 14px;
}

.passkey-row + .passkey-row {
    border-top: 1px solid var(--color-neutral-200);
}

.passkey-mode {
    display: none;
}

.passkey-view,
.passkey-edit,
.passkey-confirm {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
}

.passkey-edit,
.passkey-confirm,
.passkey-row:has(.passkey-mode-edit:checked) .passkey-view,
.passkey-row:has(.passkey-mode-delete:checked) .passkey-view {
    display: none;
}

.passkey-row:has(.passkey-mode-edit:checked) .passkey-edit,
.passkey-row:has(.passkey-mode-delete:checked) .passkey-confirm {
    display: flex;
}

.passkey-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.passkey-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.passkey-meta {
    color: var(--color-neutral-500);
    font-size: 12px;
    line-height: 16px;
}

.passkey-edit .auth-input {
    flex: 1;
}

.passkey-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-lg);
    background: none;
    color: var(--color-neutral-500);
    cursor: pointer;
}

.passkey-icon svg {
    width: 16px;
    height: 16px;
}

.passkey-icon:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.passkey-icon-danger:hover {
    background: var(--color-red-50);
    color: var(--color-red-700);
}

.passkey-icon:focus-visible,
.passkey-small-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.passkey-confirm {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 6px 2px 0;
}

.passkey-confirm-text {
    flex-basis: 100%;
    overflow-wrap: anywhere;
}

.passkey-small-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    color: var(--color-neutral-700);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.passkey-small-button:hover {
    background: var(--color-neutral-100);
}

.passkey-small-button-danger {
    border-color: var(--color-red-200);
    color: var(--color-red-600);
}

.passkey-small-button-danger:hover {
    background: var(--color-red-50);
}
