/* IPCH WhatsApp floating: burbuja + botón circular + pulso */

.ipch-wafw-dock{
  display:grid;
  gap:12px;
  justify-items:end;
  align-content:end;
  pointer-events:none;
  overflow:visible;
}

.ipch-wafw-dock--floating{
  --ipch-wafw-btn: 60px;
  --ipch-wafw-appear-delay: 5s;
  --ipch-wafw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  position:fixed;
  z-index:99999;
  left:auto;
  right:max(var(--ipch-wafw-side,32px), env(safe-area-inset-right));
  bottom:max(var(--ipch-wafw-bottom,16px), env(safe-area-inset-bottom));
  overflow:visible;
}

.ipch-wafw-dock--floating .ipch-wafw-bubble{
  margin-right:0;
}

.ipch-wafw-bubble{
  pointer-events:auto;
  max-width:min(260px, 84vw);
  background:#ffffff;
  color:#26313d;
  border:1px solid rgba(18,34,51,.1);
  border-radius:12px;
  padding:10px 16px;
  font:600 13px/1.35 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  white-space:nowrap;
  box-shadow:0 8px 48px rgba(0,0,0,.15);
  position:relative;
}

.ipch-wafw-dock--floating .ipch-wafw-bubble{
  opacity:0;
  transform:translateX(10px);
  transition:var(--ipch-wafw-transition);
  pointer-events:none;
  animation:ipchWafwBubbleIn .45s ease var(--ipch-wafw-appear-delay) forwards;
}

.ipch-wafw-bubble__inner{
  display:flex;
  align-items:center;
  gap:8px;
}

.ipch-wafw-bubble__emoji{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  line-height:1;
}

.ipch-wafw-bubble__label{
  flex:1 1 auto;
  min-width:0;
}

.ipch-wafw-bubble::after{
  content:"";
  position:absolute;
  right:16px;
  bottom:-6px;
  width:12px;
  height:12px;
  background:#ffffff;
  transform:rotate(45deg);
  box-shadow:2px 2px 4px rgba(0,0,0,.05);
}

.ipch-wafw-dock--floating:hover .ipch-wafw-bubble,
.ipch-wafw-dock--floating:focus-within .ipch-wafw-bubble{
  opacity:1;
  transform:translateX(0);
}

@keyframes ipchWafwBubbleIn{
  0%{ opacity:0; transform:translateX(10px); }
  100%{ opacity:1; transform:translateX(0); }
}

/* Contenedor botón */
.ipch-wafw-stack{
  display:flex;
  justify-content:flex-end;
  align-items:flex-end;
  pointer-events:none;
  overflow:visible;
  position:relative;
}

.ipch-wafw-pulse{
  position:absolute;
  inset:-4px;
  border-radius:50%;
  border:2px solid rgba(37,211,102,.5);
  box-shadow:0 0 0 1px rgba(37,211,102,.12), 0 0 22px rgba(37,211,102,.28);
  animation:ipchWafwPulse 2s infinite;
  pointer-events:none;
  z-index:0;
}

@keyframes ipchWafwPulse{
  0%{ transform:scale(1); opacity:1; }
  100%{ transform:scale(1.5); opacity:0; }
}

@keyframes ipchWafwButtonPulse{
  0%{
    box-shadow:
      0 4px 24px rgba(37,211,102,.5),
      0 0 0 0 rgba(37,211,102,.5),
      0 0 0 0 rgba(37,211,102,.32);
  }
  70%{
    box-shadow:
      0 4px 24px rgba(37,211,102,.5),
      0 0 0 14px rgba(37,211,102,0),
      0 0 0 28px rgba(37,211,102,0);
  }
  100%{
    box-shadow:
      0 4px 24px rgba(37,211,102,.5),
      0 0 0 0 rgba(37,211,102,0),
      0 0 0 0 rgba(37,211,102,0);
  }
}

