/* TAPI Pay — checkout simulado. Tema neutro e independiente del sitio. */
.tp {
  --tp-ink: #14122b; --tp-muted: #6a6787; --tp-line: #e6e4f0; --tp-bg: #fff;
  --tp-accent: #4b3bd6; --tp-accent-2: #6d5ef0; --tp-ok: #12a150; --tp-err: #c62828;
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  font-family: Inter, system-ui, sans-serif; color: var(--tp-ink);
}
.tp[hidden] { display: none; }
.tp-lock, .tp-lock body { overflow: hidden; }
.tp-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 30, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.tp-sheet {
  position: relative; width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  background: var(--tp-bg); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(10, 8, 40, .5);
  transform: translateY(18px) scale(.98); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
.tp.is-open .tp-backdrop { opacity: 1; }
.tp.is-open .tp-sheet { transform: none; opacity: 1; }
.tp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.tp-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: .2px; color: var(--tp-accent); }
.tp-logo svg { width: 24px; height: 24px; }
.tp-logo b { color: var(--tp-ink); font-weight: 800; }
.tp-x { border: 0; background: #f1f0f7; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--tp-muted); }
.tp-x:hover { background: #e6e4f0; }
.tp-demo { margin: 0 18px; padding: 8px 12px; border-radius: 10px; background: #fff6e0; color: #7a5300; font-size: 12.5px; line-height: 1.4; }
.tp-sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 14px 18px 4px; padding-bottom: 14px; border-bottom: 1px solid var(--tp-line); }
.tp-sum strong { display: block; font-size: 15px; }
.tp-label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-muted); margin-bottom: 2px; }
.tp-ref { font-size: 12px; color: var(--tp-muted); }
.tp-amount { font-size: 24px; font-weight: 800; white-space: nowrap; }
.tp-body { padding: 14px 18px 6px; }
.tp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #f3f2f9; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tp-tab { border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font: 600 14px Inter, system-ui, sans-serif; color: var(--tp-muted); cursor: pointer; }
.tp-tab.is-on { background: #fff; color: var(--tp-ink); box-shadow: 0 1px 3px rgba(20, 18, 43, .12); }
.tp-f { display: block; margin-bottom: 10px; }
.tp-f span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: #3b3858; }
.tp-f input { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--tp-line); border-radius: 10px; font: 15px Inter, system-ui, sans-serif; color: var(--tp-ink); background: #fbfbfe; }
.tp-f input:focus { outline: 2px solid var(--tp-accent-2); outline-offset: 0; border-color: transparent; }
.tp-cardnum { position: relative; }
.tp-brand { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 800 11px Inter, sans-serif; color: var(--tp-accent); font-style: normal; letter-spacing: .06em; }
.tp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-link { border: 0; background: none; padding: 0; color: var(--tp-accent); font: 600 13px Inter, sans-serif; cursor: pointer; text-decoration: underline; }
.tp-err { min-height: 18px; margin: 6px 0; color: var(--tp-err); font-size: 13px; }
.tp-pay {
  width: 100%; border: 0; border-radius: 12px; padding: 14px; margin: 6px 0 4px; cursor: pointer;
  background: linear-gradient(135deg, var(--tp-accent), var(--tp-accent-2)); color: #fff; font: 700 15px Inter, sans-serif;
}
.tp-pay:hover { filter: brightness(1.06); }
.tp-pay:focus-visible, .tp-tab:focus-visible, .tp-x:focus-visible, .tp-link:focus-visible { outline: 3px solid #b9b1ff; outline-offset: 2px; }
.tp-cash p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #3b3858; }
.tp-dl { margin: 0 0 12px; display: grid; gap: 8px; }
.tp-dl div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #f7f6fc; border-radius: 10px; }
.tp-dl dt { font-size: 12.5px; color: var(--tp-muted); }
.tp-dl dd { margin: 0; font-weight: 700; font-size: 14px; text-align: right; }
.tp-mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: .04em; }
.tp-voucher { text-align: center; padding: 14px; border: 1px dashed #cfcbe6; border-radius: 14px; margin-bottom: 10px; }
.tp-voucher svg { width: 100%; max-width: 260px; height: 46px; fill: var(--tp-ink); margin: 8px auto; display: block; }
.tp-big { display: block; font-size: 19px; }
.tp-voucher p { margin: 4px 0 0; font-size: 13px; }
.tp-wait { text-align: center; padding: 30px 0; color: var(--tp-muted); }
.tp-spin { display: inline-block; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #e6e4f0; border-top-color: var(--tp-accent); animation: tp-spin .8s linear infinite; }
@keyframes tp-spin { to { transform: rotate(360deg); } }
.tp-ok { text-align: center; padding: 8px 0; }
.tp-ok svg { width: 64px; height: 64px; fill: none; stroke: var(--tp-ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tp-ok circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: tp-draw .5s ease forwards; }
.tp-ok path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tp-draw .35s .4s ease forwards; }
@keyframes tp-draw { to { stroke-dashoffset: 0; } }
.tp-ok h3 { margin: 8px 0 4px; font-size: 20px; }
.tp-ok p { margin: 2px 0; color: var(--tp-muted); font-size: 14px; }
.tp-foot { padding: 10px 18px 16px; font-size: 11.5px; color: var(--tp-muted); text-align: center; }
.tp-foot span { color: #a07000; }
@media (prefers-reduced-motion: reduce) {
  .tp-sheet, .tp-backdrop { transition: none; }
  .tp-ok circle, .tp-ok path { animation: none; stroke-dashoffset: 0; }
  .tp-spin { animation-duration: 2.4s; }
}
