/* BALI Telegram 2026-10-29: compact, vertically swiped history.
   Card receipts and Bali Coin receipts share #tgHistoryItems.
   Scoped to Telegram only. No changes to wallet/benefit data. */

/* Keep the page fixed like the menu; only the list itself scrolls vertically. */
body.bali-guest-theme .tg-page-history{
 display:flex!important;flex-direction:column!important;min-height:0!important;
 overflow:hidden!important;height:100%!important;gap:0!important;
}
body.bali-guest-theme .tg-page-history>#screen{
 display:flex!important;flex-direction:column!important;
 flex:1 1 auto!important;min-height:0!important;
 overflow:hidden!important;padding-bottom:clamp(3px,.65dvh,7px)!important;
}
body.bali-guest-theme .tg-page-history>.button[data-action="back"]{
 align-self:flex-start!important;flex:0 0 auto!important;
 min-height:30px!important;margin:0 0 clamp(4px,.85dvh,7px)!important;
 padding:5px 10px!important;border-radius:9px!important;
 font-size:11px!important;line-height:1.1!important;
 background:#24272d!important;color:#d8ff9f!important;
 border:1px solid rgba(255,255,255,.14)!important;
 box-shadow:none!important;
}
body.bali-guest-theme .tg-page-history #screen>.tg-title{
 flex:0 0 auto!important;margin:1px 0 clamp(7px,1.1dvh,10px)!important;
 font:850 clamp(17px,2.65dvh,22px)/1.17 Manrope,Inter,sans-serif!important;
 letter-spacing:-.035em!important;color:#f5f5f5!important;
 text-align:left!important;text-shadow:none!important;
}
body.bali-guest-theme .tg-page-history #screen>.tg-title .metal{
 color:#d8ff9f!important;background:none!important;
 -webkit-text-fill-color:#d8ff9f!important;text-shadow:none!important;
}
body.bali-guest-theme .tg-page-history #screen>.tg-receipt-tabs{
 flex:0 0 auto!important;display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:clamp(3px,.9vw,6px)!important;
 margin:0 0 clamp(7px,1.05dvh,10px)!important;
 padding:0!important;
}
body.bali-guest-theme .tg-page-history .tg-receipt-tabs .button{
 min-width:0!important;min-height:35px!important;
 padding:6px 4px!important;border-radius:10px!important;
 font:750 clamp(9px,1.35dvh,11px)/1.17 Manrope,Inter,sans-serif!important;
 white-space:normal!important;
 background:#24272d!important;color:#c5c9ce!important;
 border:1px solid rgba(255,255,255,.14)!important;box-shadow:none!important;
}
body.bali-guest-theme .tg-page-history .tg-receipt-tabs .button.selected{
 background:#b9ff51!important;color:#10131a!important;
 border-color:#b9ff51!important;box-shadow:none!important;
}
/* Old shared stylesheet forced exactly 3 equally stretched rows. Discard it.
   Individual receipts now have their own compact natural height. */
body.bali-guest-theme .tg-page-history #tgHistoryItems.tg-receipt-list{
 display:flex!important;flex-direction:column!important;
 flex:1 1 auto!important;min-height:0!important;max-height:none!important;
 height:auto!important;grid-template-rows:none!important;
 align-items:stretch!important;align-content:flex-start!important;
 overflow-y:auto!important;overflow-x:hidden!important;
 overscroll-behavior-y:contain!important;touch-action:pan-y!important;
 -webkit-overflow-scrolling:touch;scroll-behavior:smooth;
 scrollbar-width:thin;scrollbar-color:#424b43 transparent;
 gap:clamp(5px,.85dvh,8px)!important;
 padding:2px 2px 13px 1px!important;
 margin:0!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems::-webkit-scrollbar{width:4px}
