/* LEVIX WHATSAPP — SENTINELA 2026-11-06
 * Scoped adjustments for all rotating balloon microcopies.
 * Adaptive content-hug width and balanced padding; close-button safety; no ellipsis.
 * Keep WhatsApp intent/actions, state engine and native bubble SVG untouched.
 */
body #wp-balloon{
  box-sizing:border-box!important;
  width:max-content!important;
  min-width:0!important;
  max-width:min(310px,calc(100vw - 40px))!important;
  padding:12px 32px 11px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:visible!important;
}
body #wp-balloon #wp-balloon-text,
body #wp-balloon #wp-balloon-sub{
  box-sizing:border-box!important;
  display:block!important;
  position:relative!important;
  z-index:2!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0!important;
  padding-inline:0!important;
  margin-inline:0!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  hyphens:none!important;
  text-overflow:clip!important;
  text-wrap:balance!important;
}
body #wp-balloon #wp-balloon-text{
  font-size:12px!important;
  line-height:1.24!important;
}
body #wp-balloon #wp-balloon-sub{
  font-size:11px!important;
  line-height:1.35!important;
  margin-top:4px!important;
}
body #wp-balloon #wp-balloon-close{
  box-sizing:border-box!important;
  position:absolute!important;
  top:-16px!important;
  right:-15px!important;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  z-index:110!important;
  transform:none;
}
body #wp-balloon #wp-balloon-close:focus-visible{
  outline:3px solid #00CED1!important;
  outline-offset:2px!important;
}
@media (max-width:639px){
  body #wp-balloon{
    right:max(22px,env(safe-area-inset-right))!important;
    width:max-content!important;
    max-width:min(306px,calc(100vw - 40px))!important;
    padding:13px 34px 12px!important;
  }
  body #wp-balloon #wp-balloon-close{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    top:-18px!important;
    right:-17px!important;
    touch-action:manipulation!important;
  }
  body #wp-balloon #wp-balloon-sub{
    font-size:11.2px!important;
    line-height:1.35!important;
  }
}
@media (max-width:340px){
  body #wp-balloon #wp-balloon-text{font-size:11.5px!important;}
  body #wp-balloon #wp-balloon-sub{font-size:10.8px!important;}
}


/* LEVIX MICROCELULA SVG SAFETY / Content Hug 2026-11-06.
   Real browser: original SVG was position:static and consumed 82px of
   layout (measured total height 160px for small copy).
   Do not place the SVG in flex flow: one surface per message, sized with the body.
   The browser still maintains the original JS shape/path and close behavior. */
body #wp-balloon {
  position:fixed!important;
  width:max-content!important;
  min-width:0!important;
  max-width:min(310px,calc(100vw - 38px))!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  padding:12px 32px 11px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  isolation:isolate!important;
}
body #wp-balloon > svg.wp-balloon-surface {
  position:absolute!important;
  display:block!important;
  left:0!important;
  top:0!important;
  width:100%!important;
  height:calc(100% + var(--wp-tail-h,10px))!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  overflow:visible!important;
  pointer-events:none!important;
  z-index:0!important;
  flex:none!important;
}
body #wp-balloon > #wp-balloon-text,
body #wp-balloon > #wp-balloon-sub {
  position:relative!important;
  z-index:2!important;
  display:block!important;
  box-sizing:border-box!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  overflow-wrap:break-word!important;
  white-space:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  text-align:center!important;
  text-wrap:balance!important;
}
body #wp-balloon > #wp-balloon-sub {margin-top:0!important;}
body #wp-balloon > #wp-balloon-close {
  position:absolute!important;
  top:-16px!important;
  right:-15px!important;
  z-index:105!important;
}
@media(max-width:639px){
  body #wp-balloon {
    max-width:min(306px,calc(100vw - 38px))!important;
    padding:13px 34px 12px!important;
    right:max(22px,env(safe-area-inset-right))!important;
  }
  body #wp-balloon > #wp-balloon-close {
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    top:-18px!important;
    right:-17px!important;
  }
}

html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]){
  box-sizing:border-box!important;
  position:fixed!important;
  width:max-content!important;
  min-width:0!important;
  max-width:min(310px,calc(100vw - 40px))!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:12px 32px 11px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  background:transparent!important;
  border:0!important;
  border-radius:18px!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  overflow:visible!important;
  isolation:isolate!important;
}
html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > svg.wp-balloon-surface{
  position:absolute!important;
  left:0!important;
  top:0!important;
  display:block!important;
  width:100%!important;
  height:calc(100% + var(--wp-tail-h,10px))!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  pointer-events:none!important;
  overflow:visible!important;
  flex:none!important;
  z-index:0!important;
}
html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > #wp-balloon-text,
html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > #wp-balloon-sub{
  box-sizing:border-box!important;
  position:relative!important;
  z-index:2!important;
  display:block!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  white-space:normal!important;
  text-wrap:balance!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  hyphens:none!important;
  text-align:center!important;
  align-self:center!important;
}
html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > #wp-balloon-text{
  font-size:12px!important;
  line-height:1.24!important;
}
html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > #wp-balloon-sub{
  font-size:11.2px!important;
  line-height:1.35!important;
}
html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > #wp-balloon-close{
  position:absolute!important;
  top:-16px!important;
  right:-15px!important;
  z-index:105!important;
}
@media(max-width:639px){
 html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]){
   right:max(22px,env(safe-area-inset-right))!important;
   width:max-content!important;
   max-width:min(306px,calc(100vw - 40px))!important;
   padding:13px 34px 12px!important;
 }
 html body:not(.modal-active-hide-wp) #wp-balloon:not([hidden]) > #wp-balloon-close{
   width:44px!important;
   min-width:44px!important;
   height:44px!important;
   min-height:44px!important;
   top:-18px!important;
   right:-17px!important;
 }
}

