/* Payment page for #/unlock/:type. Uses the site's gold and coral tokens. */

#unlock-pay {
  display: none;
  background: var(--bg);
  min-height: 100vh;
}

html.is-unlock #unlock-pay {
  display: block;
}

html.is-unlock #root {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* The result form stays mounted for the webhook, but the result view itself
   should keep showing the coral unlock button if someone goes back. */
html:not(.is-unlock) #root form.unlock-form {
  display: none !important;
}

#unlock-main:focus {
  outline: none;
}

.unlock-back {
  text-align: left;
  margin: 0;
}

.unlock-back .btn-text {
  min-height: 40px;
  padding-left: 0;
}

#unlock-score-body .note {
  text-align: center;
}

.pay-wrap {
  text-align: left;
  margin-top: 8px;
  padding-bottom: 8px;
}

.pay-kicker {
  margin-bottom: 0;
}

.pay-price {
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 4px 0 0;
}

.pay-price span {
  font-family: var(--sans);
  font-size: 0.34em;
  font-weight: 650;
  letter-spacing: 0.14em;
  margin-right: 0.35em;
}

.pay-wrap h2,
.pay-wrap .pay-lead {
  margin: 10px 0 0;
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  line-height: 1.35;
}

.pay-note {
  color: var(--ink);
  margin: 10px 0 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.pay-methods {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.pay-card {
  background: #fff;
  border: 1px solid var(--peach);
  border-radius: 12px;
  padding: 16px 16px 18px;
  text-align: center;
}

.pay-card h3 {
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.55rem;
  margin: 0 0 12px;
}

.fps-logo {
  width: min(210px, 78%);
  height: auto;
  margin: 0 auto 12px;
  display: block;
}

.fps-id {
  color: var(--ink);
  font-weight: 650;
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.fps-number {
  color: var(--gold);
  font-family: Montserrat, "Noto Sans TC", sans-serif;
  font-size: 1.45em;
  font-weight: 700;
  letter-spacing: 0.04em;
  user-select: all;
  -webkit-user-select: all;
}

.fps-help,
.payme-how {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.fps-help,
.payme-how {
  color: var(--ink);
  font-weight: 650;
}

.payme-how {
  margin-top: 0;
}

.fps-help span,
.payme-how span {
  display: block;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.payme-frame {
  background: #fff;
  margin: 12px auto 0;
  max-width: 100%;
}

.payme-qr {
  width: min(100%, 440px);
  height: auto;
  aspect-ratio: 1224 / 1267;
  display: block;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
}

.pay-card .btn {
  width: 100%;
  margin-top: 12px;
}

.copy-status {
  min-height: 1.3em;
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 650;
  margin: 8px 0 0;
}

.pay-notify {
  background: var(--blush);
  border: 1px solid var(--peach);
  border-radius: 12px;
  margin-top: 16px;
  padding: 16px 16px 18px;
}

.pay-notify h2 {
  font-size: 1.55rem;
  margin: 0;
}

.pay-notify .field-label {
  color: var(--gold);
  font-weight: 650;
  margin-top: 14px;
  margin-bottom: 8px;
}

.pay-notify .field {
  background: #fff;
}

.pay-notify .unlock-hint {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.pay-notify .form-error {
  margin: 10px 0 0;
}

.pay-notify .btn-upsell {
  margin-top: 16px;
}

.pay-done .unlock-success {
  color: var(--gold);
  font-weight: 650;
  margin: 12px 0 0;
  line-height: 1.6;
}

.pay-done .pay-note {
  margin-top: 8px;
}

.pay-done .btn {
  width: 100%;
  margin-top: 12px;
}

@media (min-width: 720px) {
  .pay-methods {
    grid-template-columns: minmax(240px, 0.86fr) minmax(280px, 1.14fr);
    align-items: stretch;
    gap: 16px;
  }

  .pay-card {
    padding: 20px 18px 22px;
  }
}
