/* V12.54 - mobile notification/account + empty slider permanent fix */

/* clean-v1219 hides these legacy shells. Re-enable only their active states. */
body:not(.admin-body) #accountBackdrop.account-backdrop{display:none!important;z-index:12000!important}
body:not(.admin-body) #accountBackdrop.account-backdrop.show{display:grid!important}
body:not(.admin-body) .notification-center{display:block!important;visibility:visible!important;z-index:12500!important;pointer-events:none!important;transform:translateX(105%)!important}
body:not(.admin-body) .notification-center.open{display:block!important;visibility:visible!important;pointer-events:auto!important;transform:translateX(0)!important}

/* Mobile top notification button must stay clickable above header layers. */
body:not(.admin-body) #mobileNotifyTop{pointer-events:auto!important;position:relative!important;z-index:35!important;touch-action:manipulation!important}
body:not(.admin-body) #mobileNotifyTop .qicon,
body:not(.admin-body) #mobileNotifyTop svg,
body:not(.admin-body) #mobileNotifyTop span{pointer-events:none!important}

/* Keep account content clear of the X close button. */
body:not(.admin-body) #accountBackdrop .account-modal{position:relative!important;padding-top:72px!important}
body:not(.admin-body) #accountBackdrop .account-close{position:absolute!important;top:16px!important;right:16px!important;z-index:30!important;width:42px!important;height:42px!important;display:grid!important;place-items:center!important;background:#eef5f1!important;color:#17382a!important;box-shadow:0 4px 12px rgba(20,50,35,.10)!important}
body:not(.admin-body) #accountBackdrop .account-dashboard-head{padding-right:54px!important}
body:not(.admin-body) #accountBackdrop .corporate-kicker,
body:not(.admin-body) #accountBackdrop h2{position:relative!important;z-index:1!important}

/* Slider: never leave a visually empty active slide. */
body:not(.admin-body) .hero.hero-ad-host .ad-slide.ad-load-error,
body:not(.admin-body) .hero.hero-ad-host .ad-slide[data-invalid-ad="1"]{display:none!important;visibility:hidden!important;pointer-events:none!important}
body:not(.admin-body) .hero.hero-ad-host .ad-slide.active:not(.ad-load-error):not([data-invalid-ad="1"]){display:block!important;visibility:visible!important}

@media(max-width:800px){
  body:not(.admin-body) #accountBackdrop.account-backdrop{padding:10px!important}
  body:not(.admin-body) #accountBackdrop .account-modal{max-height:94vh!important;padding:68px 16px 22px!important;border-radius:20px!important}
  body:not(.admin-body) .notification-center{width:100%!important;inset:0!important}
  body:not(.admin-body) .notification-head{padding-top:calc(16px + env(safe-area-inset-top))!important}
}


/* V12.55 - mobile category compact cards + safer ad visibility */
@media(max-width:700px){
  body:not(.admin-body) #categoriesSection .categories{
    gap:10px!important;
    padding:2px 2px 8px!important;
    scroll-padding-left:2px!important;
    align-items:stretch!important;
  }
  body:not(.admin-body) #categoriesSection .category-card,
  body:not(.admin-body) #categoriesSection #categories.categories>.category-card{
    flex:0 0 132px!important;
    width:132px!important;
    min-width:132px!important;
    max-width:132px!important;
    border-radius:16px!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    background:#fff!important;
  }
  body:not(.admin-body) #categoriesSection .category-card img,
  body:not(.admin-body) #categoriesSection #categories.categories>.category-card img{
    display:block!important;
    width:100%!important;
    height:90px!important;
    min-height:90px!important;
    max-height:90px!important;
    object-fit:cover!important;
    object-position:center center!important;
    background:#fff!important;
    padding:0!important;
    margin:0!important;
    border-radius:0!important;
    transform:none!important;
  }
  body:not(.admin-body) #categoriesSection .category-card b,
  body:not(.admin-body) #categoriesSection #categories.categories>.category-card b{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-height:44px!important;
    padding:8px 10px!important;
    font-size:12px!important;
    line-height:1.12!important;
    white-space:normal!important;
  }
  body:not(.admin-body) .hero.hero-ad-host,
  body:not(.admin-body) .hero.hero-ad-host .ad-slide,
  body:not(.admin-body) .hero.hero-ad-host>.ad-carousel{
    min-height:210px!important;
  }
}
