/* Custom Chatbot Widget */
#calventis-chatbot-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 2147483647;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #774d8d, #847eb4);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(119, 77, 141, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chatbot-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(119, 77, 141, 0.4);
}

.chatbot-trigger:active {
  transform: translateY(0);
}

.chatbot-trigger::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #774d8d, #847eb4);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.chatbot-trigger img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.chatbot-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.chatbot-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 20px;
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
}

.chatbot-trigger:hover + .chatbot-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #calventis-chatbot-widget {
    bottom: 70px;
    right: 15px;
  }
  
  .chatbot-trigger {
    width: 55px;
    height: 55px;
  }
  
  .chatbot-trigger img {
    width: 28px;
    height: 28px;
  }
  
  .chatbot-tooltip {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Hide Voiceflow greeting message */
.fptyqm0.fptyqm2._15s29m9a {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Hide any elements with these specific classes */
div[class*="fptyqm0"][class*="fptyqm2"][class*="_15s29m9a"],
div[class="fptyqm0 fptyqm2 _15s29m9a"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Hide any greeting elements by content */
div:contains("👋 Hi, wie kann ich Ihnen helfen?"),
div:contains("Hi, wie kann ich Ihnen helfen?") {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Additional fallback selectors */
[data-testid*="greeting"],
[class*="greeting"],
div[style*="position: fixed"][style*="bottom"][style*="right"]:not(#calventis-chatbot-widget) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Chatbot Avatar Styling */
/* Multiple selectors to target Voiceflow chatbot avatar */
.vfrc-avatar,
.vfrc-avatar img,
[data-testid="avatar"],
[data-testid="avatar"] img,
.chatbot-avatar,
.chatbot-avatar img,
.your-chatbot-container .chatbot-avatar-class {
  background-image: url('https://tibyxmobrwazabhbwptm.supabase.co/storage/v1/object/sign/hatimzahir/calventis.jpeg?token=eyJraWQiOiJzdG9yYWdlLXVybC1zaWduaW5nLWtleV8wNjQwOWRiMy1hMGY5LTQ0ZmItYTBkOC1kN2QwMDdiYTMyZDEiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJoYXRpbXphaGlyL2NhbHZlbnRpcy5qcGVnIiwiaWF0IjoxNzU1NDY2NjA4LCJleHAiOjI3MTU0NTcwMDh9.G6seDOfFJSMdvwFfs4eQwikGhZJRc2KZwfnbPbSojig') !important;
  background-size: cover !important;
  width: 50px;
  height: 50px;
  border-radius: 50% !important; /* This makes it a perfect circle */
  border: 2px solid white !important; /* Optional: adds a white border */
}

/* Additional fallback selectors for Voiceflow */
div[class*="avatar"],
img[class*="avatar"],
div[data-testid*="avatar"],
img[data-testid*="avatar"] {
  background-image: url('https://tibyxmobrwazabhbwptm.supabase.co/storage/v1/object/sign/hatimzahir/calventis.jpeg?token=eyJraWQiOiJzdG9yYWdlLXVybC1zaWduaW5nLWtleV8wNjQwOWRiMy1hMGY5LTQ0ZmItYTBkOC1kN2QwMDdiYTMyZDEiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJoYXRpbXphaGlyL2NhbHZlbnRpcy5qcGVnIiwiaWF0IjoxNzU1NDY2NjA4LCJleHAiOjI3MTU0NTcwMDh9.G6seDOfFJSMdvwFfs4eQwikGhZJRc2KZwfnbPbSojig') !important;
  background-size: cover !important;
  border-radius: 50% !important;
  border: 2px solid white !important;
}

/* Force override any existing avatar images */
* img[src*="avatar"],
* img[alt*="avatar"],
* img[alt*="bot"] {
  content: url('https://tibyxmobrwazabhbwptm.supabase.co/storage/v1/object/sign/hatimzahir/calventis.jpeg?token=eyJraWQiOiJzdG9yYWdlLXVybC1zaWduaW5nLWtleV8wNjQwOWRiMy1hMGY5LTQ0ZmItYTBkOC1kN2QwMDdiYTMyZDEiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJoYXRpbXphaGlyL2NhbHZlbnRpcy5qcGVnIiwiaWF0IjoxNzU1NDY2NjA4LCJleHAiOjI3MTU0NTcwMDh9.G6seDOfFJSMdvwFfs4eQwikGhZJRc2KZwfnbPbSojig') !important;
  border-radius: 50% !important;
  border: 2px solid white !important;
}