/* Web checkout (/pay/, /pay/return/). Builds on site.css and contributor.css. */

.pay-steps { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: step; }
.pay-steps > li { margin: 0 0 1.75rem; counter-increment: step; }
.pay-steps > li > h2 { margin: 0 0 0.75rem; font-size: 1.1rem; display: flex; align-items: center; gap: 0.6rem; }
.pay-steps > li > h2::before {
  content: counter(step); display: inline-grid; place-items: center; flex: none;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--navy-700); border: 1px solid var(--stroke); color: var(--accent); font-size: 0.9rem;
}

.choices { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice .box {
  display: block; height: 100%; padding: 1rem 1.1rem; border-radius: 14px;
  background: var(--navy-800); border: 1px solid var(--stroke); transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover .box { border-color: #334155; }
.choice input:checked + .box { border-color: var(--accent); background: #062019; }
.choice input:focus-visible + .box { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.choice input:disabled + .box { opacity: 0.45; cursor: not-allowed; }
.choice .title { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 700; }
.choice .price { color: var(--accent); white-space: nowrap; }
.choice .sub { display: block; color: var(--text-dim); font-size: 0.88rem; margin-top: 0.2rem; }
.choice ul { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; }
.choice li { margin: 0.2rem 0; }

.account { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.account .who { font-weight: 600; overflow-wrap: anywhere; }
.account .btn, .account .ghost { margin: 0; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.account .ghost { border: 1px solid var(--accent-cyan); font-weight: 600; }
.email-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; width: 100%; }
.email-row input {
  flex: 1 1 14rem; min-width: 0; padding: 0.65rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--stroke); background: var(--navy-900); color: var(--text); font: inherit;
}
.email-row input:focus { outline: 2px solid var(--accent-cyan); outline-offset: 1px; }

.summary { border-color: #0e7490; background: #04161c; }
.summary .total { font-size: 1.25rem; font-weight: 700; margin: 0.25rem 0 0.75rem; }
.summary ul { margin: 0.5rem 0 1rem; }
.pay-btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; width: 100%; min-height: 48px; font-size: 1.05rem; }
.testmode { display: inline-block; background: #b45309; color: #fff; border-radius: 6px; padding: 0 0.45rem; font-size: 0.8rem; font-weight: 700; vertical-align: middle; }

.result { text-align: center; padding: 1rem 0; }
.result .icon { font-size: 2.6rem; line-height: 1; margin-bottom: 0.5rem; }
.result dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; text-align: left; max-width: 26rem; margin: 1.25rem auto; }
.result dt { color: var(--text-dim); }
.result dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

@media (max-width: 30rem) {
  .choices { grid-template-columns: 1fr; }
  .summary .pay-btn { position: sticky; bottom: 0.75rem; z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); }
  .account .btn, .account .ghost { width: 100%; text-align: center; }
}
