html.device-auth-pending { overflow: hidden; }
html.device-auth-pending body > :not(#device-auth) { visibility: hidden; }
.device-auth {
  width: min(440px, calc(100% - 32px));
  padding: 38px 28px 30px;
  border: 1px solid #c7dfea;
  border-radius: 28px;
  background: linear-gradient(155deg, #fff, #edf8fe);
  color: #174668;
  text-align: center;
  box-shadow: 0 24px 90px #0b3a6540;
  overflow-y: auto;
}
.device-auth::backdrop { background: #092c526e; backdrop-filter: blur(14px); }
.device-auth .device-auth-cancel { position: absolute; inset-inline-end: 8px; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #567d94; background: transparent; font-size: 27px; }
.device-auth-eyebrow { color: #527d99; font-size: 10px; letter-spacing: 1.5px; line-height: 1.8; margin-top: 8px; }
.device-auth h2 { margin: 14px 0 12px; padding: 0; font-size: 30px; line-height: 1.25; }
.device-auth .device-auth-copy { font-size: 15px; line-height: 1.7; color: #56788f; margin: 0; }
.device-auth-device { position: relative; width: 148px; height: 204px; margin: 28px auto; padding: 26px 12px; border: 3px solid #7caec8; border-radius: 28px; background: linear-gradient(160deg, #d7effc, #f5fcff); box-shadow: 0 10px 30px #1c73a512; display: grid; place-items: center; }
.device-auth-device::before { content: ''; position: absolute; top: 8px; left: calc(50% - 20px); width: 40px; height: 6px; border-radius: 8px; background: #88b6cf; }
.device-auth-device::after { content: ''; position: absolute; bottom: 8px; left: 35%; width: 30%; height: 4px; border-radius: 8px; background: #88b6cf; }
.device-auth[data-device="laptop"] .device-auth-device { width: 250px; height: 164px; border-radius: 15px; }
.device-auth[data-device="laptop"] .device-auth-device::before { width: 5px; height: 5px; left: calc(50% - 2px); top: 5px; }
.device-auth[data-device="laptop"] .device-auth-device::after { bottom: -13px; left: -21px; width: calc(100% + 42px); height: 11px; border-radius: 2px 2px 12px 12px; background: #8ab6cd; }
.device-auth-sensor { position: relative; width: 100px; height: 100px; color: #1888b5; }
.device-auth-sensor svg { display: block; width: 100%; height: 100%; }
.device-auth-sensor .device-auth-check { display: none; }
.device-auth-scan { position: absolute; inset-inline: 8px; top: 12px; height: 2px; background: #14add3; box-shadow: 0 0 18px 4px #1bb7db40; animation: deviceFaceScan .8s ease-in-out infinite alternate; }
.device-auth-status { min-height: 54px; font-size: 18px; line-height: 1.6; font-weight: 600; color: #22688e; }
.device-auth .device-auth-note { font-size: 12px; line-height: 1.8; color: #637f92; margin: 12px 0 0; }
.device-auth-continue { width: 100%; margin-top: 16px; }
.device-auth[data-phase="verified"] .device-auth-face, .device-auth[data-phase="verified"] .device-auth-scan { display: none; }
.device-auth[data-phase="verified"] .device-auth-check { display: block; }
.device-auth[data-phase="verified"] .device-auth-sensor { color: #118ca8; }
@keyframes deviceFaceScan { from { transform: translateY(0); opacity: .6; } to { transform: translateY(74px); opacity: 1; } }
@media (max-width: 900px) {
  dialog.device-auth { width: min(420px, calc(100% - 24px)); padding: 32px 22px 24px; max-height: calc(var(--elahi-viewport-height) - 32px); }
  .device-auth h2 { font-size: 28px; }
  .device-auth-device { margin-block: 22px; }
}
@media (max-height: 550px) {
  .device-auth-device { height: 134px; width: 116px; margin-block: 14px; padding: 12px; }
  .device-auth-sensor { width: 80px; height: 80px; }
  .device-auth[data-device="laptop"] .device-auth-device { height: 124px; width: 204px; }
  .device-auth h2 { font-size: 24px; margin-block: 8px; }
  .device-auth-status { min-height: 30px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .device-auth-scan { animation: none; display: none; } }
