/* Dialog chrome stays visible; only the content scrolls. No payment/gating rules. */
#nx-store-dialog {
  box-sizing:border-box; width:min(680px,calc(100% - 32px));
  max-height:calc(var(--nx-dialog-height,100dvh) - 32px);
  height:auto; padding:0; overflow:hidden;
}
#nx-store-dialog[open] { display:flex; flex-direction:column; }
#nx-store-dialog .nx-store-dialog__head { position:relative; flex:none; padding:12px 20px; min-width:0; }
#nx-store-dialog .nx-store-dialog__head h2 { font-size:1.25rem; overflow-wrap:anywhere; }
#nx-store-dialog .nx-store-dialog__close { flex:none; width:44px; height:44px; }
#nx-store-dialog .nx-store-dialog__body {
  min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain;
  scroll-padding-block:16px; -webkit-overflow-scrolling:touch;
}
#nx-store-dialog .nx-store-steps { margin:0; padding:12px 20px 8px; gap:12px; }
#nx-store-dialog .nx-store-steps li { min-width:0; font-size:.8125rem; overflow-wrap:anywhere; }
#nx-store-dialog #nx-bios-guide-check {
  margin:0; width:100%; min-width:0; padding:8px 20px 16px;
  border:0; border-radius:0; box-shadow:none; gap:12px;
}
#nx-store-dialog #nx-bios-guide-check .nx-bios-checker__head { gap:4px; margin:0; }
#nx-store-dialog .nx-store-change { min-height:44px; padding-block:6px; font-size:.8125rem; }
#nx-store-dialog .nx-bios-storefront__selection {
  margin:0; padding:10px 0; gap:4px 12px; min-height:0;
  display:grid; grid-template-columns:1fr auto; align-items:baseline;
}
#nx-store-dialog .nx-bios-storefront__selection > strong { font-size:1.25rem; min-width:0; }
#nx-store-dialog .nx-bios-storefront__selection > .nx-bios-local-price__amount {
  grid-column:2; font-size:.8125rem; font-weight:400; text-align:end;
}
#nx-store-dialog .nx-bios-checker__contacts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding-top:12px; margin:0; }
#nx-store-dialog .nx-bios-checker__contacts > * { min-width:0; }
#nx-store-dialog .nx-bios-field { min-width:0; min-height:48px; padding:10px 12px; font-size:1rem; }
#nx-store-dialog .nx-bios-checker__hint,#nx-store-dialog .nx-bios-checker__privacy { margin:0; font-size:.8125rem; line-height:1.5; }
#nx-store-dialog .nx-bios-code-help { margin:0; padding-block:0; }
#nx-store-dialog .nx-bios-code-help summary { min-height:44px; display:flex; align-items:center; }
#nx-store-dialog .nx-bios-checker__actions { margin:10px 0 6px; }
#nx-store-dialog .nx-bios-checker__submit { min-height:48px; white-space:normal; }
#nx-store-dialog .nx-store-confirmation { padding:12px 20px 20px; min-width:0; }
#nx-store-dialog :is(input,button,a,summary) { scroll-margin-block:12px; }
#nx-store-dialog :is(p,strong,a,button) { overflow-wrap:anywhere; }
.nx-bios-modal.paypal-modal.nx-checkout-compact[data-nx-short-viewport] .nx-bios-modal__panel { overflow-y:auto; overscroll-behavior:contain; }
.nx-bios-modal.paypal-modal.nx-checkout-compact[data-nx-short-viewport] .nx-bios-modal__head { position:sticky; top:0; z-index:2; padding:8px 16px; background:var(--nx-surface); }
.nx-bios-modal.paypal-modal.nx-checkout-compact[data-nx-short-viewport] .nx-bios-modal__body { flex:none; overflow:visible; }
.nx-bios-modal.paypal-modal.nx-checkout-compact[data-nx-short-viewport] .nx-bios-product-label,
.nx-bios-modal.paypal-modal.nx-checkout-compact[data-nx-short-viewport] .nx-bios-progress { display:none; }
dialog.nx-process-preview { box-sizing:border-box; max-height:calc(var(--nx-dialog-height,100dvh) - 32px); overflow:hidden; }
dialog.nx-process-preview[open] { display:flex; flex-direction:column; }
dialog.nx-process-preview .nx-process-preview__head { position:relative; flex:none; min-width:0; }
dialog.nx-process-preview .nx-process-preview__head h2 { overflow-wrap:anywhere; }
dialog.nx-process-preview .nx-process-preview__close { flex:none; }
dialog.nx-process-preview .nx-process-preview__body { min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; }
dialog.nx-process-preview .nx-process-preview__body > * { min-width:0; max-width:100%; }
dialog[data-nx-dialog-viewport] { top:var(--nx-dialog-top,0px); bottom:auto; margin-block:16px 0; }
@media (max-width:600px) {
  #nx-store-dialog { width:100%; max-width:100%; height:var(--nx-dialog-height,100dvh); max-height:var(--nx-dialog-height,100dvh); margin:0; border:0; border-radius:0; }
  #nx-store-dialog .nx-store-dialog__head { padding:8px 16px; }
  #nx-store-dialog .nx-store-steps { padding:10px 16px 6px; gap:8px; }
  #nx-store-dialog #nx-bios-guide-check { padding:6px 16px max(16px,env(safe-area-inset-bottom)); }
  #nx-store-dialog .nx-bios-checker__contacts { grid-template-columns:minmax(0,1fr); gap:10px; }
  #nx-store-dialog .nx-store-confirmation { padding:12px 16px max(16px,env(safe-area-inset-bottom)); }
  #nx-store-dialog[data-nx-dialog-viewport] { margin:0; }
}
/* At extreme zoom/keyboard heights, the entire checkout can scroll. Its action
   rail must not consume all space and leave the form with zero usable height. */
@media (max-height:420px) {
  .nx-bios-modal.paypal-modal.nx-checkout-compact .nx-bios-modal__panel { overflow-y:auto; overscroll-behavior:contain; }
  .nx-bios-modal.paypal-modal.nx-checkout-compact .nx-bios-modal__head { position:sticky; top:0; z-index:2; padding:8px 16px; background:var(--nx-surface); }
  .nx-bios-modal.paypal-modal.nx-checkout-compact .nx-bios-modal__body { flex:none; overflow:visible; }
  .nx-bios-modal.paypal-modal.nx-checkout-compact .nx-bios-checkout-action { flex:none; }
  dialog.nx-process-preview .nx-process-preview__head { padding:8px 16px; }
}
