/* The only drawer geometry/visibility stylesheet. Native dialog owns the backdrop. */
:root{--lf-drawer-inset:24px;--lf-drawer-width:780px}
html.lf-drawer-open{overflow:hidden}
dialog.lf-drawer{position:fixed;inset:var(--lf-drawer-inset) var(--lf-drawer-inset) var(--lf-drawer-inset) auto;margin:0;padding:0;width:min(var(--lf-drawer-width),calc(100vw - var(--lf-drawer-inset) - var(--lf-drawer-inset)));max-width:none;height:calc(100dvh - var(--lf-drawer-inset) - var(--lf-drawer-inset));max-height:none;border:1px solid #e7e7e7;border-radius:16px;background:#fff;color:#242424;box-sizing:border-box;overflow:hidden;font:inherit}
dialog.lf-drawer:not([open]){display:none}
dialog.lf-drawer[open]{display:block}
dialog.lf-drawer::backdrop{background:rgba(34,38,43,.38);backdrop-filter:blur(3px)}
[dir=rtl] dialog.lf-drawer{inset:var(--lf-drawer-inset) auto var(--lf-drawer-inset) var(--lf-drawer-inset)}
.lf-drawer>[data-lf-drawer-signal]:not([hidden]){display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;background:#fff}
.lf-drawer>[data-lf-drawer-signal][hidden]{display:none}
[data-lf-drawer-signal]>form{display:contents}
.lf-drawer [data-lf-drawer-head]{position:relative;flex:0 0 auto;padding:28px;margin:0;border-bottom:1px solid #e7e7e7;background:#fff}
.lf-drawer [data-lf-drawer-head] :is(h2,h3,strong){font-size:28px;line-height:1.25;font-weight:600;margin:8px 40px 8px 0}
.lf-drawer [data-lf-drawer-head]>button{position:absolute;top:12px;inset-inline-end:12px;min-width:40px}
.lf-drawer [data-lf-drawer-body]{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;box-sizing:border-box;padding:24px 28px;margin:0;background:#fff}
.lf-drawer [data-lf-drawer-footer]{flex:0 0 auto;display:flex;gap:12px;justify-content:flex-end;align-items:center;flex-wrap:wrap;box-sizing:border-box;padding:16px 28px;margin:0;border-top:1px solid #e7e7e7;background:#fff}
.lf-drawer label{min-width:0;display:grid;gap:6px}
.lf-drawer :is(input:not([type=checkbox]):not([type=radio]),select,textarea){box-sizing:border-box;width:100%;max-width:100%;min-height:40px;border:1px solid #e0e0e0;border-radius:9px;background:#fff}
.lf-drawer button{min-height:40px;border-radius:9px}
.lf-drawer :focus-visible{outline:2px solid #242424;outline-offset:2px}
[data-lf-drawer-host]:not(details):not([hidden]){display:contents}
[data-lf-drawer-retired-backdrop]{display:none}
@media(max-width:640px){:root{--lf-drawer-inset:10px}.lf-drawer{border-radius:12px}.lf-drawer [data-lf-drawer-head],.lf-drawer [data-lf-drawer-body]{padding:16px}.lf-drawer [data-lf-drawer-footer]{padding:12px 16px}}

/* Central directional motion, including close while dialog remains in the top layer. */
.lf-drawer{--lf-slide:calc(100% + 24px)}
[dir=rtl] .lf-drawer{--lf-slide:calc(-100% - 24px)}
dialog.lf-drawer[open]{animation:lf-drawer-enter 220ms ease-out both}
dialog.lf-drawer[open].lf-drawer-closing{animation:lf-drawer-exit 180ms ease-in both}
dialog.lf-drawer[open]::backdrop{animation:lf-drawer-backdrop-in 220ms ease-out both}
dialog.lf-drawer.lf-drawer-closing::backdrop{animation:lf-drawer-backdrop-out 180ms ease-in both}
@keyframes lf-drawer-enter{from{transform:translateX(var(--lf-slide));opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes lf-drawer-exit{to{transform:translateX(var(--lf-slide));opacity:0}}
@keyframes lf-drawer-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes lf-drawer-backdrop-out{to{opacity:0}}
@media(prefers-reduced-motion:reduce){dialog.lf-drawer[open],dialog.lf-drawer[open]::backdrop{animation:none}}
