.payme-test-open {
  overflow: hidden;
}

.payme-test-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.46);
}

.payme-test-window {
  width: min(100%, 760px);
  max-height: min(92vh, 780px);
  overflow: auto;
  box-sizing: border-box;
  border-radius: 8px;
  background: #ffffff;
  color: #17212B;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.payme-test-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.payme-test-header h2 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.15;
}

.payme-test-badge {
  display: inline-flex;
  width: max-content;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.payme-test-icon-btn,
.payme-test-actions button {
  width: auto;
  min-height: 40px;
  margin: 0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
}

.payme-test-icon-btn {
  background: #eef2f7;
  color: #17212B;
}

.payme-test-warning {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.payme-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.payme-test-grid > div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid rgba(20, 40, 60, 0.08);
}

.payme-test-grid span,
.payme-test-label {
  display: block;
  color: #607080;
  font-size: 12px;
  font-weight: 800;
}

.payme-test-grid strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.payme-test-label {
  margin-top: 12px;
}

.payme-test-label select {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: 1px solid rgba(20, 40, 60, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #17212B;
  padding: 0 10px;
  font-weight: 800;
}

.payme-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.payme-test-actions button {
  flex: 1 1 170px;
  background: #00BAFF;
  color: #ffffff;
}

.payme-test-actions button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.payme-test-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.payme-test-message.is-success {
  background: #ecfdf5;
  color: #047857;
}

.payme-test-message.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.payme-test-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.payme-test-panels h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.payme-test-panels pre {
  min-height: 160px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .payme-test-backdrop {
    align-items: flex-end;
    padding: 8px;
  }

  .payme-test-window {
    max-height: 94vh;
  }

  .payme-test-grid,
  .payme-test-panels {
    grid-template-columns: 1fr;
  }
}
