/* =========================================================
   Chat web (Masivo360) + botón flotante de WhatsApp
   El script del chat crea su propio botón (.xit-widget-bswc-button).
   Aquí solo se le da el estilo del sitio y se ubica junto al de WhatsApp.
   ========================================================= */

/* ---- Botón del chat: mismo tamaño y anillo dorado que WhatsApp ---- */
.xit-widget-bswc-button {
  width: 58px !important;
  height: 58px !important;
  right: 18px !important;
  bottom: 90px !important; /* encima del botón de WhatsApp (18 + 58 + 14) */
  border-radius: 50% !important;
  background-color: #000 !important;
  background-image: url("../assets/chat-icon.svg") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 30px 30px !important;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .6), 0 0 0 2px rgba(211, 170, 70, .55) !important;
  border: 0 !important;
  outline: none !important;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease, visibility .3s ease !important;
}
.xit-widget-bswc-button:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 14px 34px -8px rgba(0, 0, 0, .7), 0 0 0 3px rgba(211, 170, 70, .8) !important;
}
.xit-widget-bswc-button:focus-visible {
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .6), 0 0 0 3px #F6E8B8, 0 0 0 6px rgba(211, 170, 70, .55) !important;
}

/* El panel del chat tapa el botón de WhatsApp: se oculta mientras está abierto */
body.vsa-chat-open .wa-float {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(.85);
}

/* El menú móvil de servicios queda por encima del chat */
body.vsa-panel-open .xit-widget-bswc-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---- Móvil y tablet: el chat flota por encima de la barra inferior ---- */
@media (max-width: 1023px) {
  .xit-widget-bswc-button {
    width: 54px !important;
    height: 54px !important;
    right: 16px !important;
    bottom: calc(84px + env(safe-area-inset-bottom)) !important;
    background-size: 28px 28px !important;
  }
}

/* En pantallas muy bajas (móvil apaisado) se sube un poco más */
@media (max-height: 520px) {
  .xit-widget-bswc-button {
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    width: 50px !important;
    height: 50px !important;
    background-size: 26px 26px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xit-widget-bswc-button { transition: none !important; }
}
