/* PIX result presentation only. Active exclusively after a PIX is rendered.
   Keep every field visible; overflow belongs to the full-screen backdrop only
   when an unusually short viewport or long code needs more physical space. */
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result){
  box-sizing:border-box!important;
  top:var(--deposit-viewport-top,0px)!important;
  bottom:auto!important;
  height:var(--deposit-viewport-height,100dvh)!important;
  padding:max(8px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .campaign-modal{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  display:grid!important;
  width:min(440px,100%)!important;
  min-width:0!important;
  max-width:none!important;
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  margin:auto 0!important;
  padding:0!important;
  overflow:visible!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #modalContent{
  box-sizing:border-box!important;
  flex:none!important;
  grid-area:1 / 1;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  padding:0!important;
  border-radius:inherit!important;
  overflow:visible!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #moneyForm{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:14px!important;
  border-radius:inherit!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .modal-close{
  position:sticky!important;
  grid-area:1 / 1;
  align-self:start;
  justify-self:end;
  z-index:50!important;
  top:2px!important;
  right:2px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  margin:2px 2px 0 0!important;
  padding:12px!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr);
  justify-items:center;
  align-items:center;
  gap:8px!important;
  width:100%;
  min-width:0;
  margin:0!important;
  padding:0!important;
  text-align:center;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > strong{
  box-sizing:border-box;
  width:100%;
  padding:0 30px;
  font-size:20px!important;
  line-height:26px!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > p{
  width:100%;
  max-width:540px;
  margin:0!important;
  font-size:14px!important;
  line-height:1.4!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-qr{
  box-sizing:border-box!important;
  width:208px!important;
  height:208px!important;
  max-width:100%!important;
  max-height:none!important;
  margin:0!important;
  padding:8px!important;
  object-fit:contain;
  align-self:center;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-qr-generated :is(img,canvas){
  max-width:100%!important;
  max-height:100%!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > label{
  box-sizing:border-box;
  display:flex!important;
  flex-direction:column;
  gap:4px!important;
  width:100%!important;
  min-width:0;
  margin:0!important;
  text-align:left;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > label > span{
  font-size:11px!important;
  line-height:14px!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #pixCopyCode{
  box-sizing:border-box!important;
  field-sizing:content;
  width:100%!important;
  min-width:0!important;
  min-height:76px!important;
  max-height:none!important;
  height:auto!important;
  margin:0!important;
  padding:7px 8px!important;
  font:12px/1.25 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere;
  word-break:break-all;
  resize:none;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #copyPixCode{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:44px!important;
  margin:0!important;
  padding:10px 12px!important;
  font-size:14px!important;
  line-height:20px!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) [data-pix-payment-status]{
  display:block;
  max-width:100%;
  margin:0!important;
  font-size:12px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-countdown{
  box-sizing:border-box;
  flex-direction:row!important;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center!important;
  gap:4px 9px!important;
  max-width:100%;
  margin:0!important;
  padding:5px 9px!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-countdown strong{
  font-size:23px!important;
  line-height:28px!important;
}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-countdown small{
  font-size:11px!important;
  line-height:15px!important;
}
@media(min-width:600px){
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .campaign-modal{width:min(680px,100%)!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:has(> .pix-payment-qr){grid-template-columns:220px minmax(0,1fr);column-gap:18px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:has(> .pix-payment-qr) > :is(strong,p){grid-column:1 / -1}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > .pix-payment-qr{grid-column:1;grid-row:3 / span 4;width:220px!important;height:220px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:has(> .pix-payment-qr) > label{grid-column:2;grid-row:3}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:has(> .pix-payment-qr) > #copyPixCode{grid-column:2;grid-row:4}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:has(> .pix-payment-qr) > [data-pix-payment-status]{grid-column:2;grid-row:5}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:has(> .pix-payment-qr) > .pix-countdown{grid-column:2;grid-row:6}
}
@media(max-width:599px) and (max-height:640px){
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > *{grid-column:1 / -1}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #moneyForm{padding:10px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result{grid-template-columns:176px minmax(0,1fr);gap:5px 10px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > p{grid-column:2;grid-row:2;align-self:center;text-align:left;font-size:13px!important;line-height:17px!important;overflow-wrap:anywhere}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-qr{grid-column:1;grid-row:2;width:176px!important;height:176px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #pixCopyCode{min-height:72px!important;font-size:11.5px!important;line-height:14px!important;padding:5px 7px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-countdown strong{font-size:21px!important;line-height:26px!important}
}

/* Short phones: share the QR row with its explanation/status/timer, then keep
   the complete code and 44px copy action below. Longer content can still grow. */
@media(max-width:599px) and (max-height:460px){
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result){padding:max(4px,env(safe-area-inset-top,0px)) max(4px,env(safe-area-inset-right,0px)) max(4px,env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px))!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #moneyForm{padding:6px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result{gap:3px 8px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > strong{grid-row:1;padding-bottom:20px!important;line-height:24px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-qr{grid-row:2 / span 3;margin-top:-20px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) [data-pix-payment-status]{grid-column:2;grid-row:3}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-countdown{grid-column:2;grid-row:4;gap:2px 5px!important;padding:2px 5px!important}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result > label{grid-row:5}
  body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) #copyPixCode{grid-row:6}
}

/* If the QR renderer is unavailable, keep the existing copy-code fallback
   full-width rather than reserving an empty image column. */
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:not(:has(> .pix-payment-qr:not([hidden]):not([style*="display: none"]))){grid-template-columns:minmax(0,1fr)!important}
body:is([data-theme="bubble"],[data-theme="original"]) #modalBackdrop.open[data-screen="deposit"]:has(#modalContent #moneyForm > .pix-payment-result) .pix-payment-result:not(:has(> .pix-payment-qr:not([hidden]):not([style*="display: none"]))) > *{grid-column:1 / -1!important;grid-row:auto!important;text-align:center}
