.pxc {
  --pxc-accent: #0f9d74;
  --pxc-text: #1f2328;
  --pxc-muted: #5f6672;
  --pxc-border: #d6d9de;
  --pxc-bg: #ffffff;
  box-sizing: border-box;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px;
  background: var(--pxc-bg);
  color: var(--pxc-text);
  border: 1px solid var(--pxc-border);
  border-radius: 16px;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.pxc *, .pxc *::before, .pxc *::after { box-sizing: inherit; }
.pxc [hidden] { display: none !important; }
.pxc-badge {
  display: inline-block; margin: 0 0 16px; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--pxc-accent) 12%, transparent);
  color: var(--pxc-accent); font-size: 13px; font-weight: 600;
}
.pxc-label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.pxc-label-gap { margin-top: 14px; }
.pxc-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--pxc-border);
  border-radius: 10px; font: inherit; color: inherit; background: #fff;
}
.pxc-input:focus { outline: 2px solid var(--pxc-accent); outline-offset: 1px; }
.pxc-error { margin: 8px 0 0; color: #c62828; font-size: 14px; }
.pxc-btn {
  display: block; width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 10px;
  background: var(--pxc-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.pxc-btn:hover { filter: brightness(0.95); }
.pxc-btn:disabled { opacity: 0.6; cursor: wait; }
.pxc-note, .pxc-hint, .pxc-timer, .pxc-wait { margin: 12px 0 0; color: var(--pxc-muted); font-size: 14px; }
.pxc-pix, .pxc-paid, .pxc-expired { text-align: center; }
.pxc-amount { margin: 0; font-size: 28px; font-weight: 700; }
.pxc-qr { width: 220px; max-width: 100%; margin: 16px auto 0; }
.pxc-qr svg { display: block; width: 100%; height: auto; }
.pxc-code {
  width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--pxc-border); border-radius: 10px;
  background: #f6f7f9; font: 12px/1.4 ui-monospace, Consolas, monospace; resize: none; word-break: break-all;
}
.pxc-wait { animation: pxc-pulse 1.6s ease-in-out infinite; }
.pxc-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--pxc-accent); }
@keyframes pxc-pulse { 50% { opacity: 0.45; } }

