/* Restored two-card swipe carousel + per-wallet primary selection.
   This is a visual per-account preference only; no balance/payment writes. */
#walletView .wallet-carousel{
 display:flex!important;
 gap:13px!important;
 overflow-x:auto!important;
 scroll-snap-type:x mandatory!important;
 scroll-behavior:smooth!important;
 -webkit-overflow-scrolling:touch!important;
 scrollbar-width:none!important;
 padding:3px 2px 14px!important;
}
#walletView .wallet-carousel::-webkit-scrollbar{display:none}
#walletView .wallet-carousel>.wallet-hero,
#walletView .wallet-carousel>.madar-wallet-card{
 display:block!important;
 flex:0 0 92%!important;
 width:92%!important;
 max-width:92%!important;
 min-width:0!important;
 height:252px!important;
 min-height:252px!important;
 max-height:none!important;
 margin:0!important;
 padding:22px!important;
 scroll-snap-align:center!important;
 border-radius:26px!important;
}
#walletView .wallet-carousel>.wallet-hero{container-type:inline-size}
#walletView .wallet-carousel-dots{display:flex!important;justify-content:center!important;gap:8px!important}
#walletView .wallet-hero-top .wallet-provider-heading{
 display:flex!important;
 flex-direction:column!important;
 align-items:flex-start!important;
 justify-content:center!important;
 min-width:0!important;
 gap:5px!important;
 position:relative!important;
 z-index:4!important;
}
#walletView .wallet-hero-top .wallet-provider-heading>.wallet-primary-badge{
 display:block!important;
 background:none!important;
 border:0!important;
 padding:0!important;
 font:900 22px/1.4 "IBM Plex Sans Arabic",system-ui,sans-serif!important;
 color:#fff!important;
 white-space:nowrap!important;
}
#walletView .wallet-primary-toggle{
 appearance:none;
 position:relative;z-index:5;
 display:inline-flex!important;
 justify-content:center;align-items:center;
 gap:5px!important;
 width:auto!important;
 min-height:30px;
 margin:0!important;
 padding:5px 12px!important;
 border-radius:999px!important;
 border:1.5px dashed #ffe3f9ab!important;
 background:#39132e80!important;
 color:#ffe5f7!important;
 opacity:.91!important;
 font:800 11px/1.4 "IBM Plex Sans Arabic",system-ui,sans-serif!important;
 white-space:nowrap;
 text-align:center;
 cursor:pointer;
 box-shadow:none!important;
 transition:background .2s ease,transform .2s ease,border-color .2s ease,opacity .2s ease;
}
#walletView .wallet-primary-toggle[aria-pressed="false"]::before{
 content:"+";
 display:inline-grid;place-items:center;
 width:15px;height:15px;
 font:900 13px/1 system-ui,sans-serif;
 border-radius:50%;
 border:1px solid currentColor;
}
#walletView .madar-wallet-card .wallet-primary-toggle[aria-pressed="false"]{
 background:#063d2980!important;
 border-color:#c7ffe0a8!important;
 color:#e1ffe9!important;
}
#walletView .wallet-primary-toggle:active{transform:scale(.94)}
#walletView .wallet-primary-toggle[aria-pressed="true"]{
 opacity:1!important;
 background:#ffeff9!important;
 color:#952472!important;
 border:1.5px solid #fff!important;
 box-shadow:0 3px 11px #0003!important;
}
#walletView .madar-wallet-card .wallet-primary-toggle[aria-pressed="true"]{
 color:#04673a!important;
 background:#e1ffe8!important;
 border:1.5px solid #fff!important;
 box-shadow:0 3px 11px #0003!important;
}
#walletView .wallet-primary-toggle:focus-visible{
 outline:3px solid white!important;outline-offset:3px!important;
}
#walletView .wallet-carousel>.wallet-hero[data-primary-selected="true"],
#walletView .wallet-carousel>.madar-wallet-card[data-primary-selected="true"]{
 box-shadow:0 0 0 2px #ffffff70,0 18px 35px #0204155e!important;
}
#walletView .wallet-actions{
 display:grid!important;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
