/* Proxy page: drop the unused legacy stat, show the existing editor as a dialog. */

html.tg-proxy-page .grid.grid-cols-2.gap-3.lg\:grid-cols-4 > :nth-child(4) {
  display: none !important;
}

@media (min-width: 1024px) {
  html.tg-proxy-page .grid.grid-cols-2.gap-3.lg\:grid-cols-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.tg-proxy-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgb(17 24 39 / 0.45);
  backdrop-filter: blur(3px);
}

html.dark .tg-proxy-editor-backdrop {
  background: rgb(0 0 0 / 0.65);
}

html.tg-proxy-modal-open,
html.tg-proxy-modal-open body,
html.tg-proxy-modal-open main {
  overflow: hidden !important;
}

html.tg-proxy-modal-open [data-testid="proxy-editor"] {
  position: fixed !important;
  z-index: 81;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(32rem, calc(100vw - 1.5rem));
  max-height: min(90vh, calc(100dvh - 1.5rem));
  margin: 0 !important;
  overflow: auto;
  transform: translate(-50%, -50%);
  overscroll-behavior: contain;
}
