/* CHEQ inner-page compact header · 2026-11-08
 * Layout-only repair: no payment, KYC, wallet, admin, or session changes.
 * Gold SIP (separate embedded page) and dark Gift Card artwork are untouched.
 */

/* Older responsive rules were forcing an empty sticky site header back
   onto every signed-in service page. Keep the one CHEQ brand inside its panel. */
body:has(#dashboard.show) main.w > header.top,
body:has(#servicePanel.show) main.w > header.top,
body:has(#demoPay.show) main.w > header.top,
body:has(#kycPanel.show) main.w > header.top {
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}

/* Remove the additional outer header slot and ~24px panel top offset. */
body:has(#dashboard.show) main.w,
body:has(#servicePanel.show) main.w,
body:has(#demoPay.show) main.w,
body:has(#kycPanel.show) main.w {
  padding-top:0!important;
}

/* The full-screen Gift Card design intentionally keeps its own layout. */
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show {
  position:relative!important;
  box-sizing:border-box!important;
  min-height:0!important;
  margin-top:5px!important;
  margin-bottom:12px!important;
  padding-top:10px!important;
}

/* Center the existing Admin-uploaded CHEQ logo. The back button no longer
   consumes a separate vertical row under that logo. */
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > .cheqServiceBrand {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  height:56px!important;
  min-height:56px!important;
  max-height:56px!important;
  margin:0 auto 9px!important;
  padding:0 50px!important;
  position:relative!important;
  width:100%!important;
}
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > .cheqServiceBrand .cheqServiceUploadedLogo {
  height:54px!important;
  max-height:54px!important;
  width:min(210px,52vw)!important;
  max-width:100%!important;
  object-fit:contain!important;
  margin:0 auto!important;
}
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > .cheqServiceBrand .cheqServiceBrandFallback {
  font-size:22px!important;
  line-height:1.2!important;
  margin:0!important;
}
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > button.back {
  position:absolute!important;
  left:15px!important;
  top:16px!important;
  z-index:12!important;
  box-sizing:border-box!important;
  width:42px!important;
  height:42px!important;
  min-height:42px!important;
  min-width:42px!important;
  margin:0!important;
  padding:0!important;
  border-radius:13px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:0!important;
}

/* Hide the old duplicate title only on services with a prominent in-form
   branded hero; the original page title stays on History, Support, Profile, etc. */
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show:has(#fields .rentPremiumHero) > h2,
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show:has(#fields .rentPremiumHero) > p,
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show:has(#fields .cheqPremiumLead) > h2,
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show:has(#fields .cheqPremiumLead) > p {
  display:none!important;
}
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > h2 {
  margin-top:8px!important;
  margin-bottom:7px!important;
  padding-top:0!important;
  padding-bottom:0!important;
}
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > p {
  margin-top:0!important;
  margin-bottom:11px!important;
}
body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > #fields {
  margin-top:0!important;
}

/* Apply the same blank-header removal to the review and KYC screens without
   modifying their forms, verification gates, or identity controls. */
body:has(#demoPay.show) #demoPay.show,
body:has(#kycPanel.show) #kycPanel.show {
  margin-top:5px!important;
  min-height:0!important;
}

/* Keep the customer-support action accessible but stop the large floating
   Live Chat pill from hiding mobile bill cards, step inputs and banners. */
@media(max-width:650px) {
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show {
    margin-top:4px!important;
    margin-bottom:10px!important;
    padding-top:9px!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > .cheqServiceBrand {
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    margin-bottom:8px!important;
    padding-left:45px!important;
    padding-right:45px!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > .cheqServiceBrand .cheqServiceUploadedLogo {
    height:49px!important;
    max-height:49px!important;
    width:min(197px,50vw)!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) #servicePanel.show > button.back {
    left:12px!important;
    top:14px!important;
    height:40px!important;
    min-height:40px!important;
    width:40px!important;
    min-width:40px!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) .chatFloat,
  body:has(#demoPay.show) .chatFloat,
  body:has(#kycPanel.show) .chatFloat {
    position:fixed!important;
    right:12px!important;
    bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;
    z-index:60!important;
    width:48px!important;
    height:48px!important;
    left:auto!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) .chatFloat .chatBtn,
  body:has(#demoPay.show) .chatFloat .chatBtn,
  body:has(#kycPanel.show) .chatFloat .chatBtn {
    box-sizing:border-box!important;
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    border-radius:50%!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0!important;
    gap:0!important;
    font-size:0!important;
    line-height:0!important;
    white-space:nowrap!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) .chatFloat .chatBtn svg,
  body:has(#demoPay.show) .chatFloat .chatBtn svg,
  body:has(#kycPanel.show) .chatFloat .chatBtn svg {
    display:block!important;
    width:24px!important;
    height:24px!important;
    color:#fff!important;
  }
  body:has(#servicePanel.show):not(:has(.cheqGiftPage)) .chatBox,
  body:has(#demoPay.show) .chatBox,
  body:has(#kycPanel.show) .chatBox {
    max-height:min(64dvh,530px)!important;
    overflow-y:auto!important;
    right:12px!important;
    bottom:calc(132px + env(safe-area-inset-bottom,0px))!important;
  }
}
