.whatsappFlotante {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Zona segura amplia e invisible para que el cursor no pierda la interacción al moverse */
.whatsappFlotante::before {
  content: "";
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 350px;
  height: calc(100% + 30px);
  pointer-events: auto;
  z-index: 0;
}

/* ── Botón Circular ── */
.whatsappBtn {
  position: relative;
  z-index: 2;
  width: 62px;
  height: 62px;
  background-color: #82ac42;
  border-radius: 50%;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(78, 165, 38, 0.45);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
  outline: none;
  padding: 0;
}

.whatsappBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
  background-color: #20ba5a;
}

.whatsappBtn svg {
  color: #ffffff;
}

/* ── Popup / Menú Desplegable ── */
.whatsappPopup {
  position: absolute;
  z-index: 2;
  bottom: 74px;
  right: 0;
  width: 310px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(10, 67, 126, 0.2);
  border: 1px solid rgba(10, 67, 126, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
  transform-origin: bottom right;
  transition:
    opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Puente invisible inferior entre el popup y el botón para eliminar cualquier brecha vacía */
.whatsappPopup::after {
  content: "";
  position: absolute;
  bottom: -22px;
  right: 0;
  width: 100%;
  height: 30px;
  pointer-events: auto;
}

/* Mostrar al pasar el cursor o al estar activo */
.whatsappFlotante:hover .whatsappPopup,
.whatsappFlotante.isOpen .whatsappPopup {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ── Cabecera del Popup ── */
.popupHeader {
  background: #0a437e;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  border-radius: 17px 17px 0 0;
}

.headerIcon {
  width: 38px;
  height: 38px;
  background-color: #82ac42;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.headerIcon svg {
  color: #ffffff;
}

.headerTexto h6 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.headerTexto p {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.3;
}

/* ── Lista de Departamentos ── */
.popupOpciones {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.opcionItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  background-color: #ffffff;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.opcionItem:hover {
  background-color: #f4fbf6;
  border-color: #bbf7d0;
  transform: translateX(-2px);
}

.opcionIcon {
  width: 34px;
  height: 34px;
  background-color: #e8f9ee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #82ac42;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.opcionItem:hover .opcionIcon {
  transform: scale(1.1);
  background-color: #82ac42;
  color: #ffffff;
}

.opcionInfo {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.opcionDep {
  font-size: 13.5px;
  font-weight: 700;
  color: #0a437e;
  line-height: 1.25;
}

.opcionContacto {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.opcionArrow {
  color: #94a3b8;
  display: flex;
  align-items: center;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.opcionItem:hover .opcionArrow {
  transform: translateX(3px);
  color: #82ac42;
}

.manual-button {
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  background-color: #0a437e;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.manual-button:hover {
  background-color: #82ac42;
  color: #0a437e;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .whatsappFlotante {
    bottom: 16px;
    right: 16px;
    padding-bottom: 30px;
  }

  .whatsappBtn {
    width: 52px;
    height: 52px;
  }

  .whatsappBtn svg {
    width: 28px;
    height: 28px;
  }

  .whatsappPopup {
    bottom: 64px;
    width: 285px;
    margin-bottom: 30px;
  }

  .popupHeader {
    padding: 14px 16px;
  }

  .opcionItem {
    padding: 9px 10px;
  }
}