/* The payment page, redesigned as a clean two-column checkout: payment method
   on the left, order summary on the right. Loaded after sketch.css, so it keeps
   the site's palette and type but trades the hand-drawn wobble for straight,
   quiet lines here - this is the page where trust matters most. */

.pay-main {
  padding-top: 92px;
  padding-bottom: 64px;
}

body .pay-page {
  --pay-ink: #18181b;
  --pay-muted: #71717a;
  --pay-line: rgba(24, 24, 27, 0.14);
  --pay-line-strong: rgba(24, 24, 27, 0.3);
  --pay-surface: #ffffff;
  --pay-accent: #c2410c;
  --pay-accent-deep: #9a3412;
  --pay-good: #4d6a2a;
  display: block;
  width: min(1040px, 100%);
  padding: 36px 40px 40px;
  border: 1px solid var(--pay-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 32px 70px -34px rgba(24, 24, 27, 0.42),
    0 2px 6px rgba(24, 24, 27, 0.06);
  color: var(--pay-ink);
}

/* ── Heading ─────────────────────────────────────────────────────────── */
body .pay-page .pay-head {
  margin-bottom: 18px;
}

body .pay-page .pay-step {
  margin: 0 0 6px;
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pay-accent);
}

body .pay-page .pay-head h1 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: none;
  color: var(--pay-ink);
}

/* ── Progress ────────────────────────────────────────────────────────── */
.pay-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0 0 22px;
  list-style: none;
  border-bottom: 1px solid var(--pay-line);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--pay-muted);
}

.pay-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pay-steps li + li::before {
  content: "";
  width: 36px;
  height: 1px;
  margin-right: 2px;
  background: var(--pay-line-strong);
}

.pay-steps-dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--pay-line-strong);
  border-radius: 50%;
  font-size: 11px;
}

.pay-steps .is-done {
  color: var(--pay-ink);
}

.pay-steps .is-done .pay-steps-dot {
  border-color: var(--pay-ink);
  background: var(--pay-ink);
  color: #ffffff;
}

.pay-steps .is-now {
  color: var(--pay-accent);
}

.pay-steps .is-now .pay-steps-dot {
  border-color: var(--pay-accent);
  background: var(--pay-accent);
  color: #fff;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.pay-sub {
  margin: 0 0 12px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pay-muted);
}

/* ── Payment methods ─────────────────────────────────────────────────── */
body .pay-page .pay-methods {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body .pay-page .pay-method {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 0;
  padding: 15px 18px;
  border: 1px solid var(--pay-line-strong);
  border-radius: 12px;
  background: var(--pay-surface);
  box-shadow: none;
  color: var(--pay-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body .pay-page .pay-method[hidden] {
  display: none;
}

body .pay-page .pay-method:hover {
  border-color: rgba(24, 24, 27, 0.5);
  background: #fff;
}

body .pay-page .pay-method.on {
  border-color: var(--pay-accent);
  background: #fff;
  color: var(--pay-ink);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

body .pay-page .pay-method:focus-visible {
  outline: 2px solid var(--pay-accent);
  outline-offset: 2px;
}

.pm-radio {
  width: 18px;
  height: 18px;
  border: 1px solid var(--pay-line-strong);
  border-radius: 50%;
  background: #fff;
}

.pay-method.on .pm-radio {
  border-color: var(--pay-accent);
  background: var(--pay-accent);
  box-shadow: inset 0 0 0 3.5px #fff;
}

.pm-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pm-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.pm-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(77, 106, 42, 0.12);
  color: var(--pay-good);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-sub {
  font-size: 13px;
  color: var(--pay-muted);
}

.pm-icon {
  width: 24px;
  height: 24px;
  color: var(--pay-muted);
}

.pay-method.on .pm-icon {
  color: var(--pay-accent);
}

/* ── The chosen method's panel ───────────────────────────────────────── */
.pay-panel {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--pay-line);
  border-radius: 14px;
  background: var(--pay-surface);
}

.pay-howto {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: howto;
  font-size: 14.5px;
  line-height: 1.45;
}

.pay-howto li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  counter-increment: howto;
}

.pay-howto li::before {
  content: counter(howto);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(234, 88, 12, 0.1);
  color: var(--pay-accent);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

/* The main action: one solid button, full width. */
body .pay-page .pay-go,
body .pay-page .pay-side .buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--pay-accent);
  box-shadow: 0 12px 22px -12px rgba(234, 88, 12, 0.75);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

body .pay-page .pay-go:hover,
body .pay-page .pay-side .buy:hover {
  background: var(--pay-accent-deep);
  box-shadow: 0 14px 26px -12px rgba(194, 65, 12, 0.85);
}

body .pay-page .pay-go:disabled,
body .pay-page .pay-side .buy:disabled {
  opacity: 0.6;
  cursor: progress;
}

body .pay-page .pay-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--pay-muted);
  text-align: center;
}

