/* Activity-aware cards expand to fill remaining space without clipped amounts. */
#app .tx-summary-v1251{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))!important;gap:10px!important}
#app .tx-summary-v1251>.tx-summary-card-v1251[hidden]{display:none!important}
#app .tx-summary-v1251 .tx-summary-card-v1251{min-width:0!important;overflow-wrap:anywhere}
#app .tx-summary-v1251 .tx-summary-values-v1251{min-width:0!important}
#app .tx-summary-v1251 .tx-summary-values-v1251 strong{font-size:clamp(12px,3.3vw,19px)!important;overflow-wrap:anywhere}
#app .tx-summary-v1251.r3-phase1-no-activity{display:none!important}
@media(max-width:420px){#app .tx-summary-v1251{grid-template-columns:repeat(auto-fit,minmax(min(100%,104px),1fr))!important;gap:7px!important}}

/* iPhone: do not squeeze Sent + amount + currency into one overflowing line. */
#app .tx-summary-v1251 .u2-transfer-summary-values{display:flex!important;flex-direction:column!important;gap:5px!important;min-width:0!important}
#app .tx-summary-v1251 .u2-transfer-summary-line{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;column-gap:3px!important;row-gap:0!important;min-width:0!important;width:100%!important;align-items:baseline!important}
#app .tx-summary-v1251 .u2-transfer-summary-kind{grid-column:1!important;grid-row:1/3!important;font-size:10px!important;white-space:nowrap!important;align-self:center}
#app .tx-summary-v1251 .u2-transfer-summary-line strong{grid-column:2!important;grid-row:1!important;min-width:0!important;font-size:clamp(12px,3.0vw,18px)!important;white-space:nowrap!important;overflow:visible!important;line-height:1.1!important;letter-spacing:-.25px!important}
#app .tx-summary-v1251 .u2-transfer-summary-line span{grid-column:2!important;grid-row:2!important;justify-self:end!important;font-size:9px!important;line-height:1.2!important;white-space:nowrap!important}
#app .tx-summary-v1251 .tx-summary-card-v1251{min-width:0!important;overflow:hidden!important}
#app .tx-summary-v1251[hidden]{display:none!important}
@media(max-width:420px){#app .tx-summary-v1251 .u2-transfer-summary-card{padding:12px 9px!important}}

/* Full-width single summary cards should use the space rather than leave
   the value stranded on the left with a blank right-hand half. */
#app .tx-summary-v1251.r3-single-summary>.tx-summary-card-v1251{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,max-content);
  gap:16px;align-items:center;
}
#app .tx-summary-v1251.r3-single-summary>.tx-summary-card-v1251>.label{align-self:center}
#app .tx-summary-v1251.r3-single-summary .tx-summary-values-v1251{
  margin-top:0!important;justify-items:end!important;text-align:right;min-width:0;
}
#app .tx-summary-v1251.r3-single-summary .u2-transfer-summary-values{
  min-width:min(220px,45vw)!important;
}
#app .tx-summary-v1251.r3-single-summary .u2-transfer-summary-line{
  grid-template-columns:minmax(0,1fr) max-content!important;
}
@media(max-width:420px){
 #app .tx-summary-v1251.r3-single-summary>.tx-summary-card-v1251{gap:8px!important}
 #app .tx-summary-v1251.r3-single-summary .u2-transfer-summary-values{min-width:min(180px,60vw)!important}
}

/* Phase 1 iPhone follow-up: legacy 3-column iPhone rules outranked the
   adaptive layout, causing the last Transfer card to clip its figures.
   Use two equal, fluid columns and give the odd last card the full row. */
@media (max-width:600px){
 body #app .tx-summary-v1251{
   grid-template-columns:repeat(2,minmax(0,1fr))!important;
   gap:8px!important;
 }
 body #app .tx-summary-v1251>.tx-summary-card-v1251,
 body #app .tx-summary-v1251>.tx-summary-card-v1251:last-child,
 body #app .tx-summary-v1251>.tx-summary-card-v1251:nth-child(3){
   grid-column:auto!important;
   width:auto!important;max-width:none!important;min-width:0!important;
   padding:12px 11px!important;box-sizing:border-box!important;
 }
 body #app .tx-summary-v1251>.tx-summary-card-v1251:last-child:nth-child(odd){
   grid-column:1 / -1!important;
 }
 body #app .tx-summary-v1251 .u2-transfer-summary-values{
   width:100%!important;min-width:0!important;
   display:grid!important;gap:7px!important;margin-top:8px!important;
 }
 body #app .tx-summary-v1251 .tx-summary-values-v1251>div.u2-transfer-summary-line{
   display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;
   grid-template-rows:auto auto!important;column-gap:5px!important;row-gap:0!important;
   width:100%!important;min-width:0!important;
   white-space:normal!important;align-items:center!important;
 }
 body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-kind{
   display:block!important;grid-column:1!important;grid-row:1 / 3!important;
   flex:none!important;min-width:0!important;white-space:nowrap!important;
   font-size:11px!important;line-height:1.2!important;
 }
 body #app .tx-summary-v1251 .u2-transfer-summary-line>strong{
   display:block!important;grid-column:2!important;grid-row:1!important;
   font-size:clamp(12px,3.2vw,16px)!important;
   min-width:0!important;max-width:none!important;
   white-space:nowrap!important;overflow:visible!important;
   word-break:normal!important;overflow-wrap:normal!important;
   font-variant-numeric:tabular-nums!important;
   line-height:1.2!important;text-align:right!important;
 }
 body #app .tx-summary-v1251 .u2-transfer-summary-line>span{
   display:block!important;grid-column:2!important;grid-row:2!important;
   font-size:9px!important;white-space:nowrap!important;text-align:right!important;
   justify-self:end!important;
 }
}


/* Phase 1 follow-up: amount and currency belong on ONE baseline.
   A single value group is kept together, with Sent / Received taking the
   flexible left column. Applies to both the narrow and full-width cards. */
body #app .tx-summary-v1251 .tx-summary-values-v1251>div.u2-transfer-summary-line {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  grid-template-rows:auto!important;
  align-items:baseline!important;
  gap:3px!important;
  width:100%!important;
}
body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-kind {
  grid-column:1!important;
  grid-row:1!important;
  align-self:baseline!important;
  line-height:1.15!important;
}
body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-total {
  display:inline-flex!important;
  flex-wrap:nowrap!important;
  grid-column:2!important;
  grid-row:1!important;
  align-items:baseline!important;
  justify-self:end!important;
  gap:3px!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:nowrap!important;
  line-height:1.15!important;
  font-weight:inherit!important;
  opacity:1!important;
}
body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-total>strong {
  display:inline!important;
  grid-column:auto!important;
  grid-row:auto!important;
  white-space:nowrap!important;
  overflow:visible!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  font-variant-numeric:tabular-nums!important;
  font-size:clamp(12px,3vw,18px)!important;
  letter-spacing:-.25px!important;
  line-height:1.15!important;
}
body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-total>.u2-transfer-summary-currency {
  display:inline!important;
  grid-column:auto!important;
  grid-row:auto!important;
  min-width:0!important;
  align-self:baseline!important;
  justify-self:auto!important;
  font-size:9px!important;
  font-weight:750!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
@media(max-width:420px){
  body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-total{gap:2px!important}
  body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-total>strong{font-size:clamp(11px,3vw,14px)!important}
  body #app .tx-summary-v1251 .u2-transfer-summary-line>.u2-transfer-summary-total>.u2-transfer-summary-currency{font-size:8px!important}
}
