/* Compact reference-scale header: avatar on far left, bell and wallet smaller. */
/* L1017N reference header: profile image on far left, bell, real balance.
   The user's wallet balance and notification count remain dynamically supplied. */
@media (max-width:900px) {
  html body.l1017-live-ui .topbar #headerAccountCluster {
    position:absolute!important;
    left:clamp(7px,2.1vw,12px)!important;
    right:auto!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    direction:ltr!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:clamp(4px,1.2vw,7px)!important;
    margin:0!important;
    padding:0!important;
    width:max-content!important;
    max-width:calc(100vw - 59px)!important;
    min-width:0!important;
    z-index:11!important;
  }
  /* The actual profile IMAGE sits farthest LEFT, as requested. */
  html body.l1017-live-ui .topbar #headerAccountCluster > #googleProfileButton:not(.hidden){
    order:0!important;
    position:relative!important;
    width:clamp(31px,8.7vw,36px)!important;
    height:clamp(31px,8.7vw,36px)!important;
    min-width:0!important;
    flex:0 0 clamp(31px,8.7vw,36px)!important;
    margin:0!important;
    overflow:hidden!important;
    border-radius:50%!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster #googleProfileImage{
    display:block;
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
  /* The bell matches the original reference's softly outlined dark square. */
  html body.l1017-live-ui .topbar #headerAccountCluster > #headerNotificationBell:not(.hidden){
    order:1!important;
    position:relative!important;
    display:grid!important;
    place-items:center!important;
    flex:0 0 clamp(37px,10vw,42px)!important;
    width:clamp(37px,10vw,42px)!important;
    height:clamp(37px,10vw,42px)!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    border:2px solid #32343f!important;
    border-radius:14px!important;
    background:#1a1a23!important;
    color:#bebdc7!important;
    box-shadow:none!important;
    transform:none;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster > #headerNotificationBell:not(.hidden) svg{
    width:clamp(20px,5.7vw,24px)!important;
    height:clamp(20px,5.7vw,24px)!important;
    stroke:currentColor!important;
    stroke-width:1.85!important;
    animation:none!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster > #headerNotificationBell:active {
    background:#292935!important;
    transform:scale(.96)!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster > .account-wallet-group{
    order:2!important;
    display:flex!important;
    justify-content:flex-start!important;
    direction:rtl!important;
    align-items:center!important;
    margin:0!important;
    padding:0!important;
    flex:0 1 auto!important;
    min-width:0!important;
    width:auto!important;
  }
  /* Same proportions as reference: wide charcoal pill, compact wallet line icon. */
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip:not(.hidden){
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:clamp(25px,7vw,29px) minmax(0,1fr) clamp(43px,11vw,49px)!important;
    direction:rtl!important;
    align-items:center!important;
    justify-items:stretch!important;
    gap:clamp(2px,.8vw,5px)!important;
    flex:0 0 auto!important;
    width:clamp(145px,42vw,172px)!important;
    max-width:172px!important;
    min-width:0!important;
    height:clamp(41px,10.8vw,46px)!important;
    min-height:clamp(41px,10.8vw,46px)!important;
    padding:4px clamp(6px,1.6vw,9px)!important;
    margin:0!important;
    overflow:hidden!important;
    border:2px solid #34343e!important;
    border-radius:clamp(21px,5.8vw,25px)!important;
    background:#1b1b23!important;
    box-shadow:none!important;
    color:#f6f6fa!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip:not(.hidden)::after{
    content:"ليبيانا";
    display:block!important;
    grid-column:3!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:center!important;
    font:650 clamp(11px,3.2vw,14px)/1.4 'IBM Plex Sans Arabic',system-ui,sans-serif!important;
    white-space:nowrap!important;
    color:#9d9ba7!important;
    letter-spacing:0!important;
    pointer-events:none!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip[data-wallet-carrier="madar"]::after{
    content:"المدار";
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip .gb-libyana-badge{
    display:none!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip .gb-wallet-balance-content{
    display:flex!important;
    grid-column:2!important;
    grid-row:1!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    flex:1 1 auto!important;
    overflow:visible!important;
    text-align:center!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip .customer-wallet-label{
    display:none!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip #customerHeaderBalance{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    text-align:center!important;
    direction:ltr!important;
    color:#f5f4f8!important;
    font-family:system-ui,-apple-system,sans-serif!important;
    font-size:var(--l1017-header-balance-font-size,21px)!important;
    font-weight:830!important;
    line-height:1.22!important;
    letter-spacing:0!important;
    text-shadow:none!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip #customerTopupShortcut{
    display:grid!important;
    grid-column:1!important;
    grid-row:1!important;
    place-items:center!important;
    justify-self:center!important;
    align-self:center!important;
    flex:0 0 auto!important;
    width:clamp(24px,7.2vw,30px)!important;
    height:clamp(24px,7.2vw,30px)!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:8px!important;
    background:transparent!important;
    color:#a592f1!important;
    box-shadow:none!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip #customerTopupShortcut svg{
    display:block!important;
    width:clamp(22px,6.8vw,28px)!important;
    height:clamp(22px,6.8vw,28px)!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.9!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip #customerTopupShortcut:active{
    transform:scale(.92)!important;
  }
  html body.l1017-live-ui .topbar:has(#headerAccountCluster #customerWalletChip:not(.hidden)){
    min-height:61px!important;
    height:61px!important;
    padding-left:clamp(235px,68vw,282px)!important;
  }
}
@media(max-width:380px){
  html body.l1017-live-ui .topbar #headerAccountCluster{gap:3px!important}
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip:not(.hidden){
    width:clamp(144px,42vw,159px)!important;
    padding-inline:6px!important;
    grid-template-columns:24px minmax(0,1fr) 42px!important;
  }
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip:not(.hidden)::after{font-size:11px!important}
}
@media(max-width:340px){
  html body.l1017-live-ui .topbar #headerAccountCluster #googleProfileButton:not(.hidden){width:30px!important;height:30px!important;flex-basis:30px!important}
  html body.l1017-live-ui .topbar #headerAccountCluster > #headerNotificationBell:not(.hidden){width:37px!important;height:38px!important;flex-basis:37px!important}
  html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip:not(.hidden){width:144px!important}
}

/* Reference digits: clear rounded Latin numerals with consistent decimal alignment. */
html body.l1017-live-ui .topbar #headerAccountCluster .account-wallet-group #customerWalletChip.gb-libyana-wallet-chip #customerHeaderBalance{
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
 font-weight:500!important;font-variant-numeric:tabular-nums lining-nums!important;
 font-size:min(var(--l1017-header-balance-font-size,20px),20px)!important;
 font-feature-settings:"tnum" 1,"lnum" 1!important;font-kerning:normal;
 letter-spacing:0!important;line-height:1.25!important;color:#f4f3f8!important;
 direction:ltr!important;unicode-bidi:isolate;text-align:center!important;
 transform:scaleX(var(--l1017-header-balance-scale,1));transform-origin:center;
 -webkit-font-smoothing:antialiased;
}