#walletView #walletActionPrimary .wallet-action-icon{
 background:#212e43!important;
 color:#b2c0d3!important;
 border:1px dashed #596780!important;
}
#walletView #walletActionPrimary[aria-pressed="false"] b{
 color:#b9c4d8!important;
}
#walletView #walletActionPrimary[aria-pressed="true"] .wallet-action-icon{
 background:#0b694d!important;color:#c1ffe4!important;
 border:1px solid #84f1b3!important;
 box-shadow:0 0 0 2px #84f1b384!important;
}
#walletView #walletActionPrimary[aria-pressed="true"] b{
 color:#c1ffe4!important;
}
#walletView .madar-wallet-card .madar-candy-status{
 font-size:clamp(11px,2.8vw,13px)!important;
}
@media(max-width:600px){
 #walletView .wallet-carousel{
  display:flex!important;
  gap:10px!important;
  overflow-x:auto!important;
  padding:3px 2px 12px!important;
 }
 #walletView .wallet-carousel>.wallet-hero,
 #walletView .wallet-carousel>.madar-wallet-card{
  flex:0 0 92%!important;
  width:92%!important;
  max-width:92%!important;
  height:252px!important;
  min-height:252px!important;
  padding:20px!important;
  border-radius:25px!important;
 }
 #walletView .wallet-hero-top .wallet-provider-heading>.wallet-primary-badge{font-size:21px!important}
 #walletView .wallet-primary-toggle{min-height:29px;font-size:11px!important}
 #walletView .wallet-actions .wallet-action b{font-size:12px!important}
}
@media(max-width:390px){
 #walletView .wallet-carousel>.wallet-hero,
 #walletView .wallet-carousel>.madar-wallet-card{
  height:244px!important;min-height:244px!important;padding:18px!important;
 }
 #walletView .wallet-hero-top .wallet-provider-heading>.wallet-primary-badge{font-size:19px!important}
 #walletView .wallet-primary-toggle{font-size:10px!important;padding:4px 9px!important}
}
@media(prefers-reduced-motion:reduce){
 #walletView .wallet-primary-toggle{transition:none!important}
}

/* Older inline Madar rules absolutely-positioned every button; exempt the new primary chip. */
#walletView .madar-wallet-card .wallet-primary-toggle{
 position:relative!important;
 top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
 width:auto!important;
 height:auto!important;
 padding:5px 12px!important;
 margin:0!important;
 transform:none;
}

/* Top header wallet follows the selected primary carrier logo and color.
   The balance is supplied separately from wallet_accounts for that carrier. */
body .topbar .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip{
 transition:background .28s ease,border-color .28s ease,box-shadow .28s ease!important;
}
body .topbar .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"]{
 border:1px solid #73e4a490!important;
 background:radial-gradient(circle at 6% 0%,#27b76f38,transparent 49%),linear-gradient(118deg,#0d392c,#07553e 73%,#063b2f)!important;
 box-shadow:inset 0 1px #dbffe342,0 5px 0 -3px #65db9552,0 12px 26px #0416105a!important;
}
#customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"] .gb-libyana-badge{
 background:linear-gradient(140deg,#f6fff4,#e3ffe2)!important;
 border:1px solid #a3f8af!important;
 box-shadow:inset 0 1px #fff,0 0 17px #62e69f45!important;
}
#customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"] .gb-libyana-badge img{
 object-fit:cover!important;
 border-radius:8px!important;
}
#customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"] .gb-libyana-fallback{
 color:#197447!important;
 font-size:12px!important;
 font-family:"IBM Plex Sans Arabic",system-ui,sans-serif!important;
}
#customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"] .customer-wallet-label{
 color:#c3f5d4!important;
}
body .topbar .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"] #customerTopupShortcut{
 border:1px solid #89cea9!important;
 background:#1b694a!important;
 color:#dfffea!important;
 box-shadow:inset 0 1px #ffffff35,0 0 0 3px #40a47628!important;
 filter:saturate(.62)!important;
}
