/* Keep the Admin > Users management dialog above the fixed mobile nav. */
@media (max-width: 1023px) {
  div.fixed.inset-0.z-50[class~="bg-black/60"] {
    align-items: flex-start !important;
    overflow: hidden;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px)) !important;
    padding-right: 0.75rem !important;
    padding-bottom: calc(var(--mobile-nav-height, 6.5rem) + max(0.625rem, env(safe-area-inset-bottom, 0px)) + 0.75rem) !important;
    padding-left: 0.75rem !important;
  }

  div.fixed.inset-0.z-50[class~="bg-black/60"] > div[class~="max-w-2xl"][class~="overflow-y-auto"] {
    display: flex;
    width: 100%;
    max-height: none !important;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    overflow: hidden !important;
  }

  div.fixed.inset-0.z-50[class~="bg-black/60"] > div[class~="max-w-2xl"][class~="overflow-y-auto"] > div:first-child,
  div.fixed.inset-0.z-50[class~="bg-black/60"] > div[class~="max-w-2xl"][class~="overflow-y-auto"] > div:nth-child(2) {
    flex: 0 0 auto;
  }

  div.fixed.inset-0.z-50[class~="bg-black/60"] > div[class~="max-w-2xl"][class~="overflow-y-auto"] > div:last-child {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 559px) {
  div.fixed.inset-0.z-50[class~="bg-black/60"] {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}