/* Botón circular flotante (WhatsApp) */
.ipch-wafw--round{
  position:relative;
  z-index:2;
  justify-self:end !important;
  align-self:end !important;
  pointer-events:auto;

  width:var(--ipch-wafw-btn);
  height:var(--ipch-wafw-btn);
  min-width:var(--ipch-wafw-btn);
  padding:0;
  margin:0;
  border-radius:50%;
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background:linear-gradient(135deg, #25d366, #128c7e);
  box-shadow:0 4px 24px rgba(37,211,102,.5);

  color:#ffffff;
  text-decoration:none;
  transform:translateZ(0);
  will-change:transform;
  -webkit-tap-highlight-color:transparent;
  transition:var(--ipch-wafw-transition);
  animation:ipchWafwButtonPulse 2s infinite;
  overflow:visible !important;
}

.ipch-wafw--round::before{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:50%;
  border:2px solid rgba(37,211,102,.35);
  box-shadow:0 0 22px rgba(37,211,102,.22);
  animation:ipchWafwPulse 2s infinite 1s;
  pointer-events:none;
  z-index:0;
}

.ipch-wafw--round,
.ipch-wafw--round:visited,
.ipch-wafw--round:hover,
.ipch-wafw--round:focus,
.ipch-wafw--round:active{
  color:#ffffff !important;
  background:linear-gradient(135deg, #25d366, #128c7e) !important;
}

.ipch-wafw--round .ipch-wafw__svg,
.ipch-wafw--round .ipch-wafw__svg *{
  fill:currentColor !important;
}

.ipch-wafw--round:focus-visible{
  outline:3px solid rgba(255,255,255,.92);
  outline-offset:3px;
}

.ipch-wafw__glyph{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  filter:none;
}

.ipch-wafw__badge{
  position:absolute;
  top:2px;
  right:2px;
  z-index:4;
  width:14px;
  height:14px;
  padding:0;
  border-radius:50%;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font:700 8px/1 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#fff;
  background:#ff4757;
  border:2px solid #fff;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
}

.ipch-wafw__badge--entrance{
  transform:none;
}

@media (hover:hover){
  .ipch-wafw--round:hover{
    transform:scale(1.1);
    box-shadow:
      0 8px 36px rgba(37,211,102,.6),
      0 0 0 12px rgba(37,211,102,.12);
    filter:none;
  }
}

/* Pastilla (shortcode / inline) */
.ipch-wafw--inline{
  --ipch-wafw-bg:#25d366;
  --ipch-wafw-bg2:#11b251;
  --ipch-wafw-bg3:#0c9744;
  --ipch-wafw-shadow:
    0 20px 45px rgba(2,22,10,.32),
    0 8px 18px rgba(2,22,10,.18);

  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  gap:11px;
  padding:12px 15px 12px 12px;
  border-radius:999px;
  text-decoration:none;
  color:#042414;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.26), rgba(255,255,255,0) 36%),
    linear-gradient(145deg,var(--ipch-wafw-bg),var(--ipch-wafw-bg2) 58%,var(--ipch-wafw-bg3));
  border:1px solid rgba(0,0,0,.08);
  box-shadow:var(--ipch-wafw-shadow);
  transform:translateZ(0);
  will-change:transform;
  -webkit-tap-highlight-color:transparent;
  transition:transform .24s ease, box-shadow .28s ease, filter .24s ease;
}

.ipch-wafw--inline:focus-visible{
  outline:3px solid rgba(255,255,255,.94);
  outline-offset:3px;
}

.ipch-wafw__icon{
  width:47px;
  height:47px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,255,250,.94));
  color:#0a2d1a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 10px 18px rgba(2,24,12,.19);
  flex:0 0 auto;
}

.ipch-wafw__text{
  font:900 14px/1 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing:.22px;
  color:rgba(255,255,255,.96);
  text-shadow:0 1px 0 rgba(0,0,0,.18);
  white-space:nowrap;
  padding-right:5px;
}

.ipch-wafw-dock--inline{
  gap:12px;
}

.ipch-wafw-dock--inline .ipch-wafw-bubble{
  margin-right:0;
}

@media (hover:hover){
  .ipch-wafw--inline:hover{
    transform:translateY(-3px) scale(1.01);
    box-shadow:
      0 26px 52px rgba(2,22,10,.38),
      0 10px 20px rgba(2,22,10,.22);
    filter:saturate(1.04);
  }
}

@media (max-width:860px){
  .ipch-wafw-dock--floating{
    --ipch-wafw-side:16px;
    --ipch-wafw-bottom:20px;
    right:max(var(--ipch-wafw-side), env(safe-area-inset-right));
    bottom:max(var(--ipch-wafw-bottom), env(safe-area-inset-bottom));
    --ipch-wafw-btn: 54px;
  }
  .ipch-wafw-bubble{
    max-width:min(240px, 88vw);
    font-size:13px;
  }
}

@media (max-width:520px){
  .ipch-wafw-dock{ gap:18px; }
  .ipch-wafw-dock--floating{
    --ipch-wafw-btn: 54px;
  }
  .ipch-wafw-dock--floating .ipch-wafw-bubble{
    display:block !important;
    max-width:min(230px, calc(100vw - 32px));
    white-space:normal;
    text-align:left;
  }
}

@media (prefers-reduced-motion:reduce){
  .ipch-wafw--round,
  .ipch-wafw--inline{
    transition:none;
  }
  .ipch-wafw-bubble{ transition:none !important; }
  .ipch-wafw-dock--floating .ipch-wafw-bubble{
    animation:none !important;
    opacity:1 !important;
    transform:none !important;
  }
  .ipch-wafw__badge--entrance{
    transform:none !important;
  }
  .ipch-wafw-pulse,
  .ipch-wafw--round,
  .ipch-wafw--round::before{
    animation:none !important;
  }
  .ipch-wafw-pulse,
  .ipch-wafw--round::before{
    opacity:0 !important;
    visibility:hidden !important;
  }
}
