/* Pastorelectrico chat. All rules are scoped to this widget and its neighbours. */
#iaChatLauncher, #iaChatOverlay, #iaChatBox, #iaChatClose, #iaChatFrame { box-sizing: border-box; }
#iaChatLauncher {
  position: fixed; right: 22px; bottom: 22px; z-index: 99998; width: 60px; height: 60px;
  padding: 0; border: 0; border-radius: 50%; background: #88ae27; color: #1d2b06;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.28); transition: transform .18s ease; font-size: 26px;
  -webkit-tap-highlight-color: transparent; appearance: none;
}
#iaChatLauncher:hover { transform: scale(1.08); }
#iaChatLauncher:focus-visible { outline: 2px solid #1d2b06; outline-offset: 3px; }
#iaChatLauncher[hidden], #iaChatOverlay[hidden], #iaChatOverlay:not([open]) { display: none; }
#iaChatOverlay {
  position: fixed; inset: 0; z-index: 99999; margin: 0; border: 0;
  width: 100%; height: 100%; max-width: none; max-height: none; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 20px 20px;
  overflow: hidden; overscroll-behavior: contain;
}
#iaChatOverlay::backdrop { background: transparent; }
#iaChatBox {
  position: relative; width: 395px; max-width: calc(100vw - 32px); height: 560px;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.4); background: #50831a;
}
#iaChatFrame { width: 100%; height: 100%; border: 0; display: block; }
#iaChatClose {
  position: absolute; top: 7px; right: 9px; z-index: 2; background: transparent; border: 0;
  color: #fff; font: 400 27px/1 Arial, sans-serif; cursor: pointer; opacity: .75; padding: 4px 8px;
  border-radius: 0; box-shadow: none; appearance: none;
}
#iaChatClose:hover, #iaChatClose:focus-visible { opacity: 1; }
#iaChatClose:focus-visible { outline: 2px solid #fff; outline-offset: -1px; }
#iaChatBox .pe-ia-chat-guard { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Keep the exact launcher position and preserve both existing links. */
.pe-ia-chat-ready .whatsapp-float { right: 94px; }
.pe-ia-chat-ready #totop { bottom: 94px; right: 32px; }
@media (max-width: 560px) {
  #iaChatOverlay { padding: 0; align-items: stretch; justify-content: stretch; }
  #iaChatBox { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; }
  #iaChatClose { top: max(7px, env(safe-area-inset-top)); right: max(9px, env(safe-area-inset-right)); }
  .pe-ia-chat-ready .whatsapp-float { max-width: calc(100vw - 106px); }
  .pe-ia-chat-ready .whatsapp-icon { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) { #iaChatLauncher { transition: none; } }
