/* pagamento.css — folha "Método de pagamento" (.pg-*) e roupa das folhas de cartão (06/11/2026;
   ver docs/marketplace-checkout/CONTRATO-COMPRA-99.md). Tudo escopado: não afeta outras folhas. */

/* ═══ Folha "Método de pagamento" ═══════════════════════════════════════════ */
.mkt .pg-ov .mkt-sheet { background: var(--paper); }

.mkt .pg-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.mkt .pg-tab {
  border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-2);
  min-height: 48px; padding: 0 8px; cursor: pointer; transition: color .2s;
}
.mkt .pg-tab[aria-selected="true"] { color: var(--ink); font-weight: 800; }
.mkt .pg-ink {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 50%; background: var(--ink); border-radius: 3px 3px 0 0;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.mkt .pg-tabs[data-aba="1"] .pg-ink { transform: translateX(100%); }

.mkt .pg-body { flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 20px; }
.mkt .pg-pans { display: flex; width: 200%; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.mkt .pg-pans[data-aba="1"] { transform: translateX(-50%); }
.mkt .pg-pan { width: 50%; flex: 0 0 50%; padding-right: 0; min-width: 0; }
.mkt .pg-pan[aria-hidden="true"] { visibility: hidden; transition: visibility 0s .3s; }

.mkt .pg-grupo { background: var(--surface); border-radius: 18px; padding: 4px 0; margin-bottom: 14px; box-shadow: 0 1px 0 rgba(0, 0, 0, .03); }
.mkt .pg-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px;
  border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; position: relative;
  opacity: 0; transform: translateY(8px); animation: pg-in .32s cubic-bezier(.22, 1, .36, 1) forwards; animation-delay: calc(var(--i, 0) * 35ms);
}
.mkt .pg-item + .pg-item::before { content: ""; position: absolute; left: 64px; right: 16px; top: 0; height: 1px; background: var(--line); }
.mkt .pg-item:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: 14px; }
.mkt .pg-item:active:not(.is-off) { background: rgba(0, 0, 0, .03); }
@keyframes pg-in { to { opacity: 1; transform: none; } }

.mkt .pg-ico { flex: 0 0 38px; width: 38px; display: grid; place-items: center; }
.mkt .pg-logo { width: 38px; height: 25px; display: block; }
.mkt .pg-logo-nobg { width: 34px; height: 30px; }
.mkt .pg-plus {
  width: 30px; height: 30px; flex-basis: 30px; margin: 0 4px; border-radius: 9px; background: var(--paper);
  font-size: 22px; font-weight: 500; line-height: 1; color: var(--ink);
}
.mkt .pg-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mkt .pg-txt b { font-size: 16px; font-weight: 700; }
.mkt .pg-txt small { font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 1.3; }
.mkt .pg-bands { display: flex; gap: 5px; margin-top: 2px; }
.mkt .pg-bands .pg-logo { width: 30px; height: 20px; }

.mkt .pg-radio {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--decor, #bbb);
  display: grid; place-items: center; background: var(--surface); transition: border-color .15s, background .15s;
}
.mkt .pg-radio i { width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); }
.mkt .pg-item.is-on .pg-radio { border-color: var(--ink); background: var(--ink); animation: pg-pop .32s cubic-bezier(.34, 1.56, .64, 1); }
.mkt .pg-item.is-on .pg-radio i { transform: scale(1); transition: transform .22s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pg-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

.mkt .pg-item.is-off { cursor: default; }
.mkt .pg-item.is-off .pg-ico, .mkt .pg-item.is-off .pg-txt b, .mkt .pg-item.is-off .pg-radio { opacity: .42; }
.mkt .pg-item.is-off .pg-txt small { color: var(--ink-3); }
.mkt .pg-item.is-off .pg-radio { background: var(--paper); }

.mkt .pg-vazio { padding: 28px 12px; text-align: center; color: var(--ink-2); font-size: 14px; }

.mkt .pg-foot {
  flex: 0 0 auto; background: var(--surface); border-top: 1px solid var(--line);
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
}
.mkt .pg-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.mkt .pg-total b { font-size: 16px; color: var(--ink); font-weight: 800; }
.mkt .pg-ok {
  display: block; width: 100%; min-height: 54px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: var(--ink); font: inherit; font-size: 17px; font-weight: 800;
  transition: transform .12s, opacity .15s;
}
.mkt .pg-ok:active:not(:disabled) { transform: scale(.98); }
.mkt .pg-ok:disabled { opacity: .45; cursor: not-allowed; }
.mkt .pg-ok:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .mkt .pg-item { animation: none; opacity: 1; transform: none; }
  .mkt .pg-pans, .mkt .pg-ink, .mkt .pg-radio, .mkt .pg-radio i, .mkt .pg-ok { transition: none; }
  .mkt .pg-item.is-on .pg-radio { animation: none; }
}

