#chatwithus {
  position: fixed;
  bottom: 20px;
  left: 100px;
  padding: 10px;
  background: #fff;
  z-index: 999;
  cursor: pointer;
}

@media only screen and (max-width: 960px) {
  #chatwithus {
    bottom: 1em;
    left: 1em;
  }
}

@keyframes rotateIn {
  from {
    transform: perspective(600px) rotateX(-90deg) translateY(50px);
    opacity: 0;
  }
  to {
    transform: perspective(600px) rotateX(0deg) translateY(0);
    opacity: 1;
  }
}

@keyframes rotateOut {
  from {
    transform: perspective(600px) rotateX(0deg) translateY(0);
    opacity: 1;
  }
  to {
    transform: perspective(600px) rotateX(-90deg) translateY(50px);
    opacity: 0;
  }
}

#danwidget-popup {
  /* Selettore corretto per il popup */
  display: none; /* Assicura che il popup sia nascosto di default */
  position: fixed;
  bottom: 70px;
  left: 30px;
  width: calc(100% - 60px);
  min-width: 250px;
  height: auto;
  background-color: #fff;
  z-index: 9999999999;
  padding: 30px;
  -webkit-box-shadow: 10px 10px 20px 0 rgba(0, 0, 0, 0.2);
  box-shadow: 10px 10px 20px 0 rgba(0, 0, 0, 0.2);
  text-align: center;
  text-transform: none;
  font-size: 1rem;
  transform-origin: bottom center; /* Punto di origine per la rotazione */
  border-radius: 20px;

}

#danwidget-popup.visible {
  display: block;
  animation: rotateIn 0.5s ease-out forwards;
}

#danwidget-popup.hiding {
  animation: rotateOut 0.5s ease-in forwards;
}
@media only screen and (min-width: 700px) {
  #danwidget-popup {
    width: 20vw;
    bottom: 80px;
    left: 80px;
  }
}
#arrow {
  /* Selettore per la freccia esterna al popup */
  position: absolute;
  width: 40px;
  height: 40px;
  top: 100%;
  background-size: cover;
  left: 40px;
}
#danwidget-popup img {
  /* Selettore corretto per l'immagine del popup */
  margin: 0 0 10px 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 100%;
  
}
#danwidget-popup h3 {
  /* Selettore corretto per l'h3 del popup */
  margin: 0 auto;
}

#danwidget-popup .close {
  /* Selettore corretto per il pulsante di chiusura del popup */
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 10px;
  font-weight: bold;
  cursor: pointer;
}

/* Stile per il testo e i link all'interno del popup */
#danwidget-popup,
#danwidget-popup div,
#danwidget-popup h3 {
  text-decoration: none;
}

/* Assicura che il testo del bottone sia bianco e leggibile */
#danwidget-popup .btn {
  color: #ffffff !important;
}
