/* The scanner belongs to the mobile menu; 721px starts the desktop shell. */
@media (min-width: 721px) {
    [data-qr-login-open] { display: none !important; }
}

.ysa-qr-login {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e3e9f2;
    color: #101827;
    font-family: var(--fontfamily, Inter, system-ui, sans-serif);
}
.ysa-qr-login h3 { margin: 0 0 6px; font-size: 15px; font-weight: 650; line-height: 1.4; }
.ysa-qr-login p { margin: 0; color: #526583; font-size: 12px; line-height: 1.6; }
.ysa-qr-login-content { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.ysa-qr-login-image { display: grid; flex: 0 0 128px; place-items: center; width: 128px; height: 128px; box-sizing: content-box; padding: 4px; overflow: visible; border: 1px solid #e3e9f2; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgb(17 26 43 / 5%); }
.ysa-qr-login-image img { display: block; width: 128px; height: 128px; }
.ysa-qr-login-image { position: relative; }
.ysa-qr-login-spinner { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgb(255 255 255 / 88%); }
.ysa-qr-login-spinner::before { content: ""; width: 28px; height: 28px; border: 3px solid #e3e9f2; border-top-color: #101827; border-radius: 50%; animation: ysaQrSigningIn .8s linear infinite; }
@keyframes ysaQrSigningIn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ysa-qr-login-spinner::before { animation: none; } }
.ysa-qr-login-image img[hidden], .ysa-qr-login [hidden], .ysa-qr-dialog [hidden] { display: none !important; }
.ysa-qr-login-image > span { color: #526583; }
.ysa-qr-login-image .ysa-auth-glyph { width: 44px; height: 44px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' d='M3 3h6v6H3zM15 3h6v6h-6zM3 15h6v6H3zM15 15h2v2h-2zM19 13h2v4h-2M13 19h4v2h-4M19 19h2v2h-2M11 3v10H3M13 11h8M11 15v6'/%3E%3C/svg%3E") center/contain no-repeat; }
.ysa-qr-login-details { min-width: 0; }
.ysa-qr-button { box-sizing: border-box; min-height: 44px; padding: 10px 14px; border: 1px solid #101827; border-radius: 9px; background: #101827; color: #fff; cursor: pointer; font: 600 14px/1.4 var(--fontfamily, Inter, system-ui, sans-serif); }
.ysa-qr-button:hover { background: #25334a; }
.ysa-qr-button-secondary { border-color: #64748b; background: #fff; color: #101827; }
.ysa-qr-button-secondary:hover { background: #f8fbff; }
.ysa-qr-button:focus-visible { outline: 2px solid #2588ff; outline-offset: 3px; }
.ysa-qr-button:disabled { opacity: .65; cursor: wait; }
.ysa-qr-login-details .ysa-qr-button { margin-top: 12px; padding: 8px 10px; font-size: 12px; }
.ysa-qr-dialog { box-sizing: border-box; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow: auto; border: 1px solid #e3e9f2; border-radius: 12px; background: #fff; color: #101827; box-shadow: 0 24px 80px rgb(17 26 43 / 20%); font-family: var(--fontfamily, Inter, system-ui, sans-serif); }
.ysa-qr-dialog::backdrop { background: rgb(17 26 43 / 38%); }
.ysa-qr-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ysa-qr-dialog h2 { margin: 0 0 12px; font-size: 23px; line-height: 1.25; font-weight: 650; letter-spacing: -.025em; }
.ysa-qr-dialog p { margin: 0; color: #526583; font-size: 14px; line-height: 1.6; }
.ysa-qr-dialog-close { display: grid; flex: 0 0 44px; place-items: center; margin: -10px -10px 0 0; padding: 0; border-color: transparent; font-size: 26px; font-weight: 400; }
.ysa-qr-dialog-security { margin-top: 16px !important; font-size: 12px !important; }
.ysa-qr-camera { width: 100%; margin: 16px 0; overflow: hidden; border-radius: 9px; background: #111a2b; }
.ysa-qr-camera video { display: block; width: 100% !important; height: auto !important; max-height: none; object-fit: contain; }
.ysa-qr-zoom { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: 14px; }
.ysa-qr-zoom input { flex: 1; min-width: 0; min-height: 44px; accent-color: #101827; }
.ysa-qr-zoom output { width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.ysa-qr-success { width: 88px; height: 88px; margin: 14px auto 20px; color: #00987a; }
.ysa-qr-success svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ysa-qr-success circle { fill: #dff8f1; stroke-dasharray: 214; animation: ysaQrCircle .55s ease-out both; transform-origin: center; }
.ysa-qr-success path { stroke-dasharray: 54; stroke-dashoffset: 54; animation: ysaQrCheck .35s .35s ease-out forwards; }
.ysa-qr-dialog.is-complete { width: min(180px, calc(100% - 32px)); }
.ysa-qr-dialog.is-complete .ysa-qr-success { margin: 0 auto; }
.ysa-qr-dialog.is-complete .ysa-qr-dialog-head,
.ysa-qr-dialog.is-complete .ysa-qr-identity,
.ysa-qr-dialog.is-complete .ysa-qr-dialog-actions { display: none; }
.ysa-qr-dialog.is-complete [data-qr-result-status] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes ysaQrCircle { from { stroke-dashoffset: 214; transform: scale(.7); opacity: 0; } to { stroke-dashoffset: 0; transform: scale(1); opacity: 1; } }
@keyframes ysaQrCheck { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ysa-qr-success circle, .ysa-qr-success path { animation: none; stroke-dashoffset: 0; } }
.ysa-qr-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ysa-qr-dialog-actions > button { flex: 1; }
.ysa-qr-dialog-error { margin-top: 16px !important; color: #b42318 !important; }
.ysa-qr-identity { margin: 20px 0; padding: 16px; border: 1px solid #e3e9f2; border-radius: 9px; background: #fcfdff; }
.ysa-qr-identity > div + div { margin-top: 12px; }
.ysa-qr-identity dt { color: #526583; font-size: 12px; line-height: 1.5; }
.ysa-qr-identity dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; line-height: 1.5; }
@media (max-width: 360px) { .ysa-qr-dialog { padding: 20px; } .ysa-qr-login-content { gap: 10px; } }
