/* WhatsApp-Chat-Widget — Vorlage Stella.Expert, angepasst für Klee Consulting */
#stella-chat-widget {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
#stella-chat-button {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  position: relative;
  display: block;
  transition: transform 0.3s;
  transform-origin: center center;
  margin-top: 10px;
}
#stella-chat-button:hover {
  transform: scale(0.85);
}
#stella-chat-button .stella-wa-btn-img {
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.3s, opacity 0.3s;
  width: 100%;
  height: auto;
}
#stella-chat-button .stella-wa-btn-img-hover {
  position: absolute;
  top: 7px;
  left: 7px;
  background-color: #103928;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  padding: 12px;
  width: 46px;
  height: auto;
  border-radius: 50%;
}
#stella-chat-button.active .stella-wa-btn-img {
  transform: scale(0);
  opacity: 0;
}
#stella-chat-button.active .stella-wa-btn-img-hover {
  transform: scale(1);
  opacity: 1;
}
#stella-chat-button #stella-new-message {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 3px;
  right: 3px;
  background-color: #ff0000;
  border-radius: 50%;
  padding: 2px;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1em;
  z-index: 1;
  width: 22px;
  height: 22px;
  text-align: center;
  opacity: 1;
  transition: opacity 0.3s;
}
#stella-chat-button.active #stella-new-message {
  opacity: 0;
  transition: opacity 0.3s;
}
#stella-chat-bubble {
  display: none;
  animation-duration: 0.5s;
  animation-name: fade-out;
}
#stella-chat-bubble.show {
  display: block;
  animation-name: fade-in;
}
@keyframes fade-in {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
.stella-chat {
  display: flex;
  align-items: flex-end;
}
.stella-chat-img {
  display: flex;
  align-items: flex-end;
  margin-right: 15px;
  border-radius: 50%;
}
.stella-chat-img img {
  border-radius: 50%;
}
.stella-chat-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.3em;
  color: #000000;
  background: #ffffff;
  box-shadow: 0 1px 15px -5px #999;
  padding: 30px 30px 15px 30px;
  border-radius: 30px 30px 30px 0;
  width: 300px;
}
.stella-chat-with-us {
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding: 10px;
  margin: 20px 0 5px 0;
  background-color: #23B33A;
  transition: background-color 0.3s;
  color: rgb(255, 255, 255) !important;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
  border-radius: 30px;
  font-weight: 600;
  align-items: center;
}
.stella-chat-with-us:hover {
  background-color: #1A942B;
  color: #ffffff;
}
.stella-chat-with-us-icon {
  margin: -2px 7px 0 0;
}
.stella-provider {
  font-size: 11px;
  color: #999;
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-top: 5px;
}
.stella-hide-on-mobile {
  margin: 20px 0;
  width: 100%;
  display: block;
}
.stella-hide-on-mobile img {
  margin: 10px auto 0 auto;
  display: block;
}
@media all and (max-width: 480px) {
  #stella-chat-widget { bottom: 20px; right: 20px; }
  .stella-chat-img { display: none; }
  .stella-chat-text { border-radius: 30px 30px 0 30px; }
  .stella-hide-on-mobile { display: none; }
}

/* Ergänzung 3 Plus Solutions:
   Die Vorlage blendet den QR-Block erst unter 480px aus. Dazwischen wird die
   Sprechblase 519px hoch und sprengt auf Tablets und niedrigen Fenstern den
   Viewport. Der QR-Code richtet sich ohnehin an Desktop-Nutzer ohne WhatsApp
   am Rechner — auf Tablet und Handy ist er überflüssig. */
@media all and (max-width: 900px), all and (max-height: 760px) {
  .stella-hide-on-mobile { display: none; }
}

/* Sicherheitsnetz: Blase nie höher als der sichtbare Bereich */
.stella-chat-text {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  box-sizing: border-box;
}
