/* Native dialog provides focus trapping, Escape and an inert background. */
body.modal-open { overflow: hidden; }
dialog.password-dialog { position: fixed; inset: 0; height: fit-content; }
dialog.password-dialog:not([open]) { display: none; }
dialog.password-dialog { box-sizing: border-box; width: min(460px, calc(100% - 40px)); max-height: calc(100dvh - 48px); overflow-y: auto; margin: auto; padding: 36px; border: 3px solid #111; color: #111; background: #fff; box-shadow: 8px 8px 0 #c5c0e7; font-family: var(--layout-ui, 'Lato', Arial, sans-serif); }
.password-dialog::backdrop { background: rgb(17 17 17 / 70%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.password-dialog-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 2px solid #111; background: #fff; cursor: pointer; }
.password-dialog-close img { width: 20px; height: 20px; }
.password-dialog-heading { display: flex; align-items: center; gap: 12px; margin: 6px 32px 20px 0; }
.password-dialog-lock { width: 24px; height: 24px; }
.password-dialog-heading h2 { margin: 0; color: #111; font: 900 26px/1.15 var(--layout-ui); letter-spacing: -.02em; text-transform: uppercase; }
.password-dialog > p { margin: 0 0 24px; color: #696969; font: 400 15px/1.6 var(--layout-ui); }
.password-dialog-form { display: grid; gap: 0; }
.password-dialog-form label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.password-dialog-form input[type="password"] { width: 100%; box-sizing: border-box; min-width: 0; height: 48px; padding: 0 14px; border: 2px solid #c5c0e7; border-radius: 0; background: #fff; color: #111; font: 400 16px/1 var(--layout-ui); }
.password-dialog-error { min-height: 20px; margin: 6px 0; color: #a02626; font: 700 12px/1.5 var(--layout-ui); }
.password-dialog-submit { width: 100%; height: 46px; border: 2px solid #111; background: #111; color: #fff; font: 700 13px/1 var(--layout-ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.password-dialog-submit:hover, .password-dialog-close:hover { background: #c5c0e7; color: #111; }
.password-dialog :focus-visible { outline: 2px solid #7351bd; outline-offset: 3px; }
.password-dialog-submit:disabled { opacity: .55; cursor: wait; }
@media (max-width: 520px) {
  dialog.password-dialog { padding: 28px 24px; max-height: calc(100dvh - 40px); box-shadow: 6px 6px 0 #c5c0e7; }
  .password-dialog-close { top: 12px; right: 12px; }
  .password-dialog-heading { gap: 10px; margin-top: 18px; }
  .password-dialog-heading h2 { font-size: 23px; }
  .password-dialog > p br { display: none; }
}
