/* GnuBoard popup layer used by the active Boilerplate layout. */
#hd_pop {
  z-index: 2147483000;
  position: relative;
  height: 0;
}

#hd_pop > h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hd_pops {
  position: fixed !important;
  top: 24px !important;
  left: 50% !important;
  z-index: 2147483000;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  border: 0 !important;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .28);
  transform: translateX(-50%);
}

.hd_pops_con {
  width: min(460px, calc(100vw - 32px)) !important;
  height: auto !important;
  max-height: calc(100vh - 112px);
  max-height: calc(100dvh - 112px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hd_pops_con img,
.hd_pops_con table {
  max-width: 100%;
}

.hd_pops_footer {
  display: flex;
  min-height: 48px;
  padding: 0 !important;
  background: #111827 !important;
  color: #fff;
}

.hd_pops_footer button {
  position: static !important;
  flex: 1;
  min-height: 48px;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 0;
  background: #111827 !important;
  color: #fff !important;
  font-size: 14px;
}

.hd_pops_footer .hd_pops_close {
  flex: 0 0 72px;
  background: #374151 !important;
}

@media (max-width: 640px), (max-height: 560px) {
  .hd_pops {
    top: max(8px, env(safe-area-inset-top)) !important;
    max-width: calc(100vw - 16px);
  }

  .hd_pops_con {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
  }

  .hd_pops_footer button {
    padding: 9px 8px !important;
    font-size: 13px;
  }

  .hd_pops_footer .hd_pops_close {
    flex-basis: 64px;
  }
}
