@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap");

#chatbot-toggler,
#chatbot-toggler *,
.chatbot-popup,
.chatbot-popup * {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

#chatbot-toggler {
  position: fixed;
  bottom: 100px;
  right: 30px;
  height: 50px;
  width: 50px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  background: #6a0dd1;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

body.fab-open #chatbot-toggler {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -90px) scale(1);
  transition-delay: 0.13s;
}

#chatbot-toggler span {
  color: #fff;
  position: absolute;
}

body.show-chatbot #chatbot-toggler span:first-child, #chatbot-toggler span:last-child{
  opacity: 0;
}

body.show-chatbot #chatbot-toggler span:last-child{
  opacity: 1;
}

.chatbot-popup {
  position: fixed;
  right: 25px;
  bottom: 152px;
  width: 420px;
  max-height: min(600px, calc(100vh - 190px));
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  border-radius: 15px;
  opacity: 0;
  transform: scale(0.2);
  transform-origin: bottom right;
  z-index: 999999;
  pointer-events: none;
  box-shadow: 0 0 128px rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
  transition: all 0.1s ease;
}

body.show-chatbot .chatbot-popup {
  opacity: 1;
  pointer-events: auto;
    transform: scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  background: #6a0dd1;
  padding: 15px 22px;
  justify-content: space-between;
}

.chat-header .header-info {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-info .chatbot-logo {
  height: 35px;
  width: 35px;
  padding: 6px;
  fill: #6a0dd1;
  flex-shrink: 0;
  background: #fff;
  border-radius: 50%;
}

.header-info .logo-text {
  color: #fff;
  font-size: 1.31rem;
  font-weight: 600;
}

.chat-header #close-chatbot {
  border: none;
  color: #fff;
  height: 40px;
  width: 40px;
  font-size: 1.9rem;
  margin-right: -10px;
  padding-top: 2px;
  cursor: pointer;
  border-radius: 50%;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.chat-header #close-chatbot:hover {
  background: #4f0a9c;
}

.chat-body {
  padding: 25px 22px;
  display: flex;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #ddc4f2 transparent;
}

.chat-body .message {
  display: flex;
  gap: 11px;
  align-items: center;
}

.chat-body .bot-message .bot-avatar {
  height: 35px;
  width: 35px;
  padding: 6px;
  fill: #fff;
  flex-shrink: 0;
  margin-bottom: 2px;
  align-self: flex-end;
  background: #6a0dd1;
  border-radius: 50%;
}

.chat-body .user-message {
  flex-direction: column;
  align-items: flex-end;
}

.chat-body .message .message-text {
  padding: 12px 16px;
  max-width: 75%;
  font-size: 0.95rem;
  background: #f2e9fb;
}

.chat-body .bot-message.thinking .message-text {
  padding: 2px 16px;
}

.chat-body .bot-message .message-text {
  background-color: #f2e9fb;
  border-radius: 13px 13px 13px 3px;
}

.chat-body .user-message .message-text {
  color: #fff;
  background-color: #6a0dd1;
  border-radius: 13px 13px 3px 13px;
}

.chat-body .bot-message .thinking-indicator {
  display: flex;
  gap: 4px;
  padding-block: 15px;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.2s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(2) {
  animation-delay: 0.3s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-body .bot-message .thinking-indicator .dot {
  height: 7px;
  width: 7px;
  opacity: 0.7;
  border-radius: 50%;
  background: #9b4de0;
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  44% {
    transform: translateY(0);
  }

  28% {
    opacity: 0.4;
    transform: translateY(-4px);
  }

  44% {
    opacity: 0.2;
  }
}

.chat-footer {
  flex: 0 0 auto;
  width: 100%;
  background: white;
  padding: 15px 22px 20px;
}

.chat-footer .chat-form {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 32px;
  outline: 1px solid #ddc9ee;
}

.chat-footer .chat-form:focus-within {
  outline: 2px solid #6a0dd1;
}

.chat-form .message-input {
  border: none;
  outline: none;
  height: 47px;
  width: 100%;
  resize: none;
  max-height: 180px;
  white-space: pre-line;
  font-size: 1rem;
  padding: 13px;
  border-radius: inherit;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.chat-form .message-input::hover {
  scrollbar-color: #ddc4f2 transparent;
}

.chat-form .chat-controls {
  display: flex;
  height: 47px;
  gap: 3px;
  align-items: center;
  align-self: center;
  padding-right: 12px;
}

.chat-form .chat-controls button {
  height: 35px;
  width: 35px;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: #8a3fe0;
  background: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.chat-form .chat-controls #send-message {
  color: #fff;
  display: none;
  background: #6a0dd1;
}

.chat-form .message-input:valid ~ .chat-controls #send-message {
  display: block;
}

.chat-form .chat-controls #send-message:hover {
  background: #4f0a9c;
}

.chat-form .chat-controls button:hover {
  background: #f1f1f1;
}

.chat-body .user-message .attachment {
  width: 50%;
  margin-top: -7px;
  border-radius: 13px 3px 13px 3px;
}

#emoji-panel {
  position: absolute;
  left: 50%;
  bottom: 60px;
  width: 260px;
  max-width: 90vw;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12), 0 12px 24px -12px rgba(0, 0, 0, 0.3);
  visibility: hidden;
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