/* PayPal, the quiet way out for cards and buyers abroad: one line under the
   Pay button, never a method card of its own until it is chosen. */
body .pay-page .pay-fallback {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--pay-line);
  font-size: 13px;
  color: var(--pay-muted);
  text-align: center;
}

body .pay-page .pay-fallback[hidden] {
  display: none;
}

body .pay-page .pay-fallback-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--pay-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

body .pay-page .pay-fallback-link:hover {
  text-decoration-thickness: 2px;
}

/* QR Ph fills its panel now that the summary sits beside it. */
body .pay-page .pay-cols.pay-solo .pay-pp {
  display: block;
  max-width: none;
  margin: 0;
}

/* GCash / PayPal: the code on the left, the receipt on the right. */
body .pay-page .pay-cols {
  gap: 24px;
}

body .pay-page .pay-qr {
  border: 1px solid var(--pay-line);
  border-radius: 12px;
}

body .pay-page .pay-drop {
  border: 1px solid var(--pay-line-strong);
  border-radius: 12px;
  background: #fff;
}

body .pay-page .pay-drop:hover {
  border-color: var(--pay-accent);
}

body .pay-page .pay-field input {
  min-height: 44px;
  border: 1px solid var(--pay-line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

body .pay-page .pay-field input:focus {
  border-color: var(--pay-accent);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
  outline: none;
}

.pay-review-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--pay-muted);
  text-align: center;
}

/* ── Order summary ───────────────────────────────────────────────────── */
.pay-summary {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid var(--pay-line);
  border-radius: 16px;
  background: #fafaf9;
}

.sum-plan {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pay-line);
}

.sum-plan-name {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.sum-plan-term {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--pay-muted);
}

.sum-change,
.sum-link {
  color: var(--pay-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.sum-change:hover,
.sum-link:hover {
  text-decoration: underline;
}

.sum-features {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.4;
}

.sum-features[hidden] {
  display: none;
}

.sum-features li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
}

.sum-features li::before {
  content: "✓";
  color: var(--pay-good);
  font-weight: 700;
}

.sum-lines {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--pay-line);
}

.sum-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--pay-muted);
}

.sum-line.sum-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--pay-line);
  color: var(--pay-ink);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.sum-total strong {
  font-size: 22px;
  font-weight: 800;
}

.sum-fine {
  margin: 10px 0 16px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--pay-muted);
}

.sum-trust {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--pay-line);
  font-size: 13px;
  line-height: 1.4;
}

.sum-trust li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.sum-trust svg {
  width: 18px;
  height: 18px;
  color: var(--pay-accent);
}

/* ── Small screens: one column, summary on top ───────────────────────── */
@media (max-width: 860px) {
  body .pay-page {
    padding: 26px 20px 28px;
    border-radius: 16px;
  }

  body .pay-page .pay-head h1 {
    font-size: 24px;
  }

  .pay-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  /* On a phone the summary leads, kept to the plan and the total so the
     payment is still close to the top. */
  .pay-summary {
    position: static;
    order: -1;
    padding: 18px;
  }

  .pay-summary .sum-features,
  .pay-summary .sum-trust {
    display: none;
  }

  .pay-summary .sum-fine {
    margin-bottom: 0;
  }

  .pay-steps li + li::before {
    width: 16px;
  }
}

