.gx-dialog-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.gx-dialog-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgb(15 23 42 / 0.48);
  backdrop-filter: blur(4px);
  cursor: default;
}

.gx-dialog-panel {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  width: min(400px, 100%);
  padding: 22px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.25);
}

.gx-dialog-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff1f2;
  color: #e11d48;
  font-size: 20px;
  font-weight: 900;
}

.gx-dialog-copy h2,
.gx-dialog-copy p {
  margin: 0;
}

.gx-dialog-copy h2 {
  color: #0f172a;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.gx-dialog-copy p {
  margin-top: 7px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.gx-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.gx-dialog-actions button {
  min-width: 78px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.gx-dialog-actions #gx-dialog-confirm {
  border-color: #1769e8;
  background: #1769e8;
  color: #fff;
}

.gx-dialog-actions #gx-dialog-confirm.is-danger {
  border-color: #e11d48;
  background: #e11d48;
}

.gx-toast {
  position: fixed;
  top: 78px;
  right: 20px;
  z-index: 1350;
  width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.16);
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.gx-toast[data-tone="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

html[data-theme="dark"] .gx-dialog-panel {
  border-color: rgb(148 163 184 / 0.24);
  background: #111827;
}

html[data-theme="dark"] .gx-dialog-copy h2 {
  color: #f8fafc;
}

html[data-theme="dark"] .gx-dialog-copy p {
  color: #a8b6cc;
}

html[data-theme="dark"] .gx-dialog-actions button {
  border-color: rgb(148 163 184 / 0.28);
  background: #1f2937;
  color: #e5edf8;
}

/* Shared login dialog overrides for every generated static page. */
#gx-wechat-qr {
  min-height: 180px !important;
}

.gx-wechat-frame {
  width: 260px !important;
}

.gx-wechat-frame-clip {
  width: 260px !important;
  height: 180px !important;
}

.gx-wechat-frame-iframe {
  left: -30px !important;
  top: -8px !important;
  width: 320px !important;
  height: 200px !important;
  transform: none !important;
}

/* Older generated pages use utility classes instead of gx-wechat-frame. */
#gx-wechat-qr [class*="h-[282px]"][class*="w-[300px]"] {
  width: 260px !important;
  height: 180px !important;
}

#gx-wechat-qr [class*="h-[282px]"][class*="w-[300px]"] iframe {
  left: -30px !important;
  top: -8px !important;
  width: 320px !important;
  height: 200px !important;
}

#gx-wechat-qr > div > div > div {
  width: 260px !important;
  height: 180px !important;
}

#gx-wechat-qr > div > div > div > iframe {
  left: -30px !important;
  top: -8px !important;
  width: 320px !important;
  height: 200px !important;
}

#gx-login-wechat {
  gap: 8px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

#gx-login-message {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  line-height: 18px !important;
}

@media (max-width: 640px) {
  #gx-login-wechat .gx-login-qr {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  #gx-login-wechat .gx-wechat-frame-iframe {
    left: -30px !important;
  }
}
