/* BG-CURRENCY-R1.369: fade the backdrop with the shared six-row sheet motion. */
.bg-currency-dialog{--bg-currency-visible-count:6;--bg-currency-row-min-size:3.8125rem;--bg-currency-row-size:var(--bg-currency-row-min-size);--bg-currency-safe-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box;position:fixed;inset:auto auto 0 50%;margin:0;width:min(100%,520px);max-width:100%;max-height:var(--bg-currency-viewport-space,calc(100vh - 12px));max-height:min(calc(100dvh - 12px),var(--bg-currency-viewport-space,calc(100dvh - 12px)));padding:0 0 var(--bg-currency-safe-bottom);border:0;border-radius:1.125rem 1.125rem 0 0;background:#fff;color:#425c84;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;font-size:.875rem;font-weight:500;box-shadow:0 -.5rem 1.875rem rgba(30,52,84,.12);overflow:hidden;transform:translate(-50%,100%);transition:transform .3s ease;-webkit-tap-highlight-color:transparent}
.bg-currency-dialog:not([open]){display:none}
.bg-currency-dialog[open]{display:flex;flex-direction:column}
.bg-currency-dialog.is-open{transform:translate(-50%,0)}
.bg-currency-dialog::backdrop{background:rgba(27,43,66,.32);opacity:0;transition:opacity .3s ease}
.bg-currency-dialog.is-open::backdrop{opacity:1}
.bg-currency-header{display:flex;align-items:center;justify-content:space-between;flex:none;gap:.75rem;padding:.875rem 1rem .75rem;border-bottom:1px solid #e7eef7}
.bg-currency-header h2{margin:0;color:#244568;font-size:1.0625rem;font-weight:600;line-height:1.5}
.bg-currency-close{display:grid;place-items:center;flex:none;width:1.875rem;height:1.875rem;padding:0;border:0;border-radius:50%;background:transparent;color:#7187a8;font:500 1.625rem/1 Arial,sans-serif;cursor:pointer}
.bg-currency-list{flex:0 1 auto;height:calc(var(--bg-currency-visible-count)*var(--bg-currency-row-size));min-height:0;overflow-y:auto;overflow-anchor:none;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.bg-currency-list::-webkit-scrollbar{display:none}
.bg-currency-option{box-sizing:border-box;display:grid;grid-template-columns:1.875rem minmax(0,1fr) 1.25rem;align-items:center;gap:.75rem;width:100%;height:var(--bg-currency-row-size);min-height:var(--bg-currency-row-min-size);margin:0;padding:.625rem 1rem;border:0;border-bottom:1px solid #edf2f8;outline:none;background:#fff;color:inherit;font:inherit;text-align:start;cursor:pointer;direction:ltr;-webkit-tap-highlight-color:transparent}
.bg-currency-option.is-selected{background:#eef5ff;color:#2584f4}
.bg-currency-flag{display:block;width:1.875rem;height:1.875rem;flex:none}
.bg-currency-copy{display:flex;flex-direction:column;min-width:0;gap:.125rem;direction:inherit}
.bg-currency-name{min-width:0;font-size:.875rem;font-weight:500;line-height:1.4;overflow-wrap:anywhere;unicode-bidi:plaintext}
.bg-currency-amount{min-width:0;color:#7187a8;font-size:.8125rem;font-weight:500;line-height:1.4;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;text-align:start}
.bg-currency-check{color:#2584f4;font:600 1.125rem/1 Arial,sans-serif;text-align:center}
.bg-currency-close:focus-visible,.bg-currency-retry:focus-visible,.bg-currency-dialog.is-keyboard .bg-currency-option:focus-visible{outline:2px solid #397df8;outline-offset:-2px}
.bg-currency-notice{display:flex;align-items:center;justify-content:center;flex:none;gap:.75rem;max-height:6.25rem;overflow-y:auto;scrollbar-width:none;background:#fff}
.bg-currency-notice:empty{display:none}
.bg-currency-status{margin:.625rem 0;color:#8394ad;font-size:.75rem;font-weight:500;line-height:1.5;text-align:center}
.bg-currency-retry{margin:.5rem 0;padding:.375rem .875rem;border:1px solid #dae4f2;border-radius:.5rem;background:#fff;color:#397df8;font:inherit;font-size:.8125rem;font-weight:500;line-height:1.4;cursor:pointer}
.bg-currency-fallback{position:fixed;inset:0;z-index:1250;display:flex;align-items:flex-end;justify-content:center;background:rgba(27,43,66,0);overscroll-behavior:contain;transition:background-color .3s ease}
.bg-currency-fallback.is-open{background-color:rgba(27,43,66,.32)}
.bg-currency-fallback .bg-currency-dialog{position:relative;inset:auto;transform:translateY(100%)}
.bg-currency-fallback .bg-currency-dialog.is-open{transform:translateY(0)}
html[dir="rtl"] .bg-currency-copy{direction:rtl}
@media(prefers-reduced-motion:reduce){.bg-currency-dialog,.bg-currency-dialog::backdrop,.bg-currency-fallback{transition-duration:.01ms}}