/* ── In-site QR Ph Gateway ────────────────────────────────────────────────── */
.pm-intro {
  display: grid;
  gap: 16px;
}

.pm-lead {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--pay-muted);
}

.pm-wallets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-wallets.is-compact {
  justify-content: center;
}

.pm-wallets span {
  padding: 4px 10px;
  border: 1px solid var(--pay-line);
  border-radius: 999px;
  background: #fafaf9;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pay-muted);
}

.pm-error {
  margin: 0;
  text-align: center;
}

.pm-qr-card {
  display: grid;
  gap: 16px;
}

.pm-qr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pay-line);
}

.pm-qr-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--pay-ink);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.pm-brand-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pay-ink);
}

.pm-brand-sub {
  font-size: 12px;
  color: var(--pay-muted);
}

.pm-qr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-qr-ref {
  padding: 4px 10px;
  border: 1px solid var(--pay-line);
  border-radius: 8px;
  background: #fafaf9;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--pay-ink);
  cursor: pointer;
}

.pm-qr-ref:hover {
  border-color: var(--pay-line-strong);
}

.pm-qr-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.pm-qr-status.is-waiting {
  background: #fff4ec;
  color: var(--pay-accent-deep);
}

.pm-qr-status.is-paid {
  background: rgba(77, 106, 42, 0.14);
  color: var(--pay-good);
}

.pm-qr-status.is-expired {
  background: #f4f4f5;
  color: var(--pay-muted);
}

.pm-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pm-pulse-dot 1.6s ease-in-out infinite;
}

.pm-qr-status.is-expired .pm-pulse,
.pm-qr-status.is-paid .pm-pulse {
  animation: none;
}

@keyframes pm-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.pm-qr-head {
  text-align: center;
}

.pm-qr-amount {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--pay-ink);
}

.pm-qr-sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--pay-muted);
}

.pm-qr-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 18px;
  border: 1px solid var(--pay-line);
  border-radius: 14px;
  background: #fafaf9;
}

.pm-qr-frame {
  padding: 12px;
  border: 1px solid var(--pay-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 14px -8px rgba(24, 24, 27, 0.14);
}

.pm-qr-frame.is-expired {
  opacity: 0.4;
  filter: grayscale(1);
}

.pm-qr-img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.pm-qr-timer {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--pay-muted);
}

.pm-qr-msg {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(234, 88, 12, 0.25);
  border-radius: 10px;
  background: #fff4ec;
  font-size: 13px;
  color: var(--pay-accent-deep);
  text-align: center;
}

.pm-qr-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pm-btn-primary,
.pm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.pm-btn-primary {
  border: 0;
  background: var(--pay-accent);
  color: #ffffff;
}

.pm-btn-primary:hover:not(:disabled) {
  background: var(--pay-accent-deep);
}

.pm-btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.pm-btn-ghost {
  border: 1px solid var(--pay-line-strong);
  background: #ffffff;
  color: var(--pay-ink);
}

.pm-btn-ghost:hover {
  border-color: var(--pay-ink);
  background: #fafaf9;
}

.pm-btn-full {
  grid-column: 1 / -1;
}

.pm-qr-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  font-size: 12.5px;
  color: var(--pay-muted);
}

.pm-qr-foot svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.pm-back-link {
  padding: 0 0 0 6px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--pay-accent);
  cursor: pointer;
}

.pm-back-link:hover {
  text-decoration: underline;
}

body .pay-page .pm-done-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--pay-accent);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

body .pay-page .pm-done-cta:hover {
  background: var(--pay-accent-deep);
}

@media (max-width: 520px) {
  .pm-qr-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .pm-qr-img {
    width: 196px;
    height: 196px;
  }
}