#emoji-panel button {
  border: none;
  background: none;
  font-size: 1.2rem;
  line-height: 1;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

#emoji-panel button:hover {
  background: #f2e9fb;
}

body.show-emoji-picker #emoji-panel {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Responsive for mobile screen */
@media screen and (max-width: 600px) {
  .chatbot-popup {
    width: 100%;
    right: 0;
    bottom: 0;
    border-radius: 0;
    height: 100%;
    max-height: 100%;
  }

  .chat-header .header-info .logo-text {
    font-size: 1.1rem;
  }

  .chat-body {
    flex: 1 1 auto;
  }

  .chat-body .message .message-text {
    max-width: 85%;
  }

  .chat-footer .chat-form {
    border-radius: 0;
    border-radius: 25px;
  }

  .chat-footer .chat-form .message-input {
    border-radius: 0;
  }

  .chat-footer .chat-form .chat-controls {
    padding-right: 10px;
  }

  .chat-footer .chat-form .chat-controls button {
    height: 40px;
    width: 40px;
  }
}

/* ===== WhatsApp quick-message widget ===== */
#whatsapp-toggler,
#whatsapp-toggler *,
.whatsapp-popup,
.whatsapp-popup * {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

#whatsapp-toggler {
  position: fixed;
  bottom: 100px;
  right: 30px;
  height: 50px;
  width: 50px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

body.fab-open #whatsapp-toggler {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-64px, -64px) scale(1);
  transition-delay: 0.08s;
}

#whatsapp-toggler svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.whatsapp-popup {
  position: fixed;
  right: 25px;
  bottom: 214px;
  width: 300px;
  max-width: 90vw;
  max-height: min(360px, calc(100vh - 250px));
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  border-radius: 15px;
  opacity: 0;
  transform: scale(0.2);
  transform-origin: bottom right;
  pointer-events: none;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.1), 0 20px 40px -24px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
  z-index: 999999;
}

body.show-whatsapp .whatsapp-popup {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.whatsapp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #25d366;
  padding: 12px 16px;
}

.whatsapp-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whatsapp-header-info svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.whatsapp-logo-text {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

#whatsapp-close {
  border: none;
  background: none;
  color: #fff;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

#whatsapp-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#whatsapp-close svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.whatsapp-body {
  padding: 14px 16px 6px;
  font-size: 0.85rem;
  color: #4a4a4a;
  line-height: 1.4;
}

.whatsapp-footer {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#whatsapp-input {
  border: 1px solid #dcdcdc;
  outline: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  resize: none;
  height: 70px;
  font-family: "Inter", sans-serif;
}

#whatsapp-input:focus {
  border-color: #25d366;
}

#whatsapp-send {
  border: none;
  background: #25d366;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.2s ease;
}

#whatsapp-send:hover {
  background: #1ebe5b;
}

#whatsapp-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

@media screen and (max-width: 600px) {
  .whatsapp-popup {
    right: 12px;
    width: calc(100vw - 24px);
  }
}

/* ===== Book a Call button ===== */
#booking-toggler {
  position: fixed;
  bottom: 100px;
  right: 30px;
  height: 50px;
  width: 50px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  background: #6a0dd1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 999999;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

body.fab-open #booking-toggler {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-90px, 0) scale(1);
  transition-delay: 0.03s;
}

#booking-toggler svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* ===== Main FAB (opens the radial menu) ===== */
#fab-toggler {
  position: fixed;
  bottom: 100px;
  right: 30px;
  height: 56px;
  width: 56px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  background: #6a0dd1;
  box-shadow: 0 6px 18px rgba(106, 13, 209, 0.4);
  z-index: 999998;
  transition: background 0.3s ease, transform 0.2s ease;
}

#fab-toggler:active {
  transform: scale(0.94);
}

#fab-toggler .fab-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#fab-toggler .fab-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}

body.fab-open #fab-toggler .fab-icon-chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

body.fab-open #fab-toggler .fab-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

body.fab-open #fab-toggler {
  background: #4f0a9c;
}

#fab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999997;
  display: none;
}

body.fab-open #fab-backdrop {
  display: block;
}