/* ═══ Roupa das folhas de cartão (folhaCartaoPb e folhaCartaoNovo) ══════════
   Só quem tem `.mkt-cc` (PagBank) ou `#mktCardEl` (Stripe) dentro do corpo. */
.mkt .mkt-sheet-body:has(> .mkt-cc), .mkt .mkt-sheet-body:has(> #mktCardEl) {
  display: flex; flex-direction: column; padding: 8px 20px 0; background: var(--surface);
}
.mkt .mkt-sheet-body:has(> .mkt-cc) .mkt-cc-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
.mkt .mkt-sheet-body:has(> .mkt-cc) .mkt-cc-in {
  height: 52px; border-radius: 12px; font-size: 16px; padding: 0 16px; min-width: 0;
  border: 1.5px solid var(--line); background: var(--paper); transition: border-color .15s, box-shadow .15s, background .15s;
}
.mkt .mkt-sheet-body:has(> .mkt-cc) .mkt-cc-in:focus {
  background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--rd-brand-soft, rgba(249, 213, 21, .3));
}
.mkt .mkt-sheet-body:has(> .mkt-cc) .mkt-cc-2 { gap: 12px; grid-template-columns: 1fr 1fr; }
.mkt .mkt-sheet-body:has(> .mkt-cc) .mkt-cc-err { margin: 12px 0 0; }
.mkt .mkt-sheet-body:has(> #mktCardEl) .mkt-card-el {
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); padding: 16px; margin-top: 12px; min-height: 52px;
}

/* aviso(s) vêm antes do botão; o botão fica fixo embaixo da folha */
.mkt .mkt-sheet-body:has(> .mkt-cc) > .auth-hint:not(.mkt-cc-err), .mkt .mkt-sheet-body:has(> #mktCardEl) > .auth-hint:not([hidden]) {
  order: 8; margin: 14px 0 0; text-align: left; font-size: 12.5px; font-weight: 500; line-height: 1.45; color: var(--ink-2);
}
.mkt .mkt-sheet-body:has(> .mkt-cc) > .auth-hint:last-child, .mkt .mkt-sheet-body:has(> #mktCardEl) > .auth-hint:last-child {
  padding-left: 22px; position: relative; margin-bottom: 14px;
}
.mkt .mkt-sheet-body:has(> .mkt-cc) > .auth-hint:last-child::before, .mkt .mkt-sheet-body:has(> #mktCardEl) > .auth-hint:last-child::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 15px; height: 15px; background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 0 1 6 0v3H9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 0 1 6 0v3H9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mkt .mkt-sheet-body:has(> .mkt-cc) > .btn-main, .mkt .mkt-sheet-body:has(> #mktCardEl) > .btn-main {
  order: 9; flex: 0 0 auto; margin: auto 0 0; width: 100%; min-height: 54px; font-size: 17px; font-weight: 800;
  position: sticky; bottom: 0; z-index: 2; border: 0;
  padding: 0 16px; box-shadow: 0 0 0 12px var(--surface); margin-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.mkt .mkt-sheet-body:has(> .mkt-cc) > .btn-main:disabled, .mkt .mkt-sheet-body:has(> #mktCardEl) > .btn-main:disabled { opacity: .55; }
