#floating-chatbot-wrapper {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  z-index: 99998;
  pointer-events: none;
  transform: none !important;
}

#floating-chatbot-wrapper > * {
  pointer-events: auto;
}

/* BOTÓN */
.floating-chatbot-button {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #0A3FA7;
  color: #ffffff;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  padding: 0;
}

.floating-chat-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.chat-text {
  display: block;
  margin-top: 2px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

/* PANEL */
.floating-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 80px;

  width: 380px;
  height: 600px;

  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 120px);

  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);

  display: none;
  flex-direction: column;
}

.floating-chatbot-panel.is-open {
  display: flex;
}

/* CABECERA */
.floating-chatbot-header {
  min-height: 52px;
  padding: 0 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #0A3FA7;
  color: #ffffff;
}

/* CERRAR */
#floating-chatbot-close {
  border: 0;
  background: transparent;
  color: #ffffff;

  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* IFRAME */
.floating-chatbot-panel iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
}

/* Ocultar en home */
body.backendlayout-homepage ~ #floating-chatbot-wrapper {
  display: none !important;
}

/* =========================
   Escritorio
   ========================= */
@media (min-width: 769px) {

  .floating-chatbot-panel{
    right: 40px !important;
  }
}

/* =========================
   TABLET
   ========================= */
@media (max-width: 768px) {

  #floating-chatbot-wrapper {
    right: 16px !important;
    bottom: 16px !important;
  }

  .floating-chatbot-panel {
    width: 360px;
    height: 560px;

    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 110px);

    bottom: 76px;
  }
}

/* =========================
   MÓVIL
   ========================= */
@media (max-width: 576px) {

  #floating-chatbot-wrapper {
    right: 12px !important;
    bottom: 12px !important;
  }

  .floating-chatbot-button {
    width: 58px;
    height: 58px;
  }

  .floating-chat-icon {
    width: 22px;
    height: 22px;
  }

  .chat-text {
    font-size: 12px;
  }

  .floating-chatbot-panel {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 40px !important;
    bottom: 82px;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    border-radius: 12px;
  }

  .floating-chatbot-header {
    min-height: 48px;
    padding: 0 12px;
  }

  #floating-chatbot-close {
    font-size: 26px;
  }
}