/* BantuSocial v2.35.5 — Explore / reaction / rental / marketplace precision repair
   Loaded last. Keep fixes local and deterministic so older theme layers cannot win. */

/* ---------- Guest BantuExplore: never render product UI as browser defaults ---------- */
body:not(.bantusphere) .bx-shell,
body:not(.bantusphere) .zi-shell{
  --bs-surface:#0c1729;
  --bs-surface-2:#111e33;
  --bs-border:rgba(139,156,203,.16);
  --bs-text:#f4f7ff;
  --bs-muted:#91a2c1;
  color:#f4f7ff!important;
  width:min(1440px,calc(100% - 28px))!important;
  max-width:1440px!important;
  margin:0 auto!important;
  box-sizing:border-box!important;
}
body:not(.bantusphere) .bx-shell *,body:not(.bantusphere) .zi-shell *{box-sizing:border-box!important}
body:not(.bantusphere) .bx-shell a:not(.btn),body:not(.bantusphere) .zi-shell a:not(.btn){color:inherit}
body:not(.bantusphere) .bx-shell input,
body:not(.bantusphere) .bx-shell select,
body:not(.bantusphere) .bx-shell textarea,
body:not(.bantusphere) .bx-shell button{font:inherit}
body:not(.bantusphere) .bx-card,
body:not(.bantusphere) .bx-filter-card,
body:not(.bantusphere) .bx-listing-card,
body:not(.bantusphere) .zi-event-card{background:#0d182b!important;color:#f5f7ff!important;border-color:rgba(139,156,203,.16)!important}
body:not(.bantusphere) .bx-shell img{max-width:100%;height:auto}
body:not(.bantusphere) .bx-listing-image,
body:not(.bantusphere) .bx-card-media{overflow:hidden!important}
@media(max-width:767px){
  body:not(.bantusphere) .bx-shell,body:not(.bantusphere) .zi-shell{width:100%!important;padding-inline:12px!important}
}

/* ---------- Reactions: tray wins the stacking contest and closes cleanly ---------- */
.reactions-wrapper.bs-reaction-open{position:relative!important;z-index:2147483200!important;isolation:isolate!important}
.reactions-wrapper.bs-reaction-open>.reactions-container{
  z-index:2147483640!important;
  pointer-events:auto!important;
  isolation:isolate!important;
}
.post-actions,.lightbox-post .post-actions{overflow:visible!important}
.post-actions>.action-btn,.post-actions>.post-action,.post-actions .js_share,
.lightbox-post .post-actions>.action-btn,.lightbox-post .post-actions .js_share{
  position:relative;z-index:1!important
}
.post-actions .reactions-wrapper.bs-reaction-open{z-index:2147483200!important}
@media(max-width:969px){
  .reactions-wrapper.bs-reaction-open>.reactions-container{
    position:fixed!important;
    max-width:calc(100vw - 18px)!important;
    width:max-content!important;
    min-width:0!important;
    margin:0!important;
    overflow:visible!important;
    transform:none!important;
  }
  .reactions-wrapper.bs-reaction-open>.reactions-container [class*="js_react-"],
  .reactions-wrapper.bs-reaction-open>.reactions-container .emoji{pointer-events:auto!important;z-index:2!important}
}

/* ---------- Photo / post lightbox: stable comment composer + image ---------- */
.lightbox .comment,.lightbox-post .comment{min-width:0!important}
.lightbox .comment-avatar,.lightbox-post .comment-avatar{
  float:none!important;width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;
  flex:0 0 38px!important;overflow:hidden!important;border-radius:50%!important;position:relative!important
}
.lightbox .comment-avatar-picture,.lightbox-post .comment-avatar-picture{
  display:block!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;
  max-width:38px!important;padding:0!important;border-radius:50%!important;background-size:cover!important;background-position:center!important
}
.lightbox .comment-data,.lightbox-post .comment-data{min-width:0!important;flex:1 1 auto!important;margin-left:10px!important}
.lightbox .lightbox-preview img,.lightbox .lightbox-media img,.lightbox img[data-lightbox-image]{max-width:100%!important;max-height:100%!important;object-fit:contain!important}

/* ---------- Listing detail: Connected + Contact remain in the LEFT content column ---------- */
.bx-place-layout-v2>main .bx-left-trust-grid{
  display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr)!important;
  gap:14px!important;width:100%!important;max-width:100%!important;margin:0!important;align-items:stretch!important
}
.bx-place-layout-v2>main .bx-left-trust-grid>.bx-card{min-width:0!important;width:100%!important;margin:0!important;height:100%!important}
.bx-place-layout-v2>main .bx-left-trust-grid .bx-connected-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:767px){
  .bx-place-layout-v2>main .bx-left-trust-grid{grid-template-columns:1fr!important;gap:10px!important}
  .bx-place-layout-v2>main .bx-left-trust-grid .bx-connected-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ---------- Rental mobile: no gallery/text overlap; stats stay on one plane ---------- */
@media(max-width:767px){
  .bx-gallery,.bx-gallery-v2,.bx-gallery-shell{position:relative!important;z-index:1!important;clear:both!important;margin-bottom:12px!important;overflow:hidden!important}
  .bx-place-layout-v2{position:relative!important;z-index:2!important;clear:both!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  .bx-place-layout-v2>main,.bx-place-layout-v2>aside,.bx-about-card,.bx-overview-rental,.bx-description,
  .bx-type-rental,.bx-rental-details,.bx-rental-facts-rail{position:relative!important;min-width:0!important;max-width:100%!important;clear:both!important}
  .bx-description{display:block!important;z-index:1!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .bx-rental-facts-rail{overflow-x:auto!important;overflow-y:hidden!important}
}
@media(max-width:600px){
  .bx-rental-public-stats{
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;align-items:stretch!important;width:100%!important
  }
  .bx-rental-public-stats>span,.bx-rental-public-stats>em{
    grid-column:auto!important;min-width:0!important;width:auto!important;margin:0!important;padding:6px 3px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;border-radius:8px!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:center!important
  }
  .bx-rental-public-stats>span{flex-direction:column!important}
  .bx-rental-public-stats>span i{display:none!important}
  .bx-rental-public-stats>span b{font-size:10px!important;line-height:1!important}
  .bx-rental-public-stats>span small,.bx-rental-public-stats>em{font-size:6.8px!important;line-height:1.1!important;letter-spacing:0!important}
}

/* ---------- Add transport: deterministic segmented No / Yes ---------- */
.bx-ride-addon .bx-ride-check.bx-compact-choice{
  display:grid!important;grid-template-columns:minmax(0,1fr) 118px!important;align-items:center!important;gap:14px!important;
  width:100%!important;max-width:100%!important;margin:0!important;padding:12px!important;overflow:hidden!important
}
.bx-ride-addon .bx-choice-copy{display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;column-gap:10px!important;align-items:center!important;min-width:0!important}
.bx-ride-addon .bx-choice-copy>i{grid-row:1/3!important;width:32px!important;height:32px!important;display:grid!important;place-items:center!important;margin:0!important}
.bx-ride-addon .bx-choice-copy>strong,.bx-ride-addon .bx-choice-copy>small{grid-column:2!important;min-width:0!important;margin:0!important}
.bx-ride-addon .bx-choice-copy>small{white-space:normal!important;overflow-wrap:anywhere!important}
.bx-ride-addon .bx-yesno-state{
  display:grid!important;grid-template-columns:1fr 1fr!important;width:118px!important;min-width:118px!important;height:38px!important;
  align-items:stretch!important;padding:3px!important;margin:0!important;justify-self:end!important;border-radius:11px!important
}
.bx-ride-addon .bx-yesno-state b{display:grid!important;place-items:center!important;min-width:0!important;padding:0 7px!important;border-radius:8px!important}
@media(max-width:520px){
  .bx-ride-addon .bx-ride-check.bx-compact-choice{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  .bx-ride-addon .bx-yesno-state{width:100%!important;min-width:0!important;justify-self:stretch!important}
}

/* ---------- More from host: one native rail, full width, mouse/touch scroll ---------- */
.bx-more-host-full{overflow:hidden!important;contain:none!important;transform:none!important}
.bx-more-host-full .bx-related-rail{
  display:flex!important;flex-flow:row nowrap!important;gap:12px!important;overflow-x:auto!important;overflow-y:hidden!important;
  width:100%!important;max-width:100%!important;scroll-snap-type:x proximity!important;scroll-behavior:smooth!important;
  -webkit-overflow-scrolling:touch!important;touch-action:pan-x!important;overscroll-behavior-inline:contain!important;
  pointer-events:auto!important;transform:none!important;contain:none!important;padding:2px 2px 12px!important
}
.bx-more-host-full .bx-related-card{pointer-events:auto!important;flex:0 0 min(270px,78vw)!important;min-width:min(270px,78vw)!important;scroll-snap-align:start!important}
.bx-more-host-full .bx-rail-controls button{position:relative!important;z-index:4!important;pointer-events:auto!important}

/* ---------- Marketplace: ~20% smaller desktop footprint, clean media and arrow ---------- */
.bs-market-product-cell{min-width:0!important}
.bs-market-product-cell .product{height:100%!important;border-radius:15px!important;overflow:hidden!important;border:1px solid rgba(128,148,205,.14)!important;box-shadow:0 8px 24px rgba(0,0,0,.12)!important;transition:transform .18s ease,border-color .18s ease!important}
.bs-market-product-cell .product:hover{transform:translateY(-2px)!important;border-color:rgba(139,92,246,.35)!important}
.bs-market-product-cell .product-image{display:block!important;width:100%!important;aspect-ratio:5/4!important;height:auto!important;overflow:hidden!important;background:#0c1526!important}
.bs-market-product-cell .product-image img,.bs-market-product-cell .bs-market-product-image{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
.bs-market-product-cell .product-info{position:relative!important;min-height:112px!important;padding:12px 48px 12px 12px!important}
.bs-market-product-cell .product-info h2{font-size:14px!important;line-height:1.25!important;margin:0 0 6px!important}
.bs-market-product-cell .product-info .price{font-size:13px!important;font-weight:850!important}
.bs-market-product-cell .product-info .ele_post_prod_shead,.bs-market-product-cell .product-meta{font-size:10px!important}
.bs-market-product-cell .bs-product-card-arrow{
  position:absolute!important;right:10px!important;top:12px!important;bottom:auto!important;left:auto!important;
  width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;border-radius:10px!important;
  display:grid!important;place-items:center!important;transform:none!important;margin:0!important
}
.bs-market-product-cell .bs-product-card-arrow svg{width:16px!important;height:16px!important}
@media(min-width:1200px){
  .bs-market-product-cell{flex:0 0 20%!important;max-width:20%!important;width:20%!important;padding-left:7px!important;padding-right:7px!important}
}
@media(min-width:992px) and (max-width:1199px){.bs-market-product-cell{flex:0 0 25%!important;max-width:25%!important;width:25%!important}}
@media(max-width:575px){
  .bs-market-product-cell{padding-left:5px!important;padding-right:5px!important}
  .bs-market-product-cell .product-info{min-height:102px!important;padding:10px 39px 10px 10px!important}
  .bs-market-product-cell .product-info h2{font-size:12px!important}
  .bs-market-product-cell .bs-product-card-arrow{width:30px!important;height:30px!important;right:7px!important;top:9px!important}
}

/* ---------- ZiwaPhi: cards can never exceed the mobile viewport ---------- */
@media(max-width:767px){
  .zi-event-detail-hero,.zi-detail-grid,.zi-detail-grid>main,.zi-detail-grid>aside,.zi-detail-grid .bx-card,
  .zi-event-card,.zi-card,.zi-ticket-pass,.zi-ticket-carousel,.z19-lineup,.z19-scroll,.z19-promo{
    min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important
  }
  .zi-detail-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  .zi-event-detail-hero{overflow:hidden!important;padding:18px 14px!important;background-position:center!important}
  .zi-detail-chips{display:flex!important;flex-wrap:wrap!important;gap:5px!important;min-width:0!important}
  .zi-detail-chips>*{min-width:0!important;max-width:100%!important;white-space:normal!important}
  .z19-lineup{padding:12px!important;overflow:hidden!important}
  .z19-scroll{width:100%!important;max-width:100%!important}
  .z19-card{flex:0 0 82%!important;width:82%!important;min-width:82%!important;max-width:82%!important}
  .zi-ticket-pass-copy,.zi-ticket-ref,.zi-vibe-row,.zi-vibe-row>div{min-width:0!important;overflow-wrap:anywhere!important}
}

/* ---------- Trending: exactly one leading hash; never manufacture a second row ---------- */
.z19-trend{white-space:nowrap!important}

/* ---------- Friends/followers avatar insurance ---------- */
.bs-people-grid img,.bs-person-card img,.profile-friends img,.friends-list img,
[data-profile-people] img{border-radius:50%!important;aspect-ratio:1/1!important;object-fit:cover!important;object-position:center!important}
