/* Demo payment sheet. Loaded always, shown only when payment.js is enabled. */

.pay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.pay-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 92dvh;
  overflow-y: auto;
  padding: var(--s4);
  padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: var(--r2) var(--r2) 0 0;
  background: var(--bg);
  box-shadow: var(--shadow);
}

@media (min-width: 30rem) {
  .pay { align-items: center; }
  .pay-card { border-radius: var(--r2); margin: var(--s4); }
}

/* Stated first, before the price — nobody should reach the button without
   having seen it. */
.pay-demo {
  margin-bottom: var(--s4);
  padding: var(--s2) var(--s3);
  border: 1px dashed var(--line);
  border-radius: var(--r1);
  background: var(--off-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.pay-step h2 { font-size: 1.25rem; }

.pay-price {
  margin-top: var(--s2);
  color: var(--dim);
  font-size: 0.9375rem;
}

.pay-price-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.pay-sub {
  margin-top: var(--s4);
  font-size: 0.9375rem;
  color: var(--dim);
}

.pay-list {
  margin: var(--s2) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s2);
}

.pay-list li {
  position: relative;
  padding-left: var(--s5);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--dim);
}

.pay-list li::before {
  content: '';
  position: absolute;
  left: var(--s2);
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: var(--r3);
  background: var(--moss);
}

.pay-free {
  margin-top: var(--s4);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--surface);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--dim);
}

.pay-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s5);
}

.pay-wait {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
  font-size: 0.9375rem;
  color: var(--dim);
}

.pay-spin {
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--moss);
  border-radius: var(--r3);
  animation: spin 700ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .pay-spin { animation: none; opacity: 0.7; }
}

body.pay-open { overflow: hidden; }
