:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.4;
  color: #17202a;
  background: #f4f7fb;
}

body {
  margin: 0;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  font-size: 28px;
  margin: 0 0 4px;
}

h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.subhead {
  margin: 0 0 20px;
  color: #52616f;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 20px;
  align-items: start;
}

section {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  border: 1px solid #bbc7d3;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 400;
  background: #ffffff;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  background: #0b6f85;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  background: #96a6b2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.section-heading {
  margin-top: 18px;
}

.status {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  color: #20303c;
}

.status div {
  overflow-wrap: anywhere;
}

#telpa-checkout {
  min-height: 280px;
  border: 1px dashed #aab8c5;
  border-radius: 8px;
  padding: 12px;
  background: #fafcff;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  max-height: 300px;
  overflow-y: auto;
  background: #111827;
  color: #d1fae5;
  border-radius: 8px;
  padding: 12px;
}

.status-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / 62%);
}

.status-modal[hidden] {
  display: none;
}

.status-modal__panel {
  width: min(440px, 100%);
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #c7d2df;
  box-shadow: 0 18px 50px rgb(15 23 42 / 28%);
  padding: 22px;
  text-align: center;
}

.status-modal__panel--success {
  border-color: #1f9d55;
  border-top: 4px solid #1f9d55;
}

.status-modal__panel--error {
  border-color: #c0392b;
  border-top: 4px solid #c0392b;
}

.status-modal__panel--warn {
  border-color: #b7791f;
  border-top: 4px solid #b7791f;
}

.status-modal__panel--success h2 {
  color: #1f7a43;
}

.status-modal__panel--error h2 {
  color: #a5281b;
}

.status-modal__panel--warn h2 {
  color: #8a5a12;
}

.status-modal__panel h2 {
  margin-top: 12px;
}

.status-modal__panel p {
  margin: 8px 0 0;
  color: #334155;
}

.status-modal__detail {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.status-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 4px solid #cbd5e1;
  border-top-color: #0b6f85;
  border-radius: 50%;
  animation: status-spin 0.8s linear infinite;
}

.status-modal__panel button {
  margin-top: 16px;
}

@keyframes status-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  main {
    padding: 16px;
  }

  .layout,
  .grid {
    grid-template-columns: 1fr;
  }
}
