/* mySIMAN Master C349: fix blank overlays, preserve Footer V1081.
   Six BUTTON popups only. Update Excel C343 is deliberately untouched. */

/* C349: do not create a body-level pseudo-element above nested button popups.
   The old body::after with z-index 2147482999 hid all dialog content in
   #content stacking contexts. Give the individual popup overlay its own solid
   background instead; the original canonical footer remains independently above. */
/* Keep original Footer V1081 interactive and above both the mask and modal. */
html body:has(
  #pspBasePdfModal.is-open,
  #locationMoveModal[aria-hidden="false"],
  #exportModal.show,
  #simanDbrDblModalV500[aria-hidden="false"],
  #simanFloorPlanModalV528[aria-hidden="false"],
  #simanProfilSatkerModalV502[aria-hidden="false"]
) > #simanCanonicalFooterV1081 {
  z-index:2147483646!important;
  pointer-events:auto!important;
  opacity:1!important;
  visibility:visible!important;
}

/* Profile's Full Screen control belongs to the existing Zoom bar, not the
   header row. Its native click handler is preserved when the node is moved. */
html body #simanProfilSatkerModalV502 .siman-profile-head-v502 {
  grid-template-columns:48px minmax(0,1fr) 46px!important;
  grid-template-rows:minmax(0,1fr)!important;
  min-height:74px!important;
  align-content:center!important;
}
html body #simanProfilSatkerModalV502 .profile-zoom-c247 {
  flex:0 0 auto!important;
  position:relative!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  width:100%!important;
  min-height:57px!important;
  padding:9px 14px!important;
  background:#0c2a3c!important;
  border-bottom:1px solid #245675!important;
  overflow-x:auto!important;
  overscroll-behavior-x:contain!important;
  scrollbar-width:thin!important;
}
html body #simanProfilSatkerModalV502 .profile-zoom-c247 > button,
html body #simanProfilSatkerModalV502 .profile-zoom-c247 > .c308-profile-full-button {
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  min-height:38px!important;
  height:38px!important;
  margin:0!important;
  padding:7px 11px!important;
  border:1px solid #2d728b!important;
  border-radius:9px!important;
  background:#10364e!important;
  color:#e6faff!important;
  font:700 12px/1.25 system-ui,"Segoe UI",Arial,sans-serif!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
html body #simanProfilSatkerModalV502 .profile-zoom-c247 > .c308-profile-full-button {
  padding-inline:13px!important;
}
html body #simanProfilSatkerModalV502 .profile-zoom-c247 > output {
  flex:0 0 50px!important;
  min-width:50px!important;
  margin:0!important;
  text-align:center!important;
  font:700 12px/1.25 system-ui,"Segoe UI",Arial,sans-serif!important;
  color:#ecfbff!important;
}

@media(max-width:760px){
  html body #simanProfilSatkerModalV502 .siman-profile-head-v502{
    grid-template-columns:38px minmax(0,1fr) 38px!important;
    min-height:58px!important;
  }
  html body #simanProfilSatkerModalV502 .profile-zoom-c247{
    justify-content:safe center!important;
    gap:5px!important;
    min-height:50px!important;
    padding:7px 8px!important;
  }
  html body #simanProfilSatkerModalV502 .profile-zoom-c247 > button,
  html body #simanProfilSatkerModalV502 .profile-zoom-c247 > .c308-profile-full-button{
    min-height:34px!important;height:34px!important;
    padding:6px 8px!important;font-size:11px!important;
  }
  html body #simanProfilSatkerModalV502 .profile-zoom-c247 > output{flex-basis:42px!important;min-width:42px!important;font-size:11px!important;}
}

/* C349: solid overlay extends through the footer gap, but the dialog's
   available height still reserves the original footer area. No body mask. */
html body :is(
  #pspBasePdfModal,
  #locationMoveModal,
  #exportModal,
  #simanDbrDblModalV500,
  #simanFloorPlanModalV528,
  #simanProfilSatkerModalV502
){
  bottom:0!important;
  padding-bottom:var(--ms345-footer-room,78px)!important;
  background:#061525!important;
}
/* Safety if an older stylesheet remains cached after a deployment. Limit this
   to the moments when one of these button-owned popups is actually open. */
html body:has(
  #pspBasePdfModal.is-open,
  #locationMoveModal[aria-hidden="false"],
  #exportModal.show,
  #simanDbrDblModalV500[aria-hidden="false"],
  #simanFloorPlanModalV528[aria-hidden="false"],
  #simanProfilSatkerModalV502[aria-hidden="false"]
)::after{
  content:none!important;
  display:none!important;
}
/* Footer V1081 remains original and clickable, never a duplicate. */
html body:has(
  #pspBasePdfModal.is-open,
  #locationMoveModal[aria-hidden="false"],
  #exportModal.show,
  #simanDbrDblModalV500[aria-hidden="false"],
  #simanFloorPlanModalV528[aria-hidden="false"],
  #simanProfilSatkerModalV502[aria-hidden="false"]
)>#simanCanonicalFooterV1081{z-index:2147483646!important;pointer-events:auto!important;}
