/*
 * Одноколоночные страницы в стиле кассы: платёжная ссылка, квитанция,
 * конструктор кнопки и сообщения об ошибках. Поверх checkout.css — палитра и
 * кнопки общие.
 */

.page-card {
  width: min(560px, 100%);
  display: grid;
  gap: 22px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.page-card.wide { width: min(880px, 100%); }

.page-card h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-card .amount { margin: 0; font-size: clamp(34px, 7vw, 52px); }
.page-card .muted { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.page-card .step-index:empty { display: none; }

.link-form { display: grid; gap: 18px; }
.link-head { display: grid; gap: 8px; }
.link-description { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; white-space: pre-line; }

.input-shell {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.input-shell:focus-within { border-color: var(--accent); }
.input-shell input,
.input-shell select,
.input-shell textarea {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  font-weight: 600;
}
.input-shell select option { color: #111; }
.hint.left { text-align: left; }

/* ---------- Квитанция ---------- */

.receipt-head { display: grid; justify-items: center; gap: 10px; text-align: center; }
.receipt-table { display: grid; margin: 0; }
.receipt-table div {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.receipt-table div:last-child { border-bottom: 0; }
.receipt-table dt { color: var(--muted); }
.receipt-table dd { margin: 0; overflow-wrap: anywhere; }
.receipt-table code { font-size: 13px; }
.receipt-table .explorer-link { display: inline-block; margin-top: 6px; }

/* ---------- Конструктор кнопки ---------- */

.builder { display: grid; gap: 16px; }
.builder .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.snippet {
  width: 100%;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--panel-2);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}
.preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #f5f5f2;
}
.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: transparent;
  font-weight: 700;
}
.secondary-button:hover { border-color: var(--accent); }

@media (max-width: 620px) {
  .builder .row2 { grid-template-columns: minmax(0, 1fr); }
  .receipt-table div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