body.bali-guest-theme .tg-page-history #tgHistoryItems::-webkit-scrollbar-thumb{
 background:#424b43;border-radius:4px;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item{
 flex:0 0 auto!important;align-self:stretch!important;
 display:grid!important;grid-template-columns:30px minmax(0,1fr) auto!important;
 grid-template-rows:auto!important;align-items:center!important;
 justify-content:stretch!important;
 width:100%!important;height:auto!important;
 min-height:clamp(49px,7.6dvh,57px)!important;
 max-height:none!important;
 padding:6px clamp(8px,2.4vw,11px)!important;
 gap:clamp(6px,2vw,9px)!important;
 border:1px solid rgba(255,255,255,.15)!important;
 border-radius:11px!important;background:#191b20!important;
 box-shadow:none!important;color:#f5f5f5!important;
 text-align:left!important;
 transition:background-color .14s ease,transform .14s ease!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item:active{
 background:#24272d!important;transform:scale(.994)!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-symbol{
 width:28px!important;height:28px!important;
 flex:none!important;display:grid!important;place-items:center!important;
 padding:0!important;border-radius:9px!important;
 background:#30333a!important;color:#b9ff51!important;
 border:1px solid rgba(178,239,95,.35)!important;
 font:750 17px/1 Manrope,Inter,sans-serif!important;
 box-shadow:none!important;text-shadow:none!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-copy{
 display:flex!important;flex-direction:column!important;
 flex:1 1 auto!important;min-width:0!important;gap:3px!important;
 overflow:hidden!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-copy b{
 display:-webkit-box!important;-webkit-box-orient:vertical;
 -webkit-line-clamp:2;line-clamp:2;
 white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis;
 color:#f5f5f5!important;font:750 clamp(10px,1.56dvh,12px)/1.25 Manrope,Inter,sans-serif!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-copy small{
 display:block;min-width:0!important;
 white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden;
 color:#aeb4b8!important;font:550 clamp(9px,1.25dvh,10px)/1.15 Manrope,Inter,sans-serif!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-amount{
 display:block!important;flex:none!important;max-width:min(39%,148px)!important;
 min-width:0!important;justify-self:end!important;
 color:#e3e5e8!important;text-align:right!important;
 font:850 clamp(10px,1.65dvh,12px)/1.2 Manrope,Inter,sans-serif!important;
 font-variant-numeric:tabular-nums!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
 text-shadow:none!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-amount[data-positive="true"]{
 color:#d8ff9f!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-empty-message{
 flex:0 0 auto!important;min-height:40px!important;
 padding:13px 10px!important;border-radius:10px!important;
 background:#191b20!important;color:#aeb4b8!important;
 font-size:12px!important;text-align:center!important;
}
body.bali-guest-theme .tg-page-history .tg-receipt-list>.tg-receipt-item:focus-visible{
 outline:2px solid #b2ef5f!important;outline-offset:1px!important;
}
/* Detailed receipt is still accessible on tap; less empty padding. */
body.bali-guest-theme .tg-receipt-dialog.tg-checkout{
 box-sizing:border-box!important;width:min(92vw,420px)!important;
 max-height:min(85dvh,690px)!important;overflow-y:auto!important;
 padding:clamp(14px,3vw,20px)!important;
 border-radius:16px!important;
 background:#191c21!important;color:#f5f5f5!important;
 border:1px solid rgba(255,255,255,.18)!important;box-shadow:0 16px 34px #0008!important;
}
body.bali-guest-theme .tg-receipt-dialog .tg-eyebrow{
 color:#d8ff9f!important;font-size:9px!important;
}
body.bali-guest-theme .tg-receipt-dialog h2{
 margin:6px 0 11px!important;font:850 19px/1.2 Manrope,Inter,sans-serif!important;
}
body.bali-guest-theme .tg-receipt-dialog .tg-receipt-detail>p{
 display:flex!important;justify-content:space-between!important;
 gap:12px!important;margin:0!important;padding:8px 0!important;
 border-bottom:1px solid rgba(255,255,255,.12)!important;
 font-size:12px!important;line-height:1.35!important;
}
body.bali-guest-theme .tg-receipt-dialog .tg-receipt-detail>p span{
 color:#bbc0c5!important;flex:0 0 40%;
}
body.bali-guest-theme .tg-receipt-dialog .tg-receipt-detail>p b{
 color:#f5f5f5!important;min-width:0;text-align:right!important;overflow-wrap:anywhere;
}
body.bali-guest-theme .tg-receipt-dialog>[data-close]{
 width:100%!important;min-height:40px!important;margin:12px 0 0!important;
 background:#b9ff51!important;color:#10131a!important;border-color:#b9ff51!important;
 box-shadow:none!important;
}
@media(max-width:350px){
 body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item{
  grid-template-columns:25px minmax(0,1fr) auto!important;padding:6px!important;gap:5px!important;
 }
 body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-symbol{
  width:25px!important;height:25px!important;
 }
 body.bali-guest-theme .tg-page-history #tgHistoryItems .tg-receipt-amount{
  font-size:10px!important;max-width:41%!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.bali-guest-theme .tg-page-history #tgHistoryItems{scroll-behavior:auto!important}
 body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item{transition:none!important}
}

/* Website BALI CARD operation history parity (Telegram mobile).
   Website reference: .bali-bank-history-item, -line, -amount.
   Flat ruled entries, title/date on left, amount on right, details underneath. */
body.bali-guest-theme .tg-page-history #tgHistoryItems.tg-site-history-list{
 gap:0!important;padding:0 0 14px!important;background:#101915!important;
 border-radius:12px!important;
 scrollbar-color:#667d66 transparent!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item.tg-site-history-item{
 display:flex!important;flex-direction:column!important;
 grid-template-columns:none!important;grid-template-rows:none!important;
 align-items:stretch!important;justify-content:flex-start!important;
 min-height:0!important;height:auto!important;
 gap:5px!important;width:100%!important;
 padding:clamp(9px,1.35dvh,12px) clamp(7px,1.8vw,13px)!important;
 background:transparent!important;color:#f5f9f5!important;
 border:0!important;border-bottom:1px solid #38483b!important;
 border-radius:0!important;box-shadow:none!important;
 text-align:left!important;transition:background-color .14s ease!important;
}
body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item.tg-site-history-item:active{
 background:#1d2b22!important;transform:none!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-line{
 display:flex!important;align-items:flex-start!important;
 justify-content:space-between!important;gap:clamp(8px,2vw,12px)!important;
 width:100%!important;min-width:0!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-line .tg-receipt-copy{
 display:flex!important;flex-direction:column!important;
 gap:3px!important;min-width:0!important;flex:1 1 auto!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-line .tg-receipt-copy b{
 font:800 clamp(11px,1.75dvh,13px)/1.25 Manrope,Inter,sans-serif!important;
 color:#f5f9f5!important;line-height:1.25!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-line .tg-receipt-copy small{
 font:550 clamp(10px,1.52dvh,11px)/1.25 Manrope,Inter,sans-serif!important;
 color:#adbfaf!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-line .tg-receipt-amount{
 margin-left:auto!important;
 flex:0 1 auto!important;min-width:0!important;
 max-width:min(49%,165px)!important;
 color:#f5f9f5!important;text-align:right!important;
 font:800 clamp(10px,1.68dvh,12px)/1.22 Manrope,Inter,sans-serif!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-line .tg-receipt-amount[data-positive="true"]{
 color:#b9ff51!important;
}
body.bali-guest-theme .tg-page-history .tg-site-history-note{
 display:block!important;width:100%!important;min-width:0!important;
 margin:0!important;text-align:left!important;
 font:580 clamp(10px,1.65dvh,12px)/1.4 Manrope,Inter,sans-serif!important;
 color:#bfd0c0!important;overflow-wrap:anywhere!important;
}
body.bali-guest-theme .tg-page-history .tg-receipt-tabs .button.selected{
 color:#101811!important;
}
body.bali-guest-theme .tg-site-history-dialog.tg-receipt-dialog.tg-checkout{
 background:#101915!important;border:1px solid rgba(185,255,81,.4)!important;
 color:#f5f9f5!important;
}
body.bali-guest-theme .tg-site-history-dialog.tg-receipt-dialog .tg-receipt-detail>p{
 border-bottom:1px solid #38483b!important;
}
body.bali-guest-theme .tg-site-history-dialog.tg-receipt-dialog .tg-receipt-detail>p span{
 color:#adbfaf!important;
}
@media(max-width:330px){
 body.bali-guest-theme .tg-page-history #tgHistoryItems>.tg-receipt-item.tg-site-history-item{
  padding:8px 6px!important;gap:4px!important;
 }
 body.bali-guest-theme .tg-page-history .tg-site-history-line .tg-receipt-amount{max-width:47%!important}
 body.bali-guest-theme .tg-page-history .tg-site-history-note{font-size:10px!important}
}
