#custom-chatbot-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: "Inter", Arial, sans-serif;
}

/* Toggle Button */
#custom-chatbot-wrapper .chatbot-toggle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgb(255, 255, 255);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #111;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

#custom-chatbot-wrapper .chatbot-toggle:hover {
  transform: translateY(-2px) scale(1.07);
  box-shadow: 0 15px 35px rgba(0, 115, 170, 0.4);
}

#custom-chatbot-wrapper .chatbot-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Chat Window */
#custom-chatbot {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

#custom-chatbot:not(.cc-hidden) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
#custom-chatbot .cc-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #0073aa, #00bcd4);
  color: #fff;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.3px;
}

#custom-chatbot .cc-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#custom-chatbot .cc-close:hover {
  transform: rotate(90deg);
}

/* Messages */
#custom-chatbot .cc-messages {
  height: 300px;
  overflow-y: auto;
  padding: 14px;
  background: rgba(249, 250, 251, 0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Bubbles */
#custom-chatbot .cc-message {
  padding: 10px 16px;
  border-radius: 20px;
  max-width: 75%;
  line-height: 1.4;
  opacity: 0;
  animation: fadeIn 0.4s forwards;
  word-wrap: break-word;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

#custom-chatbot .cc-message.user {
  background: linear-gradient(135deg, #0073aa, #00bcd4);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  text-align: right;
}

#custom-chatbot .cc-message.bot,
#custom-chatbot .cc-bot-message {
  background: #fff;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Typing indicator */
#custom-chatbot .cc-typing {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  align-self: flex-start;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  width: 50px;
}

#custom-chatbot .cc-typing span {
  width: 8px;
  height: 8px;
  background: #aaa;
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Input area */
#custom-chatbot .cc-input {
  display: flex;
  border-top: 1px solid #ddd;
  background: #fff;
}

#custom-chatbot .cc-input input[type="text"] {
  flex: 1;
  padding: 14px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}

/* SEND BUTTON — Elementor-proof */
#custom-chatbot .cc-input button.cc-send {
  width: 60px;
  border: none;
  cursor: pointer;
  background: #0073aa;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

#custom-chatbot .cc-input button.cc-send::before {
  content: "⌲";
  font-size: 18px;
  transition: transform 0.3s ease;
}

#custom-chatbot .cc-input button.cc-send:hover,
#custom-chatbot .cc-input button.cc-send:focus {
  background: #00bcd4 !important;
  color: #fff;
}

#custom-chatbot .cc-input button.cc-send:hover::before {
  transform: translateX(3px);
}

/* Scrollbar */
#custom-chatbot .cc-messages::-webkit-scrollbar {
  width: 6px;
}

#custom-chatbot .cc-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

#custom-chatbot .cc-messages::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Typing dots */
#custom-chatbot .cc-typing-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 10px 16px;
  width: fit-content;
  align-self: flex-start;
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

#custom-chatbot .cc-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
  opacity: 0.5;
  animation: typingDots 1.4s infinite ease-in-out;
}

@keyframes typingDots {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Disclaimer */
#custom-chatbot .cc-disclaimer {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding: 4px 2px;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 20px 20px;
  margin: 0 auto;
}