.pxc-timer strong { color: var(--pxc-text); font-variant-numeric: tabular-nums; }
.pxc-timer-low strong { color: #c62828; animation: pxc-pulse 1s ease-in-out infinite; }

/* ---------- Pagamento confirmado ---------- */
.pxc-paid { position: relative; padding: 8px 0 4px; overflow: hidden; }
.pxc-paid:not([hidden]) .pxc-title { animation: pxc-up 0.5s 0.9s ease-out both; }
.pxc-paid:not([hidden]) .pxc-hint { animation: pxc-up 0.5s 1.1s ease-out both; }
.pxc-check { display: block; width: 96px; height: 96px; margin: 8px auto 16px; border-radius: 50%; }
.pxc-check-circle {
  fill: none; stroke: var(--pxc-accent); stroke-width: 3;
  stroke-dasharray: 151; stroke-dashoffset: 151;
}
.pxc-check-mark {
  fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; stroke-dashoffset: 36;
}
.pxc-paid:not([hidden]) .pxc-check { animation: pxc-fill 0.35s 0.55s ease-out forwards, pxc-pop 0.35s 0.85s ease-in-out both; }
.pxc-paid:not([hidden]) .pxc-check-circle { animation: pxc-stroke 0.6s cubic-bezier(.65,0,.45,1) forwards; }
.pxc-paid:not([hidden]) .pxc-check-mark { animation: pxc-stroke 0.35s 0.8s cubic-bezier(.65,0,.45,1) forwards; }
@keyframes pxc-stroke { to { stroke-dashoffset: 0; } }
@keyframes pxc-fill { to { box-shadow: inset 0 0 0 48px var(--pxc-accent); } }
@keyframes pxc-pop { 50% { transform: scale(1.12); } }
@keyframes pxc-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pxc-confetti { position: absolute; inset: 0; pointer-events: none; }
.pxc-confetti i {
  position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
  background: var(--c, #0f9d74);
}
.pxc-paid:not([hidden]) .pxc-confetti i { animation: pxc-confetti 1.6s var(--d, 0s) ease-in forwards; }
@keyframes pxc-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x, 0), 260px) rotate(var(--r, 360deg)); }
}
.pxc-confetti i:nth-child(4n+1) { --c: #0f9d74; }
.pxc-confetti i:nth-child(4n+2) { --c: #f5b400; }
.pxc-confetti i:nth-child(4n+3) { --c: #e5484d; }
.pxc-confetti i:nth-child(4n)   { --c: #3b82f6; }
.pxc-confetti i:nth-child(1)  { left: 4%;  --d: .9s;  --x: -20px; --r: 300deg; }
.pxc-confetti i:nth-child(2)  { left: 8%;  --d: 1.0s; --x: 15px;  --r: -280deg; }
.pxc-confetti i:nth-child(3)  { left: 12%; --d: .95s; --x: -10px; --r: 420deg; }
.pxc-confetti i:nth-child(4)  { left: 16%; --d: 1.1s; --x: 25px;  --r: -360deg; }
.pxc-confetti i:nth-child(5)  { left: 20%; --d: .9s;  --x: -15px; --r: 250deg; }
.pxc-confetti i:nth-child(6)  { left: 24%; --d: 1.05s;--x: 10px;  --r: -400deg; }
.pxc-confetti i:nth-child(7)  { left: 28%; --d: 1.0s; --x: -25px; --r: 330deg; }
.pxc-confetti i:nth-child(8)  { left: 32%; --d: .92s; --x: 20px;  --r: -300deg; }
.pxc-confetti i:nth-child(9)  { left: 36%; --d: 1.12s;--x: -12px; --r: 380deg; }
.pxc-confetti i:nth-child(10) { left: 40%; --d: .97s; --x: 18px;  --r: -260deg; }
.pxc-confetti i:nth-child(11) { left: 44%; --d: 1.03s;--x: -22px; --r: 290deg; }
.pxc-confetti i:nth-child(12) { left: 48%; --d: .9s;  --x: 12px;  --r: -350deg; }
.pxc-confetti i:nth-child(13) { left: 52%; --d: 1.08s;--x: -18px; --r: 410deg; }
.pxc-confetti i:nth-child(14) { left: 56%; --d: .94s; --x: 22px;  --r: -320deg; }
.pxc-confetti i:nth-child(15) { left: 60%; --d: 1.0s; --x: -10px; --r: 270deg; }
.pxc-confetti i:nth-child(16) { left: 64%; --d: 1.1s; --x: 16px;  --r: -390deg; }
.pxc-confetti i:nth-child(17) { left: 68%; --d: .93s; --x: -24px; --r: 340deg; }
.pxc-confetti i:nth-child(18) { left: 72%; --d: 1.06s;--x: 14px;  --r: -270deg; }
.pxc-confetti i:nth-child(19) { left: 76%; --d: .98s; --x: -16px; --r: 400deg; }
.pxc-confetti i:nth-child(20) { left: 80%; --d: 1.12s;--x: 20px;  --r: -310deg; }
.pxc-confetti i:nth-child(21) { left: 84%; --d: .91s; --x: -12px; --r: 360deg; }
.pxc-confetti i:nth-child(22) { left: 88%; --d: 1.04s;--x: 24px;  --r: -340deg; }
.pxc-confetti i:nth-child(23) { left: 92%; --d: .96s; --x: -20px; --r: 280deg; }
.pxc-confetti i:nth-child(24) { left: 96%; --d: 1.09s;--x: 10px;  --r: -420deg; }
@media (prefers-reduced-motion: reduce) {
  .pxc-paid *, .pxc-paid:not([hidden]) * { animation-duration: 0.01s !important; animation-delay: 0s !important; }
  .pxc-confetti { display: none; }
}

/* ---------- Pop-up ---------- */
.pxc-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15, 18, 24, 0.72);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.pxc-overlay[hidden] { display: none !important; }
.pxc-modal {
  position: relative; width: 100%; margin: auto;
  max-height: none; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: left; animation: pxc-in 0.18s ease-out;
}
.pxc-close {
  position: absolute; top: 8px; right: 10px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: transparent; color: var(--pxc-muted);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.pxc-close:hover { background: #f0f2f5; color: var(--pxc-text); }
.pxc-product { margin: -8px 0 16px; font-size: 17px; font-weight: 700; }
html.pxc-lock, html.pxc-lock body { overflow: hidden; }
@keyframes pxc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
